Files
mixingx.hub.chart/release-charts/mixingx-protocol-server-unit/templates/unit.yaml
T
ximenchuifeng 601151bfae feat(delivery): 全 chart 支持 imagePullSecrets(默认空,内网零变化)+ 交付镜像清单
- 10 个 chart values 顶层加 imagePullSecrets: [](ADR-0066)
- 27 处 Pod spec 注入 with 块;platform _workloads.tpl 用 $root 上下文
- 默认渲染与改动前 bit 级一致(helm template 验证);注入测试 10/10 通过
- delivery/image-manifest.yaml: 第三方镜像 ACR 核对清单(nanomq 为当前缺口)
2026-08-22 13:06:46 +08:00

73 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: mixingx-protocol-server
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: {{ .Values.type | quote }}
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: mixingx-protocol-server
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: mixingx-protocol-server
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: {{ .Values.type | quote }}
spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- $proto := index .Values.images.protocol .Values.type }}
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: protocol-server
image: {{ .Values.registry }}/{{ $proto.repository | default .Values.image }}:{{ $proto.tag | default .Values.tag | default "latest" }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--port"
- "{{ .Values.port }}"
- "--scene"
- "{{ .Values.scene }}"
{{- range .Values.args }}
- {{ . | quote }}
{{- end }}
env:
- name: TZ
value: {{ .Values.timezone | quote }}
ports:
- name: tcp
containerPort: {{ .Values.port }}
protocol: TCP
{{- with .Values.resources }}
resources:
{{ toYaml . | nindent 12 }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: mixingx-protocol-server
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: {{ .Values.type | quote }}
spec:
type: {{ .Values.service.type }}
selector:
app.kubernetes.io/name: mixingx-protocol-server
app.kubernetes.io/instance: {{ .Release.Name }}
ports:
- name: tcp
port: {{ .Values.port }}
targetPort: tcp
protocol: TCP