Skip to content

Instantly share code, notes, and snippets.

@kenmazaika
Created April 21, 2020 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenmazaika/3ccb26a03bd6ed6f09144b26d1435cd9 to your computer and use it in GitHub Desktop.
Save kenmazaika/3ccb26a03bd6ed6f09144b26d1435cd9 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "helm-chart.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "helm-chart.name" . }}
helm.sh/chart: {{ include "helm-chart.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "helm-chart.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
annotations:
timestamp: "{{ date "20060102150405" .Release.Time }}"
labels:
app.kubernetes.io/name: {{ include "helm-chart.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
# serviceAccountName: internal-app
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
volumeMounts:
- name: kubernetes-secrets-metropolis-database-credentials
mountPath: "/kubernetes-secrets/metropolis-database-credentials"
readOnly: true
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.targetPort }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
imagePullSecrets:
- name: gcr-docker-configuration
volumes:
- name: kubernetes-secrets-metropolis-database-credentials # Map to Volume Mount Name
secret:
secretName: metropolis-database-credentials # Map to Kubernetes Secret Key Name
nodeSelector:
{{- 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