Skip to content

Commit

Permalink
helm: configure cilium-operator managing identities
Browse files Browse the repository at this point in the history
Add new helm value identityManagementMode that is an enum of:
* "agent": cilium-agent manages identities (current default).
* "operator": cilium-operator manages identities.
* "both": migration mode where both agent and operator manage identities.

When operator manages identities, its cluster role adds "create" permission
for CiliumIdentity.

Signed-off-by: Will Daly <[email protected]>
  • Loading branch information
wedaly authored and dlapcevic committed Jan 27, 2025
1 parent bc4b71e commit 7a967b3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Documentation/helm-values.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions install/kubernetes/cilium/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions install/kubernetes/cilium/templates/cilium-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,8 @@ data:
{{- end }}
{{- end }}

identity-management-mode: {{ .Values.identityManagementMode | quote }}

{{- if hasKey .Values "enableK8sTerminatingEndpoint" }}
enable-k8s-terminating-endpoint: {{ .Values.enableK8sTerminatingEndpoint | quote }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ rules:
verbs:
# To synchronize garbage collection of such resources
- update
{{- if (or (eq .Values.identityManagementMode "operator") (eq .Values.identityManagementMode "both")) }}
- create
{{- end }}
- apiGroups:
- cilium.io
resources:
Expand Down
7 changes: 7 additions & 0 deletions install/kubernetes/cilium/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3600,6 +3600,13 @@
"identityChangeGracePeriod": {
"type": "string"
},
"identityManagementMode": {
"enum": [
"agent",
"operator",
"both"
]
},
"image": {
"properties": {
"digest": {
Expand Down
7 changes: 7 additions & 0 deletions install/kubernetes/cilium/values.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions install/kubernetes/cilium/values.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,14 @@ ciliumEndpointSlice:
# fcfs groups together CiliumEndpoints in a first-come-first-serve basis, filling in the largest non-full slice first.
sliceMode: identity

# @schema
# enum: ["agent", "operator", "both"]
# @schema
# -- Control whether CiliumIdentities are created by the agent ("agent"), the operator ("operator") or both ("both").
# "Both" should be used only to migrate between "agent" and "operator".
# Operator-managed identities is a beta feature.
identityManagementMode: "agent"

envoyConfig:
# -- Enable CiliumEnvoyConfig CRD
# CiliumEnvoyConfig CRD can also be implicitly enabled by other options.
Expand Down

0 comments on commit 7a967b3

Please sign in to comment.