feat(charts): add service wrapper charts
This commit is contained in:
parent
6cbca2e23b
commit
7e4b1061d9
6
oci/charts/apps/accounts/Chart.lock
Normal file
6
oci/charts/apps/accounts/Chart.lock
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: app-service
|
||||||
|
repository: file://../app-service
|
||||||
|
version: 0.1.0
|
||||||
|
digest: sha256:29102607dbddc890cc60258ec869b75fd9e5f995fc8c5ee1f1a31b046b80e407
|
||||||
|
generated: "2026-04-02T17:55:26.238504+08:00"
|
||||||
11
oci/charts/apps/accounts/Chart.yaml
Normal file
11
oci/charts/apps/accounts/Chart.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: accounts-chart
|
||||||
|
description: Accounts service chart backed by the shared app-service subchart
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0.0"
|
||||||
|
dependencies:
|
||||||
|
- name: app-service
|
||||||
|
version: 0.1.0
|
||||||
|
repository: file://../app-service
|
||||||
|
alias: service
|
||||||
BIN
oci/charts/apps/accounts/charts/app-service-0.1.0.tgz
Normal file
BIN
oci/charts/apps/accounts/charts/app-service-0.1.0.tgz
Normal file
Binary file not shown.
25
oci/charts/apps/accounts/values.yaml
Normal file
25
oci/charts/apps/accounts/values.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
service:
|
||||||
|
nameOverride: accounts
|
||||||
|
containerPort: 8080
|
||||||
|
service:
|
||||||
|
port: 80
|
||||||
|
global:
|
||||||
|
existingSecretName: accounts-env
|
||||||
|
repository: ghcr.io/x-evor/accounts
|
||||||
|
tag: latest
|
||||||
|
env:
|
||||||
|
PORT: "8080"
|
||||||
|
SERVICE_NAME: accounts
|
||||||
|
HEALTHCHECK_PATH: /healthz
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 20
|
||||||
@ -1,3 +1,22 @@
|
|||||||
|
{{- $global := .Values.global | default dict -}}
|
||||||
|
{{- $globalRepository := $global.repository | default "" -}}
|
||||||
|
{{- $globalTag := $global.tag | default "" -}}
|
||||||
|
{{- $globalEnv := $global.env | default dict -}}
|
||||||
|
{{- $localEnv := .Values.env | default dict -}}
|
||||||
|
{{- $env := mergeOverwrite (deepCopy $globalEnv) $localEnv -}}
|
||||||
|
{{- $existingSecretName := .Values.existingSecretName | default ($global.existingSecretName | default "") -}}
|
||||||
|
{{- $imageRepository := default $globalRepository .Values.image.repository -}}
|
||||||
|
{{- $imageTag := default $globalTag .Values.image.tag -}}
|
||||||
|
{{- $globalEnvFromSecretRefs := $global.envFromSecretRefs | default list -}}
|
||||||
|
{{- $localEnvFromSecretRefs := .Values.envFromSecretRefs | default list -}}
|
||||||
|
{{- $envFromSecretRefs := concat $globalEnvFromSecretRefs $localEnvFromSecretRefs -}}
|
||||||
|
{{- $globalExternalServices := index $global "external-service" | default list -}}
|
||||||
|
{{- $localExternalServices := index .Values "external-service" | default list -}}
|
||||||
|
{{- $externalServices := concat $globalExternalServices $localExternalServices -}}
|
||||||
|
{{- if $externalServices -}}
|
||||||
|
{{- $_ := set $env "EXTERNAL_SERVICES" (join "," $externalServices) -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@ -24,8 +43,8 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- if and .Values.reloader.enabled .Values.existingSecretName }}
|
{{- if and .Values.reloader.enabled $existingSecretName }}
|
||||||
secret.reloader.stakater.com/reload: {{ default .Values.existingSecretName .Values.reloader.secretMatch | quote }}
|
secret.reloader.stakater.com/reload: {{ default $existingSecretName .Values.reloader.secretMatch | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.podAnnotations }}
|
{{- with .Values.podAnnotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
@ -50,34 +69,60 @@ spec:
|
|||||||
affinity:
|
affinity:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.initContainers }}
|
||||||
|
initContainers:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: app
|
- name: app
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ $imageRepository }}:{{ $imageTag }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
{{- with .Values.command }}
|
||||||
|
command:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.args }}
|
||||||
|
args:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.workingDir }}
|
||||||
|
workingDir: {{ .Values.workingDir | quote }}
|
||||||
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.containerPort }}
|
containerPort: {{ .Values.containerPort }}
|
||||||
{{- if .Values.env }}
|
{{- if $env }}
|
||||||
env:
|
env:
|
||||||
{{- range $key, $value := .Values.env }}
|
{{- range $key := keys $env | sortAlpha }}
|
||||||
- name: {{ $key }}
|
- name: {{ $key }}
|
||||||
value: {{ $value | quote }}
|
value: {{ index $env $key | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if or .Values.existingSecretName .Values.envFromSecretRefs }}
|
{{- if or $existingSecretName $envFromSecretRefs }}
|
||||||
envFrom:
|
envFrom:
|
||||||
{{- if .Values.existingSecretName }}
|
{{- if $existingSecretName }}
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ .Values.existingSecretName }}
|
name: {{ $existingSecretName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- range .Values.envFromSecretRefs }}
|
{{- range $envFromSecretRefs }}
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ . }}
|
name: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.volumeMounts }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
{{- toYaml .Values.readinessProbe | nindent 12 }}
|
{{- toYaml .Values.readinessProbe | nindent 12 }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
||||||
|
{{- with .Values.extraContainers }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.volumes }}
|
||||||
|
volumes:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
@ -4,11 +4,15 @@ fullnameOverride: ""
|
|||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/example/app
|
repository: ""
|
||||||
tag: latest
|
tag: ""
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
pullSecrets: []
|
pullSecrets: []
|
||||||
|
|
||||||
|
command: []
|
||||||
|
args: []
|
||||||
|
workingDir: ""
|
||||||
|
|
||||||
containerPort: 8080
|
containerPort: 8080
|
||||||
|
|
||||||
service:
|
service:
|
||||||
@ -30,9 +34,23 @@ serviceAccount:
|
|||||||
name: ""
|
name: ""
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|
||||||
|
global:
|
||||||
|
repository: ""
|
||||||
|
tag: ""
|
||||||
|
env: {}
|
||||||
|
existingSecretName: ""
|
||||||
|
external-service: []
|
||||||
|
envFromSecretRefs: []
|
||||||
|
|
||||||
|
# Local overrides remain available for backwards compatibility.
|
||||||
env: {}
|
env: {}
|
||||||
existingSecretName: ""
|
existingSecretName: ""
|
||||||
|
external-service: []
|
||||||
envFromSecretRefs: []
|
envFromSecretRefs: []
|
||||||
|
initContainers: []
|
||||||
|
extraContainers: []
|
||||||
|
volumeMounts: []
|
||||||
|
volumes: []
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
|
|||||||
6
oci/charts/apps/console/Chart.lock
Normal file
6
oci/charts/apps/console/Chart.lock
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: app-service
|
||||||
|
repository: file://../app-service
|
||||||
|
version: 0.1.0
|
||||||
|
digest: sha256:29102607dbddc890cc60258ec869b75fd9e5f995fc8c5ee1f1a31b046b80e407
|
||||||
|
generated: "2026-04-02T17:55:26.213216+08:00"
|
||||||
11
oci/charts/apps/console/Chart.yaml
Normal file
11
oci/charts/apps/console/Chart.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: console-chart
|
||||||
|
description: Console service chart backed by the shared app-service subchart
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0.0"
|
||||||
|
dependencies:
|
||||||
|
- name: app-service
|
||||||
|
version: 0.1.0
|
||||||
|
repository: file://../app-service
|
||||||
|
alias: service
|
||||||
BIN
oci/charts/apps/console/charts/app-service-0.1.0.tgz
Normal file
BIN
oci/charts/apps/console/charts/app-service-0.1.0.tgz
Normal file
Binary file not shown.
31
oci/charts/apps/console/values.yaml
Normal file
31
oci/charts/apps/console/values.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
service:
|
||||||
|
nameOverride: console
|
||||||
|
containerPort: 3000
|
||||||
|
service:
|
||||||
|
port: 80
|
||||||
|
global:
|
||||||
|
existingSecretName: console-env
|
||||||
|
repository: ghcr.io/x-evor/console
|
||||||
|
tag: latest
|
||||||
|
env:
|
||||||
|
PORT: "3000"
|
||||||
|
SERVICE_NAME: console
|
||||||
|
HEALTHCHECK_PATH: /
|
||||||
|
DOCS_SERVICE_URL: https://docs.svc.plus
|
||||||
|
NEXT_PUBLIC_DOCS_BASE_URL: https://docs.svc.plus
|
||||||
|
external-service:
|
||||||
|
- docs.svc.plus
|
||||||
|
- xworkmate.svc.plus
|
||||||
|
- openclaw-gateway.svc.plus
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 20
|
||||||
6
oci/charts/apps/rag-server/Chart.lock
Normal file
6
oci/charts/apps/rag-server/Chart.lock
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: app-service
|
||||||
|
repository: file://../app-service
|
||||||
|
version: 0.1.0
|
||||||
|
digest: sha256:29102607dbddc890cc60258ec869b75fd9e5f995fc8c5ee1f1a31b046b80e407
|
||||||
|
generated: "2026-04-02T17:55:26.26398+08:00"
|
||||||
11
oci/charts/apps/rag-server/Chart.yaml
Normal file
11
oci/charts/apps/rag-server/Chart.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: rag-server-chart
|
||||||
|
description: RAG server chart backed by the shared app-service subchart
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0.0"
|
||||||
|
dependencies:
|
||||||
|
- name: app-service
|
||||||
|
version: 0.1.0
|
||||||
|
repository: file://../app-service
|
||||||
|
alias: service
|
||||||
BIN
oci/charts/apps/rag-server/charts/app-service-0.1.0.tgz
Normal file
BIN
oci/charts/apps/rag-server/charts/app-service-0.1.0.tgz
Normal file
Binary file not shown.
25
oci/charts/apps/rag-server/values.yaml
Normal file
25
oci/charts/apps/rag-server/values.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
service:
|
||||||
|
nameOverride: rag-server
|
||||||
|
containerPort: 8080
|
||||||
|
service:
|
||||||
|
port: 80
|
||||||
|
global:
|
||||||
|
existingSecretName: rag-server-env
|
||||||
|
repository: ghcr.io/x-evor/rag-server
|
||||||
|
tag: latest
|
||||||
|
env:
|
||||||
|
PORT: "8080"
|
||||||
|
SERVICE_NAME: rag-server
|
||||||
|
HEALTHCHECK_PATH: /healthz
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 20
|
||||||
Loading…
Reference in New Issue
Block a user