freeleaps-ops/freeleaps-devops-reconciler/helm-pkg/reconciler/templates/deployment.yaml
zhenyus eae6ba99e2 refactor(devsvc): restructure reconciler Helm chart and remove deprecated files
- Deleted Jenkinsfile as CI/CD configuration is now handled differently.
- Updated Chart.yaml to reflect new service name and versioning.
- Enhanced values.yaml and values.alpha.yaml with comprehensive operator configuration and environment settings.
- Removed obsolete templates for deployment, service, ingress, and monitoring.
- Streamlined configuration for RabbitMQ, Jenkins, and ArgoCD integration.

Signed-off-by: zhenyus <zhenyus@mathmast.com>
2025-07-31 23:21:24 +08:00

93 lines
3.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "freeleaps-devops-reconciler.fullname" . }}
labels:
{{- include "freeleaps-devops-reconciler.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
strategy:
{{- toYaml .Values.strategy | nindent 4 }}
selector:
matchLabels:
{{- include "freeleaps-devops-reconciler.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
# Force pod restart on secret changes
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
labels:
{{- include "freeleaps-devops-reconciler.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "freeleaps-devops-reconciler.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ include "freeleaps-devops-reconciler.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.targetPort }}
protocol: TCP
env:
{{- include "freeleaps-devops-reconciler.env" . | nindent 12 }}
{{- if .Values.healthcheck.livenessProbe.enabled }}
livenessProbe:
{{- with .Values.healthcheck.livenessProbe.httpGet }}
httpGet:
{{- toYaml . | nindent 14 }}
{{- end }}
initialDelaySeconds: {{ .Values.healthcheck.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.healthcheck.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.healthcheck.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.healthcheck.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.healthcheck.readinessProbe.enabled }}
readinessProbe:
{{- with .Values.healthcheck.readinessProbe.httpGet }}
httpGet:
{{- toYaml . | nindent 14 }}
{{- end }}
initialDelaySeconds: {{ .Values.healthcheck.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.healthcheck.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.healthcheck.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.healthcheck.readinessProbe.failureThreshold }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
{{- if .Values.securityContext.readOnlyRootFilesystem }}
- name: tmp
mountPath: /tmp
- name: logs
mountPath: /app/logs
{{- end }}
volumes:
{{- if .Values.securityContext.readOnlyRootFilesystem }}
- name: tmp
emptyDir: {}
- name: logs
emptyDir: {}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}