Files
openshift-mcp-server/templates/deployment.yaml
2025-12-29 14:25:55 +11:00

83 lines
2.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "kubernetes-mcp-server.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kubernetes-mcp-server.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "kubernetes-mcp-server.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- tpl (toYaml .) . | nindent 8 }}
{{- end }}
labels:
{{- include "kubernetes-mcp-server.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- tpl (toYaml .) . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- tpl (toYaml .) . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "kubernetes-mcp-server.serviceAccountName" . }}
securityContext:
{{- tpl (toYaml (default .Values.defaultPodSecurityContext .Values.podSecurityContext)) . | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- tpl (toYaml (default .Values.defaultSecurityContext .Values.securityContext)) . | nindent 12 }}
image: "{{ template "kubernetes-mcp-server.image" .Values.image }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
args:
- "--config"
- "{{ .Values.configFilePath }}"
{{- with .Values.livenessProbe }}
livenessProbe:
{{- tpl (toYaml .) . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
{{- tpl (toYaml .) . | nindent 12 }}
{{- end }}
{{- with .Values.resources }}
resources:
{{- tpl (toYaml .) . | nindent 12 }}
{{- end }}
volumeMounts:
- name: config
mountPath: {{ .Values.configFilePath | dir }}
{{- with .Values.extraVolumeMounts }}
{{- tpl (toYaml .) . | nindent 12 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ include "kubernetes-mcp-server.fullname" . }}
{{- with .Values.extraVolumes }}
{{- tpl (toYaml .) . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- tpl (toYaml .) . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- tpl (toYaml .) . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- tpl (toYaml .) . | nindent 8 }}
{{- end }}