|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "tablestar-controller.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "tablestar-controller.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + replicas: 1 |
| 9 | + selector: |
| 10 | + matchLabels: |
| 11 | + {{- include "tablestar-controller.selectorLabels" . | nindent 6 }} |
| 12 | + template: |
| 13 | + metadata: |
| 14 | + annotations: |
| 15 | + checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} |
| 16 | + {{- with .Values.podAnnotations }} |
| 17 | + {{- toYaml . | nindent 8 }} |
| 18 | + {{- end }} |
| 19 | + labels: |
| 20 | + {{- include "tablestar-controller.labels" . | nindent 8 }} |
| 21 | + spec: |
| 22 | + {{- with .Values.imagePullSecrets }} |
| 23 | + imagePullSecrets: |
| 24 | + {{- toYaml . | nindent 8 }} |
| 25 | + {{- end }} |
| 26 | + containers: |
| 27 | + - name: tablestar-controller |
| 28 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 29 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 30 | + volumeMounts: |
| 31 | + - mountPath: /workspace/config |
| 32 | + name: config |
| 33 | + ports: |
| 34 | + - name: http |
| 35 | + containerPort: {{ .Values.service.httpPort }} |
| 36 | + protocol: TCP |
| 37 | + env: |
| 38 | + - name: JDK_JAVA_OPTIONS |
| 39 | + value: {{ .Values.javaOptions }} |
| 40 | + - name: SOPHORA_CLIENT_SERVERCONNECTION_USERNAME |
| 41 | + valueFrom: |
| 42 | + secretKeyRef: |
| 43 | + key: {{ .Values.sophora.authentication.secret.usernameKey | quote }} |
| 44 | + name: {{ required "A valid secret name must be provided in .Values.sophora.authentication.secret.name" .Values.sophora.authentication.secret.name | quote }} |
| 45 | + - name: SOPHORA_CLIENT_SERVERCONNECTION_PASSWORD |
| 46 | + valueFrom: |
| 47 | + secretKeyRef: |
| 48 | + key: {{ .Values.sophora.authentication.secret.passwordKey | quote }} |
| 49 | + name: {{ required "A valid secret name must be provided in .Values.sophora.authentication.secret.name" .Values.sophora.authentication.secret.name | quote }} |
| 50 | + - name: TZ |
| 51 | + value: {{ .Values.timeZone | quote }} |
| 52 | + {{- with .Values.livenessProbe }} |
| 53 | + livenessProbe: |
| 54 | + httpGet: |
| 55 | + path: /actuator/health |
| 56 | + port: http |
| 57 | + failureThreshold: {{ .failureThreshold }} |
| 58 | + initialDelaySeconds: {{ .initialDelaySeconds }} |
| 59 | + periodSeconds: {{ .periodSeconds }} |
| 60 | + timeoutSeconds: {{ .timeoutSeconds }} |
| 61 | + {{- end }} |
| 62 | + {{- with .Values.readinessProbe }} |
| 63 | + readinessProbe: |
| 64 | + httpGet: |
| 65 | + path: /actuator/health |
| 66 | + port: http |
| 67 | + failureThreshold: {{ .failureThreshold }} |
| 68 | + initialDelaySeconds: {{ .initialDelaySeconds }} |
| 69 | + periodSeconds: {{ .periodSeconds }} |
| 70 | + timeoutSeconds: {{ .timeoutSeconds }} |
| 71 | + {{- end }} |
| 72 | + {{- with .Values.startupProbe }} |
| 73 | + startupProbe: |
| 74 | + httpGet: |
| 75 | + path: /actuator/health |
| 76 | + port: http |
| 77 | + failureThreshold: {{ .failureThreshold }} |
| 78 | + initialDelaySeconds: {{ .initialDelaySeconds }} |
| 79 | + periodSeconds: {{ .periodSeconds }} |
| 80 | + timeoutSeconds: {{ .timeoutSeconds }} |
| 81 | + {{- end }} |
| 82 | + resources: |
| 83 | + {{- toYaml .Values.resources | nindent 12 }} |
| 84 | + volumes: |
| 85 | + - name: config |
| 86 | + configMap: |
| 87 | + name: {{ include "tablestar-controller.fullname" . }} |
0 commit comments