github.com/sealerio/sealer@v0.11.1-0.20240507115618-f4f89c5853ae/build/layerutils/charts/testcharts/apps/templates/deployment.yaml (about) 1 # Copyright © 2022 Alibaba Group Holding Ltd. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 apiVersion: apps/v1 16 kind: Deployment 17 metadata: 18 name: {{ include "apps.fullname" . }} 19 labels: 20 {{- include "apps.labels" . | nindent 4 }} 21 spec: 22 {{- if not .Values.autoscaling.enabled }} 23 replicas: {{ .Values.replicaCount }} 24 {{- end }} 25 selector: 26 matchLabels: 27 {{- include "apps.selectorLabels" . | nindent 6 }} 28 template: 29 metadata: 30 {{- with .Values.podAnnotations }} 31 annotations: 32 {{- toYaml . | nindent 8 }} 33 {{- end }} 34 labels: 35 {{- include "apps.selectorLabels" . | nindent 8 }} 36 spec: 37 {{- with .Values.imagePullSecrets }} 38 imagePullSecrets: 39 {{- toYaml . | nindent 8 }} 40 {{- end }} 41 serviceAccountName: {{ include "apps.serviceAccountName" . }} 42 securityContext: 43 {{- toYaml .Values.podSecurityContext | nindent 8 }} 44 containers: 45 - name: {{ .Chart.Name }} 46 securityContext: 47 {{- toYaml .Values.securityContext | nindent 12 }} 48 image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 49 imagePullPolicy: {{ .Values.image.pullPolicy }} 50 ports: 51 - name: http 52 containerPort: 80 53 protocol: TCP 54 livenessProbe: 55 httpGet: 56 path: / 57 port: http 58 readinessProbe: 59 httpGet: 60 path: / 61 port: http 62 resources: 63 {{- toYaml .Values.resources | nindent 12 }} 64 {{- with .Values.nodeSelector }} 65 nodeSelector: 66 {{- toYaml . | nindent 8 }} 67 {{- end }} 68 {{- with .Values.affinity }} 69 affinity: 70 {{- toYaml . | nindent 8 }} 71 {{- end }} 72 {{- with .Values.tolerations }} 73 tolerations: 74 {{- toYaml . | nindent 8 }} 75 {{- end }}