mirror of
https://github.com/bvanroll/example-node-project.git
synced 2025-08-30 04:12:44 +00:00
Draft create
This commit is contained in:
59
charts/frontend-node/templates/deployment.yaml
Executable file
59
charts/frontend-node/templates/deployment.yaml
Executable file
@@ -0,0 +1,59 @@
|
||||
{{- if .Values.knativeDeploy }}
|
||||
{{- else }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
draft: {{ default "draft-app" .Values.draft }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "fullname" . }}
|
||||
{{- if .Values.hpa.enabled }}
|
||||
{{- else }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
draft: {{ default "draft-app" .Values.draft }}
|
||||
app: {{ template "fullname" . }}
|
||||
{{- if .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
{{- range $pkey, $pval := .Values.env }}
|
||||
- name: {{ $pkey }}
|
||||
value: {{ quote $pval }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{ toYaml .Values.envFrom | indent 10 }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.internalPort }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.probePath }}
|
||||
port: {{ .Values.service.internalPort }}
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.probePath }}
|
||||
port: {{ .Values.service.internalPort }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
successThreshold: {{ .Values.readinessProbe.successThreshold }}
|
||||
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 12 }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user