Files
charts/bitnami/harbor/templates/portal/portal-dpl.yaml
T

72 lines
2.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ template "harbor.portal" . }}"
labels:
{{- include "harbor.labels" . | nindent 4 }}
app.kubernetes.io/component: portal
spec:
replicas: {{ .Values.portal.replicas }}
selector:
matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: portal
template:
metadata:
labels:
{{ include "harbor.labels" . | nindent 8 }}
app.kubernetes.io/component: portal
annotations:
{{- if .Values.portal.podAnnotations }}
{{ toYaml .Values.portal.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
containers:
- name: portal
image: "{{ template "harbor.portalImage" . }}"
imagePullPolicy: {{ .Values.portalImage.pullPolicy | quote }}
{{- if .Values.portal.resources }}
resources: {{ toYaml .Values.portal.resources | nindent 10 }}
{{- end }}
{{- if .Values.portal.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: {{ .Values.portal.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.portal.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.portal.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.portal.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.portal.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.portal.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: {{ .Values.portal.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.portal.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.portal.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.portal.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.portal.readinessProbe.failureThreshold }}
{{- end }}
env:
- name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.portalImage.debug | quote }}
ports:
- containerPort: 8080
name: http
{{- with .Values.portal.nodeSelector }}
nodeSelector: {{ tpl (toYaml .) $ | indent 8 }}
{{- end }}
{{- with .Values.portal.affinity }}
affinity: {{ tpl (toYaml .) $ | indent 8 }}
{{- end }}
{{- with .Values.portal.tolerations }}
tolerations: {{ tpl (toYaml .) $ | indent 8 }}
{{- end }}