diff --git a/release-charts/mixingx-protocol-server-unit/Chart.yaml b/release-charts/mixingx-protocol-server-unit/Chart.yaml new file mode 100644 index 0000000..a04615a --- /dev/null +++ b/release-charts/mixingx-protocol-server-unit/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: mixingx-protocol-server-unit +description: Deploy one MixingX edge protocol test server instance. +type: application +version: 0.1.0 +appVersion: "1.0.0" diff --git a/release-charts/mixingx-protocol-server-unit/templates/unit.yaml b/release-charts/mixingx-protocol-server-unit/templates/unit.yaml new file mode 100644 index 0000000..e6a5663 --- /dev/null +++ b/release-charts/mixingx-protocol-server-unit/templates/unit.yaml @@ -0,0 +1,67 @@ +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 }} + containers: + - name: protocol-server + image: {{ .Values.registry }}/{{ .Values.image }}:{{ .Values.tag }} + 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 diff --git a/release-charts/mixingx-protocol-server-unit/values.yaml b/release-charts/mixingx-protocol-server-unit/values.yaml new file mode 100644 index 0000000..02a3c93 --- /dev/null +++ b/release-charts/mixingx-protocol-server-unit/values.yaml @@ -0,0 +1,18 @@ +registry: 192.168.1.105:8888/mixingx +tag: latest +timezone: Asia/Shanghai + +type: opcua +image: opcua +imagePullPolicy: IfNotPresent + +port: 4840 +scene: /scenes/opcua/all-types-write.json +args: [] + +nodeSelector: {} + +service: + type: ClusterIP + +resources: {}