Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions helm/kmcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ The following table lists the configurable parameters of the KMCP chart and thei
| `securityContext.allowPrivilegeEscalation` | Allow privilege escalation | `false` |
| `securityContext.capabilities.drop` | Capabilities to drop | `["ALL"]` |

### Annotations Configuration

| Parameter | Description | Default |
|-----------|-------------|---------|
| `annotations` | Additional annotations applied to the Deployment `metadata.annotations` | `{}` |
| `controller.annotations` | Controller-specific annotations that override `annotations` on key collision | `{}` |
| `podAnnotations` | Annotations applied to the controller Pod template (`spec.template.metadata.annotations`) | `{}` |
| `serviceAccount.annotations` | Annotations applied to the ServiceAccount resource | `{}` |

### Service Configuration

| Parameter | Description | Default |
Expand Down
5 changes: 5 additions & 0 deletions helm/kmcp/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ kind: Deployment
metadata:
name: {{ include "kmcp.fullname" . }}-controller-manager
namespace: {{ include "kmcp.namespace" . }}
{{- $annotations := mergeOverwrite (dict) (default dict .Values.annotations) (default dict .Values.controller.annotations) }}
{{- if $annotations }}
annotations:
{{- toYaml $annotations | nindent 4 }}
{{- end }}
labels:
{{- include "kmcp.labels" . | nindent 4 }}
spec:
Expand Down
37 changes: 37 additions & 0 deletions helm/kmcp/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,43 @@ tests:
count: 1
- matchSnapshot: {}

- it: should set global annotations on deployment
template: deployment.yaml
set:
annotations:
app.kubernetes.io/managed-by: "custom"
image.repository: test-repo
image.tag: v1.0.0
asserts:
- hasDocuments:
count: 1
- isSubset:
path: metadata.annotations
content:
app.kubernetes.io/managed-by: "custom"

- it: should set controller annotations on deployment and override global ones
template: deployment.yaml
set:
annotations:
global-key: "global-value"
shared-key: "global-wins"
controller:
annotations:
controller-key: "controller-value"
shared-key: "controller-wins"
image.repository: test-repo
image.tag: v1.0.0
asserts:
- hasDocuments:
count: 1
- isSubset:
path: metadata.annotations
content:
global-key: "global-value"
controller-key: "controller-value"
shared-key: "controller-wins"

- it: should include image pull secrets when specified
template: deployment.yaml
set:
Expand Down
6 changes: 6 additions & 0 deletions helm/kmcp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ controller:

env: []

# -- Additional annotations to add to the controller Deployment metadata
annotations: {}

# -- Additional annotations to add to all Kubernetes deployment resources
annotations: {}

# Pod annotations
podAnnotations: {}

Expand Down