ktimoney | 2513eea | 2022-10-03 15:02:44 +0100 | [diff] [blame] | 1 | {{/* |
| 2 | # |
| 3 | # ============LICENSE_START======================================================= |
| 4 | # Copyright (C) 2022 Nordix Foundation. |
| 5 | # ================================================================================ |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ============LICENSE_END========================================================= |
| 20 | # |
| 21 | */}} |
| 22 | apiVersion: apps/v1 |
| 23 | kind: Deployment |
| 24 | metadata: |
| 25 | name: {{ include "rapp-helloworld-invoker1.fullname" . }} |
| 26 | labels: |
| 27 | {{- include "rapp-helloworld-invoker1.labels" . | nindent 4 }} |
| 28 | spec: |
| 29 | {{- if not .Values.autoscaling.enabled }} |
| 30 | replicas: {{ .Values.replicaCount }} |
| 31 | {{- end }} |
| 32 | selector: |
| 33 | matchLabels: |
| 34 | {{- include "rapp-helloworld-invoker1.selectorLabels" . | nindent 6 }} |
| 35 | template: |
| 36 | metadata: |
| 37 | {{- with .Values.podAnnotations }} |
| 38 | annotations: |
| 39 | {{- toYaml . | nindent 8 }} |
| 40 | {{- end }} |
| 41 | labels: |
| 42 | {{- include "rapp-helloworld-invoker1.selectorLabels" . | nindent 8 }} |
| 43 | spec: |
| 44 | {{- with .Values.imagePullSecrets }} |
| 45 | imagePullSecrets: |
| 46 | {{- toYaml . | nindent 8 }} |
| 47 | {{- end }} |
| 48 | serviceAccountName: {{ include "rapp-helloworld-invoker1.serviceAccountName" . }} |
| 49 | securityContext: |
| 50 | {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 51 | containers: |
| 52 | - name: {{ .Chart.Name }} |
| 53 | securityContext: |
| 54 | {{- toYaml .Values.securityContext | nindent 12 }} |
| 55 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 56 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 57 | command: ["/app/rapps-rapp-helloworld-invoker1"] |
| 58 | args: [ |
| 59 | "-securityEnabled", "{{ .Values.rapp.securityEnabled }}", |
| 60 | "-rapp", "{{ with index .Values.rapp.apps 0 }}{{ .prefix }}{{ end }}", |
| 61 | "-methods", "{{- range .Values.rapp.apps }}{{ join "," .methods }}{{- end }}" |
| 62 | ] |
| 63 | ports: |
| 64 | - name: http |
| 65 | containerPort: 9000 |
| 66 | protocol: TCP |
| 67 | livenessProbe: |
| 68 | httpGet: |
| 69 | path: /health |
| 70 | port: 9000 |
| 71 | initialDelaySeconds: 5 |
| 72 | periodSeconds: 60 |
| 73 | readinessProbe: |
| 74 | initialDelaySeconds: 5 |
| 75 | periodSeconds: 10 |
| 76 | exec: |
| 77 | command: ["stat", "init.txt"] |
| 78 | resources: |
| 79 | {{- toYaml .Values.resources | nindent 12 }} |
| 80 | {{- with .Values.nodeSelector }} |
| 81 | nodeSelector: |
| 82 | {{- toYaml . | nindent 8 }} |
| 83 | {{- end }} |
| 84 | {{- with .Values.affinity }} |
| 85 | affinity: |
| 86 | {{- toYaml . | nindent 8 }} |
| 87 | {{- end }} |
| 88 | {{- with .Values.tolerations }} |
| 89 | tolerations: |
| 90 | {{- toYaml . | nindent 8 }} |
| 91 | {{- end }} |