Skip to content

Commit

Permalink
cmd/k8s-operator/deploy: allow modifying operator tags via Helm values
Browse files Browse the repository at this point in the history
Updates tailscale#10659

Signed-off-by: Chandon Pierre <cpierre@coreweave.com>
  • Loading branch information
ChandonPierre committed Jan 19, 2024
1 parent 2ac7c01 commit 2ce596e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd/k8s-operator/deploy/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ spec:
image: {{ .Values.operatorConfig.image.repo }}{{- if .Values.operatorConfig.image.digest -}}{{ printf "@%s" .Values.operatorConfig.image.digest}}{{- else -}}{{ printf "%s" $operatorTag }}{{- end }}
imagePullPolicy: {{ .Values.operatorConfig.image.pullPolicy }}
env:
- name: OPERATOR_INITIAL_TAGS
value: {{ join "," .Values.operatorConfig.defaultTags }}
- name: OPERATOR_HOSTNAME
value: {{ .Values.operatorConfig.hostname }}
- name: OPERATOR_SECRET
Expand Down
7 changes: 7 additions & 0 deletions cmd/k8s-operator/deploy/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ oauth: {}
installCRDs: "true"

operatorConfig:
# ACL tag that operator will be tagged with. Operator must be made owner of
# these tags
# https://tailscale.com/kb/1236/kubernetes-operator/?q=operator#setting-up-the-kubernetes-operator
# Multiple tags are defined as array items and passed to the operator as a comma-separated string
defaultTags:
- "tag:k8s-operator"

image:
repo: tailscale/k8s-operator
# Digest will be prioritized over tag. If neither are set appVersion will be
Expand Down
2 changes: 2 additions & 0 deletions cmd/k8s-operator/deploy/manifests/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ spec:
spec:
containers:
- env:
- name: OPERATOR_INITIAL_TAGS
value: tag:k8s-operator
- name: OPERATOR_HOSTNAME
value: tailscale-operator
- name: OPERATOR_SECRET
Expand Down
2 changes: 1 addition & 1 deletion docs/windows/policy/tailscale.admx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<policyDefinitions revision="1.0" schemaVersion="1.0"
xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions">
<policyNamespaces>
Expand Down

0 comments on commit 2ce596e

Please sign in to comment.