Files
hrbox-helm-chart/.helm/templates/09-kedoca.yaml
T
2026-09-05 19:07:31 +06:00

80 lines
2.4 KiB
YAML

{{- $name := include "hrbox.component" (dict "ctx" . "name" "kedoca") -}}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $name }}
labels:
{{- include "hrbox.labels" (dict "ctx" . "name" "kedoca") | nindent 4 }}
spec:
minReadySeconds: 5
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
replicas: {{ .Values.app.replicas.kedoca }}
selector:
matchLabels:
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "kedoca") | nindent 6 }}
template:
metadata:
labels:
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "kedoca") | nindent 8 }}
app: kedoca
annotations:
checksum/app-secret: {{ include (print $.Template.BasePath "/00-app-secret.yaml") . | sha256sum }}
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- kedoca
topologyKey: kubernetes.io/hostname
{{- include "hrbox.imagePullSecrets" . | nindent 6 }}
containers:
- name: kedoca
image: {{ .Values.image.kedoca | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8558
env:
{{- include "envs_all" . | indent 12 }}
{{- include "envs_kedoca" . | indent 12 }}
{{- include "hrbox.resources" (dict "ctx" . "component" "kedoca") | indent 10 }}
{{- if .Values.app.kedoca.secretName }}
volumeMounts:
- name: ca-cert
mountPath: /ca-cert
{{- end }}
{{- if .Values.app.kedoca.secretName }}
volumes:
- name: ca-cert
secret:
secretName: {{ .Values.app.kedoca.secretName | quote }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ $name }}
labels:
{{- include "hrbox.labels" (dict "ctx" . "name" "kedoca") | nindent 4 }}
spec:
type: ClusterIP
selector:
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "kedoca") | nindent 4 }}
ports:
- name: http
port: 8558
targetPort: 8558
protocol: TCP