Created
January 6, 2023 18:44
-
-
Save Tang8330/2da623dc900330e566db4db69d4b8095 to your computer and use it in GitHub Desktop.
[Helm] Vanilla Chart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: {{ include "k8s.fullname" . }} | |
labels: | |
{{- include "k8s.labels" . | nindent 4 }} | |
spec: | |
{{- if not .Values.autoscaling.enabled }} | |
replicas: {{ .Values.replicaCount }} | |
{{- end }} | |
selector: | |
matchLabels: | |
{{- include "k8s.selectorLabels" . | nindent 6 }} | |
template: | |
metadata: | |
{{- with .Values.podAnnotations }} | |
annotations: | |
{{- toYaml . | nindent 8 }} | |
{{- end }} | |
labels: | |
{{- include "k8s.selectorLabels" . | nindent 8 }} | |
spec: | |
{{- with .Values.imagePullSecrets }} | |
imagePullSecrets: | |
{{- toYaml . | nindent 8 }} | |
{{- end }} | |
serviceAccountName: {{ include "k8s.serviceAccountName" . }} | |
securityContext: | |
{{- toYaml .Values.podSecurityContext | nindent 8 }} | |
containers: | |
- name: {{ .Chart.Name }} | |
securityContext: | |
{{- toYaml .Values.securityContext | nindent 12 }} | |
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | |
imagePullPolicy: {{ .Values.image.pullPolicy }} | |
ports: | |
- name: http | |
containerPort: {{ .Values.service.port }} | |
protocol: TCP | |
livenessProbe: | |
httpGet: | |
path: / | |
port: http | |
readinessProbe: | |
httpGet: | |
path: / | |
port: http | |
resources: | |
{{- toYaml .Values.resources | nindent 12 }} | |
{{- with .Values.nodeSelector }} | |
nodeSelector: | |
{{- toYaml . | nindent 8 }} | |
{{- end }} | |
{{- with .Values.affinity }} | |
affinity: | |
{{- toYaml . | nindent 8 }} | |
{{- end }} | |
{{- with .Values.tolerations }} | |
tolerations: | |
{{- toYaml . | nindent 8 }} | |
{{- end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment