You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
133 lines
5.1 KiB
133 lines
5.1 KiB
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "iceberg-catalog.fullname" . }}
|
|
{{- if .Values.catalog.annotations }}
|
|
annotations:
|
|
{{- toYaml .Values.catalog.annotations | nindent 4 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "iceberg-catalog.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: catalog
|
|
spec:
|
|
replicas: {{ .Values.catalog.replicas }}
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 25%
|
|
maxUnavailable: 0
|
|
selector:
|
|
matchLabels:
|
|
{{- include "iceberg-catalog.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: catalog
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/secret-config-envs: {{ include (print $.Template.BasePath "/config/secret-config-envs.yaml") . | sha256sum }}
|
|
{{- if .Values.catalog.podAnnotations -}}
|
|
{{- toYaml .Values.catalog.podAnnotations | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.catalog.safeToEvict }}
|
|
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
|
|
{{- end }}
|
|
{{- if .Values.catalog.prometheus.setScrapeAnnotations }}
|
|
prometheus.io/port: "9000"
|
|
prometheus.io/scrape: "true"
|
|
{{- end }}
|
|
labels:
|
|
{{- include "iceberg-catalog.labels" . | nindent 8 }}
|
|
app.kubernetes.io/component: catalog
|
|
{{- with .Values.catalog.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
restartPolicy: Always
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.catalog.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml .Values.catalog.nodeSelector | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.catalog.topologySpreadConstraints }}
|
|
topologySpreadConstraints:
|
|
{{- toYaml .Values.catalog.topologySpreadConstraints | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.catalog.affinity }}
|
|
affinity:
|
|
{{- toYaml .Values.catalog.affinity | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.catalog.tolerations }}
|
|
tolerations:
|
|
{{- toYaml .Values.catalog.tolerations | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.catalog.priorityClassName }}
|
|
priorityClassName: {{ .Values.catalog.priorityClassName | quote }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "iceberg-catalog.serviceAccountName" . }}
|
|
{{- if .Values.catalog.podSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml .Values.catalog.podSecurityContext | nindent 8 }}
|
|
{{- end }}
|
|
initContainers:
|
|
{{- if .Values.catalog.extraInitContainers }}
|
|
{{- toYaml .Values.catalog.extraInitContainers | nindent 8 }}
|
|
{{- end }}
|
|
{{- include "iceberg-catalog.init_container.check_db" (dict "Release" .Release "Values" .Values "Chart" .Chart "awaitMigration" true) | indent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
{{- include "iceberg-catalog.image" . | indent 10 }}
|
|
env:
|
|
{{- include "iceberg-catalog.env" . | indent 12 }}
|
|
envFrom:
|
|
{{- include "iceberg-catalog.envFrom" . | indent 12 }}
|
|
{{- if .Values.catalog.extraEnvFrom -}}
|
|
{{- toYaml .Values.catalog.extraEnvFrom | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8181
|
|
protocol: TCP
|
|
- name: metrics
|
|
containerPort: 9000
|
|
protocol: TCP
|
|
{{- if .Values.catalog.command }}
|
|
command:
|
|
{{- toYaml .Values.catalog.command | nindent 12 }}
|
|
{{- end }}
|
|
args:
|
|
- serve
|
|
{{- if .Values.catalog.livenessProbe.enabled }}
|
|
livenessProbe:
|
|
initialDelaySeconds: {{ .Values.catalog.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.catalog.livenessProbe.periodSeconds }}
|
|
failureThreshold: {{ .Values.catalog.livenessProbe.failureThreshold }}
|
|
timeoutSeconds: {{ .Values.catalog.livenessProbe.timeoutSeconds }}
|
|
httpGet:
|
|
path: /health
|
|
port: 8181
|
|
{{- end }}
|
|
{{- if .Values.catalog.readinessProbe.enabled }}
|
|
readinessProbe:
|
|
initialDelaySeconds: {{ .Values.catalog.readinessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.catalog.readinessProbe.periodSeconds }}
|
|
failureThreshold: {{ .Values.catalog.readinessProbe.failureThreshold }}
|
|
timeoutSeconds: {{ .Values.catalog.readinessProbe.timeoutSeconds }}
|
|
httpGet:
|
|
path: /health
|
|
port: 8181
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.catalog.resources | nindent 12 }}
|
|
{{- with .Values.catalog.extraVolumeMounts }}
|
|
volumeMounts:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.catalog.extraContainers }}
|
|
{{- toYaml .Values.catalog.extraContainers | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.catalog.extraVolumes }}
|
|
volumes:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
|