feat(charts): split platform release charts
This commit is contained in:
1 parent
aeb34d1e5b
commit
08ed1422fe
29 files changed
+1314
-15
No files matched your search
@@ -1,9 +1,15 @@
|
|||||||
# MixingX Split Charts
|
# MixingX Split Charts
|
||||||
|
|
||||||
This directory contains the new release-oriented charts:
|
This directory contains the release-oriented charts for Phase 1 ownership split:
|
||||||
|
|
||||||
- `mixingx-platform`: central services and shared infrastructure.
|
- `mixingx-infra`: shared Redis, MongoDB, RabbitMQ.
|
||||||
|
- `mixingx-gateway`: gateway service, RBAC, and root ingress.
|
||||||
|
- `mixingx-sso`: SSO backend, web frontend, and dedicated PostgreSQL.
|
||||||
|
- `mixingx-ultra`: Ultra backend, web frontend, and dedicated PostgreSQL.
|
||||||
|
- `mixingx-audit`: Audit service (uses shared Mongo/RabbitMQ).
|
||||||
- `mixingx-edge-unit`: one edge site release.
|
- `mixingx-edge-unit`: one edge site release.
|
||||||
- `mixingx-agent-unit`: one agent site release.
|
- `mixingx-agent-unit`: one agent site release.
|
||||||
|
- `mixingx-protocol-server-unit`: one protocol mock server instance.
|
||||||
|
- `mixingx-platform`: **legacy** central-services chart, kept for compatibility during migration.
|
||||||
|
|
||||||
The chart at the repository root is kept as a legacy all-in-one chart during migration.
|
The chart at the repository root is kept as a legacy all-in-one chart during migration.
|
||||||
@@ -26,7 +26,11 @@ spec:
|
|||||||
{{ include "mixingx-unit.backendScheduling" . | nindent 6 }}
|
{{ include "mixingx-unit.backendScheduling" . | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $name }}
|
- name: {{ $name }}
|
||||||
image: {{ .Values.registry }}/{{ .Values.images.backend }}:{{ .Values.tag | default "latest" }}
|
{{ $backendImg := .Values.images.backend }}
|
||||||
|
{{ $agentImg := .Values.images.agent | default dict }}
|
||||||
|
{{ $backendRepo := $agentImg.repository | default $backendImg.repository }}
|
||||||
|
{{ $backendTag := $agentImg.tag | default $backendImg.tag | default .Values.tag | default "latest" }}
|
||||||
|
image: {{ .Values.registry }}/{{ $backendRepo }}:{{ $backendTag }}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -139,7 +143,11 @@ spec:
|
|||||||
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $webName }}
|
- name: {{ $webName }}
|
||||||
image: {{ .Values.registry }}/{{ .Values.images.frontend }}:{{ .Values.tag | default "latest" }}
|
{{ $frontendImg := .Values.images.frontend }}
|
||||||
|
{{ $agentWebImg := .Values.images.agentWeb | default dict }}
|
||||||
|
{{ $frontendRepo := $agentWebImg.repository | default $frontendImg.repository }}
|
||||||
|
{{ $frontendTag := $agentWebImg.tag | default $frontendImg.tag | default .Values.tag | default "latest" }}
|
||||||
|
image: {{ .Values.registry }}/{{ $frontendRepo }}:{{ $frontendTag }}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -205,7 +213,7 @@ spec:
|
|||||||
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
image: {{ .Values.images.postgres }}
|
image: {{ .Values.images.postgres.repository }}:{{ .Values.images.postgres.tag | default "latest" }}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
|
|||||||
@@ -10,9 +10,17 @@ phaseType: "" # 工序类型(对应 apphost 的 AGENT_PHASE_TYPE,如 DieC
|
|||||||
database: ""
|
database: ""
|
||||||
|
|
||||||
images:
|
images:
|
||||||
backend: agent
|
backend:
|
||||||
frontend: agent-web
|
repository: agent
|
||||||
postgres: docker.io/library/postgres:17
|
tag: ""
|
||||||
|
frontend:
|
||||||
|
repository: agent-web
|
||||||
|
tag: ""
|
||||||
|
postgres:
|
||||||
|
repository: docker.io/library/postgres
|
||||||
|
tag: "17"
|
||||||
|
agent: {}
|
||||||
|
agentWeb: {}
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
backend: 8080
|
backend: 8080
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: mixingx-audit
|
||||||
|
description: MixingX audit service.
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0.1"
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{{- define "mixingx-audit.tierAffinity" -}}
|
||||||
|
{{- $root := .root -}}
|
||||||
|
{{- $role := .role -}}
|
||||||
|
{{- if and $root.Values.tier $root.Values.tier.enabled -}}
|
||||||
|
{{- $service := index $root.Values.tier.services $role -}}
|
||||||
|
{{- if $service }}
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
{{- if eq ($service.mode | default "preferred") "required" }}
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
{{- if .Values.audit.enabled }}
|
||||||
|
{{- $root := $ }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: audit-deployment
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: audit
|
||||||
|
mixingx.io/role: audit
|
||||||
|
mixingx.io/node-id: audit
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.audit.replicas | default 1 }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: audit
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: audit
|
||||||
|
mixingx.io/role: audit
|
||||||
|
mixingx.io/node-id: audit
|
||||||
|
spec:
|
||||||
|
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: audit
|
||||||
|
image: "{{ .Values.registry }}/{{ .Values.images.audit.repository | default "audit" }}:{{ .Values.images.audit.tag | default .Values.tag | default "latest" }}"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.audit.port }}
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}"
|
||||||
|
- name: MONGODB_URI
|
||||||
|
value: "mongodb://{{ .Values.sharedInfra.mongo.username }}:{{ .Values.sharedInfra.mongo.password }}@{{ .Values.sharedInfra.mongo.host }}:{{ .Values.sharedInfra.mongo.port }}"
|
||||||
|
- name: MONGODB_DATABASE
|
||||||
|
value: "{{ .Values.sharedInfra.mongo.database }}"
|
||||||
|
- name: RABBITMQ_URI
|
||||||
|
value: "amqp://{{ .Values.sharedInfra.rabbitmq.username }}:{{ .Values.sharedInfra.rabbitmq.password }}@{{ .Values.sharedInfra.rabbitmq.host }}:{{ .Values.sharedInfra.rabbitmq.port }}"
|
||||||
|
- name: PORT
|
||||||
|
value: "{{ .Values.audit.port }}"
|
||||||
|
- name: HOST
|
||||||
|
value: "0.0.0.0"
|
||||||
|
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
||||||
|
value: "{{ .Values.sharedInfra.otlp.endpoint }}"
|
||||||
|
- name: OTEL_SERVICE_NAME
|
||||||
|
value: "audit"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: audit-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: audit
|
||||||
|
mixingx.io/role: audit
|
||||||
|
mixingx.io/node-id: audit
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: audit
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ .Values.audit.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
registry: 192.168.1.105:8888/mixingx
|
||||||
|
tag: latest
|
||||||
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
|
sharedInfra:
|
||||||
|
mongo:
|
||||||
|
host: mongo-service
|
||||||
|
port: 27017
|
||||||
|
username: admin
|
||||||
|
password: "Admin12345"
|
||||||
|
database: mixingx_audit
|
||||||
|
rabbitmq:
|
||||||
|
host: messaging-service
|
||||||
|
port: 5672
|
||||||
|
username: guest
|
||||||
|
password: guest
|
||||||
|
otlp:
|
||||||
|
endpoint: http://k8s-dashboard-service:18889
|
||||||
|
protocol: grpc
|
||||||
|
|
||||||
|
audit:
|
||||||
|
enabled: true
|
||||||
|
port: 5600
|
||||||
|
replicas: 2
|
||||||
|
|
||||||
|
images:
|
||||||
|
audit:
|
||||||
|
repository: audit
|
||||||
|
tag: ""
|
||||||
|
|
||||||
|
tier:
|
||||||
|
enabled: false
|
||||||
|
nodeLabel: mixingx.io/tier
|
||||||
|
services:
|
||||||
|
audit: { mode: required, tiers: [infra] }
|
||||||
@@ -26,7 +26,11 @@ spec:
|
|||||||
{{ include "mixingx-unit.backendScheduling" . | nindent 6 }}
|
{{ include "mixingx-unit.backendScheduling" . | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $name }}
|
- name: {{ $name }}
|
||||||
image: {{ .Values.registry }}/{{ .Values.images.backend }}:{{ .Values.tag | default "latest" }}
|
{{ $backendImg := .Values.images.backend }}
|
||||||
|
{{ $edgeImg := .Values.images.edge | default dict }}
|
||||||
|
{{ $backendRepo := $edgeImg.repository | default $backendImg.repository }}
|
||||||
|
{{ $backendTag := $edgeImg.tag | default $backendImg.tag | default .Values.tag | default "latest" }}
|
||||||
|
image: {{ .Values.registry }}/{{ $backendRepo }}:{{ $backendTag }}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -136,7 +140,11 @@ spec:
|
|||||||
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $webName }}
|
- name: {{ $webName }}
|
||||||
image: {{ .Values.registry }}/{{ .Values.images.frontend }}:{{ .Values.tag | default "latest" }}
|
{{ $frontendImg := .Values.images.frontend }}
|
||||||
|
{{ $edgeWebImg := .Values.images.edgeWeb | default dict }}
|
||||||
|
{{ $frontendRepo := $edgeWebImg.repository | default $frontendImg.repository }}
|
||||||
|
{{ $frontendTag := $edgeWebImg.tag | default $frontendImg.tag | default .Values.tag | default "latest" }}
|
||||||
|
image: {{ .Values.registry }}/{{ $frontendRepo }}:{{ $frontendTag }}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@@ -202,7 +210,7 @@ spec:
|
|||||||
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
{{ include "mixingx-unit.followerScheduling" . | nindent 6 }}
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
image: {{ .Values.images.postgres }}
|
image: {{ .Values.images.postgres.repository }}:{{ .Values.images.postgres.tag | default "latest" }}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
|
|||||||
@@ -9,9 +9,17 @@ serviceId: ""
|
|||||||
database: ""
|
database: ""
|
||||||
|
|
||||||
images:
|
images:
|
||||||
backend: edge
|
backend:
|
||||||
frontend: edge-web
|
repository: edge
|
||||||
postgres: docker.io/library/postgres:17
|
tag: ""
|
||||||
|
frontend:
|
||||||
|
repository: edge-web
|
||||||
|
tag: ""
|
||||||
|
postgres:
|
||||||
|
repository: docker.io/library/postgres
|
||||||
|
tag: "17"
|
||||||
|
edge: {}
|
||||||
|
edgeWeb: {}
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
backend: 8080
|
backend: 8080
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: mixingx-gateway
|
||||||
|
description: MixingX gateway service, RBAC, and root ingress.
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0.1"
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{{- define "mixingx-gateway.storageClassName" -}}
|
||||||
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mixingx-gateway.tierAffinity" -}}
|
||||||
|
{{- $root := .root -}}
|
||||||
|
{{- $role := .role -}}
|
||||||
|
{{- if and $root.Values.tier $root.Values.tier.enabled -}}
|
||||||
|
{{- $service := index $root.Values.tier.services $role -}}
|
||||||
|
{{- if $service }}
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
{{- if eq ($service.mode | default "preferred") "required" }}
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
{{- if .Values.gateway.rbac }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: gateway-sa
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: gateway-service-reader
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["services"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: gateway-service-reader-binding
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: gateway-service-reader
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: gateway-sa
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
{{- $gatewayImage := .Values.images.gateway -}}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: gateway-deployment
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
mixingx.io/role: gateway
|
||||||
|
mixingx.io/node-id: gateway
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.gateway.replicas | default 2 }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
mixingx.io/role: gateway
|
||||||
|
mixingx.io/node-id: gateway
|
||||||
|
spec:
|
||||||
|
{{- if .Values.gateway.rbac }}
|
||||||
|
serviceAccountName: gateway-sa
|
||||||
|
{{- end }}
|
||||||
|
{{ include "mixingx-gateway.tierAffinity" (dict "role" "gateway" "root" $) | nindent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: gateway
|
||||||
|
image: {{ .Values.registry }}/{{ $gatewayImage.repository | default "gateway" }}:{{ $gatewayImage.tag | default .Values.tag | default "latest" }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.gateway.port | default 8080 }}
|
||||||
|
protocol: TCP
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: gateway-config
|
||||||
|
- secretRef:
|
||||||
|
name: gateway-secrets
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "{{ .Values.timezone | default "Asia/Shanghai" }}"
|
||||||
|
{{- if .Values.gateway.rbac }}
|
||||||
|
- name: POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
{{- end }}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 15
|
||||||
|
failureThreshold: 12
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /alive
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
failureThreshold: 8
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: gateway-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
mixingx.io/role: gateway
|
||||||
|
mixingx.io/node-id: gateway
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ .Values.gateway.port | default 8080 }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: gateway-config
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
data:
|
||||||
|
HTTP_PORTS: "{{ .Values.gateway.port | default 8080 }}"
|
||||||
|
REDIS_HOST: "{{ .Values.sharedInfra.redis.host }}"
|
||||||
|
REDIS_PORT: "{{ .Values.sharedInfra.redis.port }}"
|
||||||
|
MESSAGING_HOST: "{{ .Values.sharedInfra.rabbitmq.host }}"
|
||||||
|
MESSAGING_PORT: "{{ .Values.sharedInfra.rabbitmq.port }}"
|
||||||
|
MESSAGING_USERNAME: "{{ .Values.sharedInfra.rabbitmq.username }}"
|
||||||
|
OTEL_EXPORTER_OTLP_ENDPOINT: "{{ .Values.sharedInfra.otlp.endpoint }}"
|
||||||
|
OTEL_EXPORTER_OTLP_PROTOCOL: "{{ .Values.sharedInfra.otlp.protocol }}"
|
||||||
|
OTEL_SERVICE_NAME: "gateway"
|
||||||
|
ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: gateway-secrets
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/component: gateway
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
ConnectionStrings__redis: "{{ .Values.sharedInfra.redis.host }}:{{ .Values.sharedInfra.redis.port }},password={{ .Values.sharedInfra.redis.password }}"
|
||||||
|
REDIS_PASSWORD: "{{ .Values.sharedInfra.redis.password }}"
|
||||||
|
REDIS_URI: "redis://:{{ .Values.sharedInfra.redis.password }}@{{ .Values.sharedInfra.redis.host }}:{{ .Values.sharedInfra.redis.port }}"
|
||||||
|
ConnectionStrings__messaging: "amqp://{{ .Values.sharedInfra.rabbitmq.username }}:{{ .Values.sharedInfra.rabbitmq.password }}@{{ .Values.sharedInfra.rabbitmq.host }}:{{ .Values.sharedInfra.rabbitmq.port }}"
|
||||||
|
MESSAGING_PASSWORD: "{{ .Values.sharedInfra.rabbitmq.password }}"
|
||||||
|
MESSAGING_URI: "amqp://{{ .Values.sharedInfra.rabbitmq.username }}:{{ .Values.sharedInfra.rabbitmq.password }}@{{ .Values.sharedInfra.rabbitmq.host }}:{{ .Values.sharedInfra.rabbitmq.port }}"
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: app-ingress
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||||
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
|
rules:
|
||||||
|
- host: {{ .Values.ingress.domain }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: {{ .Values.ingress.gatewayService }}
|
||||||
|
port:
|
||||||
|
number: {{ .Values.ingress.gatewayPort }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
registry: 192.168.1.119:8888/mixingx
|
||||||
|
tag: latest
|
||||||
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
|
storage:
|
||||||
|
className: local-path
|
||||||
|
|
||||||
|
sharedInfra:
|
||||||
|
redis:
|
||||||
|
host: redis-service
|
||||||
|
port: 6379
|
||||||
|
password: Admin12345
|
||||||
|
rabbitmq:
|
||||||
|
host: messaging-service
|
||||||
|
port: 5672
|
||||||
|
username: guest
|
||||||
|
password: guest
|
||||||
|
otlp:
|
||||||
|
endpoint: http://k8s-dashboard-service:18889
|
||||||
|
protocol: grpc
|
||||||
|
|
||||||
|
images:
|
||||||
|
gateway:
|
||||||
|
repository: gateway
|
||||||
|
tag: ""
|
||||||
|
|
||||||
|
gateway:
|
||||||
|
port: 8080
|
||||||
|
replicas: 2
|
||||||
|
rbac: true
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
domain: app.mixingx.local
|
||||||
|
gatewayService: gateway-service
|
||||||
|
gatewayPort: 8080
|
||||||
|
|
||||||
|
tier:
|
||||||
|
enabled: false
|
||||||
|
nodeLabel: mixingx.io/tier
|
||||||
|
services:
|
||||||
|
gateway:
|
||||||
|
mode: required
|
||||||
|
tiers:
|
||||||
|
- infra
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: mixingx-infra
|
||||||
|
description: MixingX shared infrastructure services (Redis, MongoDB, RabbitMQ).
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0.1"
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{{- define "mixingx-infra.storageClassName" -}}
|
||||||
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mixingx-infra.tierAffinity" -}}
|
||||||
|
{{- $root := .root -}}
|
||||||
|
{{- $role := .role -}}
|
||||||
|
{{- if and $root.Values.tier $root.Values.tier.enabled -}}
|
||||||
|
{{- $service := index $root.Values.tier.services $role -}}
|
||||||
|
{{- if $service }}
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
{{- if eq ($service.mode | default "preferred") "required" }}
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
{{- range .Values.sharedDatastores }}
|
||||||
|
{{- $root := $ }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ .name }}-statefulset
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ .name }}
|
||||||
|
spec:
|
||||||
|
serviceName: {{ .name }}-service
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: {{ .name }}
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: data
|
||||||
|
annotations:
|
||||||
|
helm.sh/resource-policy: keep
|
||||||
|
spec:
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
storageClassName: {{ include "mixingx-infra.storageClassName" $root }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .storage }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ .name }}
|
||||||
|
spec:
|
||||||
|
{{ include "mixingx-infra.tierAffinity" (dict "role" "sharedDatastores" "root" $root) | nindent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .name }}
|
||||||
|
image: {{ .image }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: tcp
|
||||||
|
containerPort: {{ .port }}
|
||||||
|
protocol: TCP
|
||||||
|
{{- if eq .name "redis" }}
|
||||||
|
command: ["/bin/sh"]
|
||||||
|
args:
|
||||||
|
- "-c"
|
||||||
|
- "redis-server --requirepass {{ $root.Values.sharedInfra.redis.password }} --save 60 1"
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .name "mongo" }}
|
||||||
|
env:
|
||||||
|
- name: MONGO_INITDB_ROOT_USERNAME
|
||||||
|
value: "{{ $root.Values.sharedInfra.mongo.username }}"
|
||||||
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||||
|
value: "{{ $root.Values.sharedInfra.mongo.password }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .name "messaging" }}
|
||||||
|
env:
|
||||||
|
- name: RABBITMQ_DEFAULT_USER
|
||||||
|
value: "{{ $root.Values.sharedInfra.rabbitmq.username }}"
|
||||||
|
- name: RABBITMQ_DEFAULT_PASS
|
||||||
|
value: "{{ $root.Values.sharedInfra.rabbitmq.password }}"
|
||||||
|
{{- end }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: {{ .mountPath }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .name }}-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ .name }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: {{ .name }}
|
||||||
|
ports:
|
||||||
|
- name: tcp
|
||||||
|
port: {{ .port }}
|
||||||
|
targetPort: tcp
|
||||||
|
protocol: TCP
|
||||||
|
{{- if eq .name "messaging" }}
|
||||||
|
- name: management
|
||||||
|
port: 15672
|
||||||
|
targetPort: 15672
|
||||||
|
protocol: TCP
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
registry: 192.168.1.105:8888/mixingx
|
||||||
|
tag: latest
|
||||||
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
|
storage:
|
||||||
|
className: local-path
|
||||||
|
|
||||||
|
sharedInfra:
|
||||||
|
postgres:
|
||||||
|
image: docker.io/library/postgres:17
|
||||||
|
username: postgres
|
||||||
|
password: "Admin12345"
|
||||||
|
port: 5432
|
||||||
|
redis:
|
||||||
|
host: redis-service
|
||||||
|
port: 6379
|
||||||
|
password: "Admin12345"
|
||||||
|
rabbitmq:
|
||||||
|
host: messaging-service
|
||||||
|
port: 5672
|
||||||
|
username: guest
|
||||||
|
password: guest
|
||||||
|
mongo:
|
||||||
|
host: mongo-service
|
||||||
|
port: 27017
|
||||||
|
username: admin
|
||||||
|
password: "Admin12345"
|
||||||
|
database: mixingx_audit
|
||||||
|
otlp:
|
||||||
|
endpoint: http://k8s-dashboard-service:18889
|
||||||
|
protocol: grpc
|
||||||
|
|
||||||
|
tier:
|
||||||
|
enabled: false
|
||||||
|
nodeLabel: mixingx.io/tier
|
||||||
|
services:
|
||||||
|
sharedDatastores: { mode: required, tiers: [infra] }
|
||||||
|
|
||||||
|
sharedDatastores:
|
||||||
|
- name: redis
|
||||||
|
image: docker.io/library/redis:8.6
|
||||||
|
port: 6379
|
||||||
|
storage: 2Gi
|
||||||
|
mountPath: /data
|
||||||
|
- name: mongo
|
||||||
|
image: docker.io/library/mongo:8.3
|
||||||
|
port: 27017
|
||||||
|
storage: 5Gi
|
||||||
|
mountPath: /data/db
|
||||||
|
- name: messaging
|
||||||
|
image: docker.io/library/rabbitmq:4.3-management
|
||||||
|
port: 5672
|
||||||
|
storage: 2Gi
|
||||||
|
mountPath: /var/lib/rabbitmq
|
||||||
@@ -23,9 +23,10 @@ spec:
|
|||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ toYaml . | nindent 8 }}
|
{{ toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- $proto := index .Values.images.protocol .Values.type }}
|
||||||
containers:
|
containers:
|
||||||
- name: protocol-server
|
- name: protocol-server
|
||||||
image: {{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }}
|
image: {{ .Values.registry }}/{{ $proto.repository | default .Values.image }}:{{ $proto.tag | default .Values.tag | default "latest" }}
|
||||||
imagePullPolicy: {{ .Values.imagePullPolicy }}
|
imagePullPolicy: {{ .Values.imagePullPolicy }}
|
||||||
args:
|
args:
|
||||||
- "--port"
|
- "--port"
|
||||||
|
|||||||
@@ -2,10 +2,21 @@ registry: 192.168.1.105:8888/mixingx
|
|||||||
tag: latest
|
tag: latest
|
||||||
timezone: Asia/Shanghai
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
|
# Legacy image override (kept for backward compatibility).
|
||||||
type: opcua
|
type: opcua
|
||||||
image: opcua
|
image: opcua
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
# New structured image lookup per protocol type. Empty tag falls back to
|
||||||
|
# top-level .Values.tag then "latest".
|
||||||
|
images:
|
||||||
|
protocol:
|
||||||
|
opcua: { repository: opcua, tag: "" }
|
||||||
|
modbus: { repository: modbus, tag: "" }
|
||||||
|
ads: { repository: ads, tag: "" }
|
||||||
|
s7: { repository: s7, tag: "" }
|
||||||
|
s7-diecast: { repository: s7-diecast, tag: "" }
|
||||||
|
|
||||||
port: 4840
|
port: 4840
|
||||||
scene: /scenes/opcua/all-types-write.json
|
scene: /scenes/opcua/all-types-write.json
|
||||||
args: []
|
args: []
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: mixingx-sso
|
||||||
|
description: MixingX SSO standalone release (backend, web, and PostgreSQL).
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0.1"
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{{- define "mixingx-sso.storageClassName" -}}
|
||||||
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mixingx-sso.tierAffinity" -}}
|
||||||
|
{{- $root := .root -}}
|
||||||
|
{{- $role := .role -}}
|
||||||
|
{{- if and $root.Values.tier $root.Values.tier.enabled -}}
|
||||||
|
{{- $service := index $root.Values.tier.services $role -}}
|
||||||
|
{{- if $service }}
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
{{- if eq ($service.mode | default "preferred") "required" }}
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,240 @@
|
|||||||
|
{{- $root := . }}
|
||||||
|
{{- $name := .Values.sso.name }}
|
||||||
|
{{- $role := .Values.sso.role }}
|
||||||
|
{{- $webName := printf "%s-web" $name }}
|
||||||
|
{{- $serviceId := .Values.sso.serviceId }}
|
||||||
|
{{- $database := .Values.sso.database }}
|
||||||
|
{{- $pgHost := printf "%s-postgres-service" $name }}
|
||||||
|
{{- $backendPort := .Values.sso.port | default 8080 }}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-deployment
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/instance: {{ $root.Release.Name }}
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.sso.replicas | default 2 }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
spec:
|
||||||
|
{{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: {{ $name }}
|
||||||
|
image: {{ $root.Values.registry }}/{{ $root.Values.images.sso.repository | default "sso" }}:{{ $root.Values.images.sso.tag | default $root.Values.tag | default "latest" }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ $backendPort }}
|
||||||
|
protocol: TCP
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: {{ $name }}-config
|
||||||
|
- secretRef:
|
||||||
|
name: {{ $name }}-secrets
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}"
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 15
|
||||||
|
failureThreshold: 12
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /alive
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
failureThreshold: 8
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
mixingx.io/role: {{ $role }}
|
||||||
|
mixingx.io/node-id: {{ $name }}
|
||||||
|
annotations:
|
||||||
|
mixingx.io/description: {{ .Values.sso.description | quote }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ $backendPort }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-config
|
||||||
|
data:
|
||||||
|
HTTP_PORTS: "{{ $backendPort }}"
|
||||||
|
REDIS_HOST: "{{ $root.Values.sharedInfra.redis.host }}"
|
||||||
|
REDIS_PORT: "{{ $root.Values.sharedInfra.redis.port }}"
|
||||||
|
POSTGRESQL_HOST: "{{ $pgHost }}"
|
||||||
|
POSTGRESQL_PORT: "{{ $root.Values.sharedInfra.postgres.port }}"
|
||||||
|
POSTGRESQL_USERNAME: "{{ $root.Values.sharedInfra.postgres.username }}"
|
||||||
|
MESSAGING_HOST: "{{ $root.Values.sharedInfra.rabbitmq.host }}"
|
||||||
|
MESSAGING_PORT: "{{ $root.Values.sharedInfra.rabbitmq.port }}"
|
||||||
|
MESSAGING_USERNAME: "{{ $root.Values.sharedInfra.rabbitmq.username }}"
|
||||||
|
services__gateway__http__0: "http://gateway-service:8080"
|
||||||
|
{{ upper $role }}_SERVICE_ID: "{{ $serviceId }}"
|
||||||
|
OTEL_EXPORTER_OTLP_ENDPOINT: "{{ $root.Values.sharedInfra.otlp.endpoint }}"
|
||||||
|
OTEL_EXPORTER_OTLP_PROTOCOL: "{{ $root.Values.sharedInfra.otlp.protocol }}"
|
||||||
|
OTEL_SERVICE_NAME: "{{ $name }}"
|
||||||
|
ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-secrets
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
ConnectionStrings__redis: "{{ $root.Values.sharedInfra.redis.host }}:{{ $root.Values.sharedInfra.redis.port }},password={{ $root.Values.sharedInfra.redis.password }}"
|
||||||
|
REDIS_PASSWORD: "{{ $root.Values.sharedInfra.redis.password }}"
|
||||||
|
REDIS_URI: "redis://:{{ $root.Values.sharedInfra.redis.password }}@{{ $root.Values.sharedInfra.redis.host }}:{{ $root.Values.sharedInfra.redis.port }}"
|
||||||
|
{{- if $database }}
|
||||||
|
ConnectionStrings__PostgreSQL: "Host={{ $pgHost }};Port={{ $root.Values.sharedInfra.postgres.port }};Username={{ $root.Values.sharedInfra.postgres.username }};Password={{ $root.Values.sharedInfra.postgres.password }};Database={{ $database }}"
|
||||||
|
POSTGRESQL_PASSWORD: "{{ $root.Values.sharedInfra.postgres.password }}"
|
||||||
|
POSTGRESQL_URI: "postgresql://{{ $root.Values.sharedInfra.postgres.username }}:{{ $root.Values.sharedInfra.postgres.password }}@{{ $pgHost }}:{{ $root.Values.sharedInfra.postgres.port }}/{{ $database }}"
|
||||||
|
POSTGRESQL_DATABASENAME: "{{ $database }}"
|
||||||
|
{{- end }}
|
||||||
|
ConnectionStrings__messaging: "amqp://{{ $root.Values.sharedInfra.rabbitmq.username }}:{{ $root.Values.sharedInfra.rabbitmq.password }}@{{ $root.Values.sharedInfra.rabbitmq.host }}:{{ $root.Values.sharedInfra.rabbitmq.port }}"
|
||||||
|
MESSAGING_PASSWORD: "{{ $root.Values.sharedInfra.rabbitmq.password }}"
|
||||||
|
MESSAGING_URI: "amqp://{{ $root.Values.sharedInfra.rabbitmq.username }}:{{ $root.Values.sharedInfra.rabbitmq.password }}@{{ $root.Values.sharedInfra.rabbitmq.host }}:{{ $root.Values.sharedInfra.rabbitmq.port }}"
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ $webName }}-deployment
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/instance: {{ $root.Release.Name }}
|
||||||
|
app.kubernetes.io/component: {{ $webName }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.sso.replicas | default 2 }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: {{ $webName }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ $webName }}
|
||||||
|
spec:
|
||||||
|
{{ include "mixingx-sso.tierAffinity" (dict "role" "web" "root" $root) | nindent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: {{ $webName }}
|
||||||
|
image: {{ $root.Values.registry }}/{{ $root.Values.images.ssoWeb.repository | default "sso-web" }}:{{ $root.Values.images.ssoWeb.tag | default $root.Values.tag | default "latest" }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}"
|
||||||
|
- name: VITE_BASE_PATH
|
||||||
|
value: "{{ .Values.sso.webBasePath }}"
|
||||||
|
- name: PORT
|
||||||
|
value: "80"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ $webName }}-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ $webName }}
|
||||||
|
mixingx.io/role: web
|
||||||
|
mixingx.io/node-id: {{ $webName }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: {{ $webName }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-postgres
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
spec:
|
||||||
|
serviceName: {{ $name }}-postgres-service
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: data
|
||||||
|
annotations:
|
||||||
|
helm.sh/resource-policy: keep
|
||||||
|
spec:
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
storageClassName: {{ include "mixingx-sso.storageClassName" $root }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.sso.pgStorage | default "5Gi" }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
spec:
|
||||||
|
{{ include "mixingx-sso.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: postgres
|
||||||
|
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
value: "{{ $root.Values.sharedInfra.postgres.password }}"
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
value: "{{ $database }}"
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
value: "{{ $root.Values.sharedInfra.postgres.username }}"
|
||||||
|
- name: PGDATA
|
||||||
|
value: /var/lib/postgresql/data/pgdata
|
||||||
|
ports:
|
||||||
|
- name: tcp
|
||||||
|
containerPort: {{ $root.Values.sharedInfra.postgres.port }}
|
||||||
|
protocol: TCP
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-postgres-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
ports:
|
||||||
|
- name: tcp
|
||||||
|
port: {{ $root.Values.sharedInfra.postgres.port }}
|
||||||
|
targetPort: tcp
|
||||||
|
protocol: TCP
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
registry: 192.168.1.105:8888/mixingx
|
||||||
|
tag: latest
|
||||||
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
|
storage:
|
||||||
|
className: local-path
|
||||||
|
|
||||||
|
sharedInfra:
|
||||||
|
postgres:
|
||||||
|
image: docker.io/library/postgres:17
|
||||||
|
username: postgres
|
||||||
|
password: "Admin12345"
|
||||||
|
port: 5432
|
||||||
|
redis:
|
||||||
|
host: redis-service
|
||||||
|
port: 6379
|
||||||
|
password: "Admin12345"
|
||||||
|
rabbitmq:
|
||||||
|
host: messaging-service
|
||||||
|
port: 5672
|
||||||
|
username: guest
|
||||||
|
password: guest
|
||||||
|
otlp:
|
||||||
|
endpoint: http://k8s-dashboard-service:18889
|
||||||
|
protocol: grpc
|
||||||
|
|
||||||
|
sso:
|
||||||
|
name: sso
|
||||||
|
role: sso
|
||||||
|
serviceId: sso
|
||||||
|
database: sso-db
|
||||||
|
pgStorage: 10Gi
|
||||||
|
replicas: 2
|
||||||
|
description: "统一登录"
|
||||||
|
webBasePath: /sso/
|
||||||
|
|
||||||
|
images:
|
||||||
|
sso:
|
||||||
|
repository: sso
|
||||||
|
tag: ""
|
||||||
|
ssoWeb:
|
||||||
|
repository: sso-web
|
||||||
|
tag: ""
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: mixingx-ultra
|
||||||
|
description: "MixingX Ultra dashboard standalone release: ultra backend, ultra web, and ultra PostgreSQL."
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0.1"
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{{- define "mixingx-ultra.storageClassName" -}}
|
||||||
|
{{- .Values.storage.className | default "local-path" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mixingx-ultra.tierAffinity" -}}
|
||||||
|
{{- $root := .root -}}
|
||||||
|
{{- $role := .role -}}
|
||||||
|
{{- if and $root.Values.tier $root.Values.tier.enabled -}}
|
||||||
|
{{- $service := index $root.Values.tier.services $role -}}
|
||||||
|
{{- if $service }}
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
{{- if eq ($service.mode | default "preferred") "required" }}
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: {{ $root.Values.tier.nodeLabel }}
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $service.tiers }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,243 @@
|
|||||||
|
{{- $root := . -}}
|
||||||
|
{{- $cfg := .Values.ultra -}}
|
||||||
|
{{- $name := $cfg.name -}}
|
||||||
|
{{- $role := $cfg.role -}}
|
||||||
|
{{- $serviceId := $cfg.serviceId -}}
|
||||||
|
{{- $database := $cfg.database -}}
|
||||||
|
{{- $pgStorage := $cfg.pgStorage -}}
|
||||||
|
{{- $replicas := $cfg.replicas -}}
|
||||||
|
{{- $description := $cfg.description -}}
|
||||||
|
{{- $webBasePath := $cfg.webBasePath -}}
|
||||||
|
{{- $port := 8080 -}}
|
||||||
|
{{- $webPort := 80 -}}
|
||||||
|
{{- $pgHost := printf "%s-postgres-service" $name -}}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-deployment
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/instance: {{ $root.Release.Name }}
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ $replicas | default 2 }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
spec:
|
||||||
|
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: {{ $name }}
|
||||||
|
image: {{ $root.Values.registry }}/{{ $root.Values.images.ultra.repository | default "ultra" }}:{{ $root.Values.images.ultra.tag | default $root.Values.tag | default "latest" }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ $port }}
|
||||||
|
protocol: TCP
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: {{ $name }}-config
|
||||||
|
- secretRef:
|
||||||
|
name: {{ $name }}-secrets
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}"
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 15
|
||||||
|
failureThreshold: 12
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /alive
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
failureThreshold: 8
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
mixingx.io/role: {{ $role }}
|
||||||
|
mixingx.io/node-id: {{ $name }}
|
||||||
|
annotations:
|
||||||
|
mixingx.io/description: {{ $description | quote }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: {{ $name }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ $port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-config
|
||||||
|
data:
|
||||||
|
HTTP_PORTS: "{{ $port }}"
|
||||||
|
REDIS_HOST: "{{ $root.Values.sharedInfra.redis.host }}"
|
||||||
|
REDIS_PORT: "{{ $root.Values.sharedInfra.redis.port }}"
|
||||||
|
POSTGRESQL_HOST: "{{ $pgHost }}"
|
||||||
|
POSTGRESQL_PORT: "{{ $root.Values.sharedInfra.postgres.port }}"
|
||||||
|
POSTGRESQL_USERNAME: "{{ $root.Values.sharedInfra.postgres.username }}"
|
||||||
|
MESSAGING_HOST: "{{ $root.Values.sharedInfra.rabbitmq.host }}"
|
||||||
|
MESSAGING_PORT: "{{ $root.Values.sharedInfra.rabbitmq.port }}"
|
||||||
|
MESSAGING_USERNAME: "{{ $root.Values.sharedInfra.rabbitmq.username }}"
|
||||||
|
services__gateway__http__0: "http://gateway-service:8080"
|
||||||
|
{{ upper $role }}_SERVICE_ID: "{{ $serviceId }}"
|
||||||
|
OTEL_EXPORTER_OTLP_ENDPOINT: "{{ $root.Values.sharedInfra.otlp.endpoint }}"
|
||||||
|
OTEL_EXPORTER_OTLP_PROTOCOL: "{{ $root.Values.sharedInfra.otlp.protocol }}"
|
||||||
|
OTEL_SERVICE_NAME: "{{ $name }}"
|
||||||
|
ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-secrets
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
ConnectionStrings__redis: "{{ $root.Values.sharedInfra.redis.host }}:{{ $root.Values.sharedInfra.redis.port }},password={{ $root.Values.sharedInfra.redis.password }}"
|
||||||
|
REDIS_PASSWORD: "{{ $root.Values.sharedInfra.redis.password }}"
|
||||||
|
REDIS_URI: "redis://:{{ $root.Values.sharedInfra.redis.password }}@{{ $root.Values.sharedInfra.redis.host }}:{{ $root.Values.sharedInfra.redis.port }}"
|
||||||
|
ConnectionStrings__PostgreSQL: "Host={{ $pgHost }};Port={{ $root.Values.sharedInfra.postgres.port }};Username={{ $root.Values.sharedInfra.postgres.username }};Password={{ $root.Values.sharedInfra.postgres.password }};Database={{ $database }}"
|
||||||
|
POSTGRESQL_PASSWORD: "{{ $root.Values.sharedInfra.postgres.password }}"
|
||||||
|
POSTGRESQL_URI: "postgresql://{{ $root.Values.sharedInfra.postgres.username }}:{{ $root.Values.sharedInfra.postgres.password }}@{{ $pgHost }}:{{ $root.Values.sharedInfra.postgres.port }}/{{ $database }}"
|
||||||
|
POSTGRESQL_DATABASENAME: "{{ $database }}"
|
||||||
|
ConnectionStrings__messaging: "amqp://{{ $root.Values.sharedInfra.rabbitmq.username }}:{{ $root.Values.sharedInfra.rabbitmq.password }}@{{ $root.Values.sharedInfra.rabbitmq.host }}:{{ $root.Values.sharedInfra.rabbitmq.port }}"
|
||||||
|
MESSAGING_PASSWORD: "{{ $root.Values.sharedInfra.rabbitmq.password }}"
|
||||||
|
MESSAGING_URI: "amqp://{{ $root.Values.sharedInfra.rabbitmq.username }}:{{ $root.Values.sharedInfra.rabbitmq.password }}@{{ $root.Values.sharedInfra.rabbitmq.host }}:{{ $root.Values.sharedInfra.rabbitmq.port }}"
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-web-deployment
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/instance: {{ $root.Release.Name }}
|
||||||
|
app.kubernetes.io/component: {{ $name }}-web
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}-web
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}-web
|
||||||
|
spec:
|
||||||
|
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: {{ $name }}-web
|
||||||
|
image: {{ $root.Values.registry }}/{{ $root.Values.images.ultraWeb.repository | default "ultra-web" }}:{{ $root.Values.images.ultraWeb.tag | default $root.Values.tag | default "latest" }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ $webPort }}
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}"
|
||||||
|
- name: VITE_BASE_PATH
|
||||||
|
value: "{{ $webBasePath }}"
|
||||||
|
- name: PORT
|
||||||
|
value: "{{ $webPort }}"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-web-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ $name }}-web
|
||||||
|
mixingx.io/role: web
|
||||||
|
mixingx.io/node-id: {{ $name }}-web
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: {{ $name }}-web
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ $webPort }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-postgres
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
spec:
|
||||||
|
serviceName: {{ $name }}-postgres-service
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: data
|
||||||
|
annotations:
|
||||||
|
helm.sh/resource-policy: keep
|
||||||
|
spec:
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
storageClassName: {{ include "mixingx-ultra.storageClassName" $root }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ $pgStorage | default "5Gi" }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
spec:
|
||||||
|
{{ include "mixingx-ultra.tierAffinity" (dict "role" $role "root" $root) | nindent 6 }}
|
||||||
|
containers:
|
||||||
|
- name: postgres
|
||||||
|
image: {{ $root.Values.sharedInfra.postgres.image | default "docker.io/library/postgres:17" }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
value: "{{ $root.Values.sharedInfra.postgres.password }}"
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
value: "{{ $database }}"
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
value: "{{ $root.Values.sharedInfra.postgres.username }}"
|
||||||
|
- name: PGDATA
|
||||||
|
value: /var/lib/postgresql/data/pgdata
|
||||||
|
ports:
|
||||||
|
- name: tcp
|
||||||
|
containerPort: {{ $root.Values.sharedInfra.postgres.port }}
|
||||||
|
protocol: TCP
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ $name }}-postgres-service
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mixingx
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: {{ $name }}-postgres
|
||||||
|
ports:
|
||||||
|
- name: tcp
|
||||||
|
port: {{ $root.Values.sharedInfra.postgres.port }}
|
||||||
|
targetPort: tcp
|
||||||
|
protocol: TCP
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
registry: 192.168.1.105:8888/mixingx
|
||||||
|
tag: latest
|
||||||
|
timezone: Asia/Shanghai
|
||||||
|
|
||||||
|
storage:
|
||||||
|
className: local-path
|
||||||
|
|
||||||
|
sharedInfra:
|
||||||
|
postgres:
|
||||||
|
image: docker.io/library/postgres:17
|
||||||
|
username: postgres
|
||||||
|
password: "Admin12345"
|
||||||
|
port: 5432
|
||||||
|
redis:
|
||||||
|
host: redis-service
|
||||||
|
port: 6379
|
||||||
|
password: "Admin12345"
|
||||||
|
rabbitmq:
|
||||||
|
host: messaging-service
|
||||||
|
port: 5672
|
||||||
|
username: guest
|
||||||
|
password: guest
|
||||||
|
otlp:
|
||||||
|
endpoint: http://k8s-dashboard-service:18889
|
||||||
|
protocol: grpc
|
||||||
|
|
||||||
|
images:
|
||||||
|
ultra:
|
||||||
|
repository: ultra
|
||||||
|
tag: ""
|
||||||
|
ultraWeb:
|
||||||
|
repository: ultra-web
|
||||||
|
tag: ""
|
||||||
|
|
||||||
|
ultra:
|
||||||
|
name: ultra
|
||||||
|
role: ultra
|
||||||
|
serviceId: ultra
|
||||||
|
database: ultra-db
|
||||||
|
pgStorage: 10Gi
|
||||||
|
replicas: 2
|
||||||
|
description: "Ultra 看板"
|
||||||
|
webBasePath: /ultra/
|
||||||
Reference in new issue
Block a user