Skip to content

Commit a424176

Browse files
committed
add architecture configuration to mcp-operator helm chart
1 parent b24778e commit a424176

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: mcp-operator-config
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "mcp-operator.labels" . | nindent 4 }}
9+
data:
10+
config.yaml: |
11+
architecture:
12+
{{- if and .Values.architecture .Values.architecture.immutability }}
13+
immutability:
14+
{{- .Values.architecture.immutability | toYaml | nindent 8 }}
15+
{{- end }}
16+
{{- if and .Values.apiServer .Values.apiServer.architecture }}
17+
apiServer:
18+
version: {{ .Values.apiServer.architecture.version | default "v1" }}
19+
allowOverride: {{ .Values.apiServer.architecture.allowOverride | default false }}
20+
{{- end }}

charts/mcp-operator/templates/deployment.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ spec:
3030
checksum/co-clusters: {{ include (print $.Template.BasePath "/secrets-cloudorchestrator-clusters.yaml") . | sha256sum }}
3131
checksum/auth-config: {{ include (print $.Template.BasePath "/secret-auth-config.yaml") . | sha256sum }}
3232
checksum/authz-config: {{ include (print $.Template.BasePath "/secret-authz-config.yaml") . | sha256sum }}
33+
checksum/mcp-operator-config: {{ include (print $.Template.BasePath "/configmap-mcp-operator-config.yaml") . | sha256sum }}
3334
{{- with .Values.podAnnotations }}
3435
{{- toYaml . | nindent 8 }}
3536
{{- end }}
@@ -50,6 +51,7 @@ spec:
5051
command:
5152
- /mcp-operator
5253
- --controllers={{ include "mcp-operator.activeControllersString" .Values }}
54+
- --config=/etc/config/mcp-operator/config.yaml
5355
{{- if .Values.deployment.leaderElection.enabled }}
5456
- --leader-elect
5557
- --lease-namespace={{ .Values.deployment.leaderElection.leaseNamespace }}
@@ -140,6 +142,9 @@ spec:
140142
mountPath: /tmp/k8s-webhook-server/serving-certs/
141143
readOnly: true
142144
{{- end }}
145+
- name: mcp-operator-config
146+
mountPath: /etc/config/mcp-operator
147+
readOnly: true
143148
- name: common
144149
mountPath: /etc/config/common
145150
readOnly: true
@@ -247,6 +252,11 @@ spec:
247252
{{- end }}
248253
{{- end }}
249254
{{- end }}
255+
- name: mcp-operator-config
256+
projected:
257+
sources:
258+
- configMap:
259+
name: mcp-operator-config
250260
- name: common
251261
projected:
252262
sources:

charts/mcp-operator/values.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ clusters:
3232
# caData: ...
3333
# caConfigMapName: ...
3434

35-
35+
# architecture: # architecture configuration
36+
# immutability:
37+
# policyName: mcp-architecture-immutability # name of the ValidatingAdmissionPolicy to enforce architecture immutability
38+
# disabled: false # whether architecture immutability should be enforced (strongly recommended to leave this enabled)
3639

3740
crds:
3841
manage: true
@@ -53,6 +56,9 @@ managedcontrolplane:
5356

5457
apiserver:
5558
disabled: false
59+
# architecture:
60+
# version: v1
61+
# allowOverride: false
5662
worker:
5763
maxWorkers: 10
5864
intervalTime: 10s

0 commit comments

Comments
 (0)