Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional envFrom.secretRef to deploment for credentials #13

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

foot
Copy link
Collaborator

@foot foot commented Oct 23, 2023

  • Called "provider-credentials"
  • It ends up in the helm-chart
  • Name is not configurable.
$ make helm
test -s /Users/simon/weave/cluster-reflector-controller/bin/controller-gen && /Users/simon/weave/cluster-reflector-controller/bin/controller-gen --version | grep -q v0.13.0 || \
	GOBIN=/Users/simon/weave/cluster-reflector-controller/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.13.0
/Users/simon/weave/cluster-reflector-controller/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/Users/simon/weave/cluster-reflector-controller/bin/kustomize build config/default | /Users/simon/weave/cluster-reflector-controller/bin/helmify -crd-dir charts/cluster-reflector-controller
# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.

$ ag -C10 secretRef charts/cluster-reflector-controller/templates/deployment.yaml
48-          10 }}
49-        securityContext: {{- toYaml .Values.controllerManager.kubeRbacProxy.containerSecurityContext
50-          | nindent 10 }}
51-      - args: {{- toYaml .Values.controllerManager.manager.args | nindent 8 }}
52-        command:
53-        - /manager
54-        env:
55-        - name: KUBERNETES_CLUSTER_DOMAIN
56-          value: {{ quote .Values.kubernetesClusterDomain }}
57-        envFrom:
58:        - secretRef:
59-            name: provider-credentials
60-            optional: true
61-        image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag
62-          | default .Chart.AppVersion }}
63-        livenessProbe:
64-          httpGet:
65-            path: /healthz
66-            port: 8081
67-          initialDelaySeconds: 15
68-          periodSeconds: 20

@foot foot requested a review from bigkevmcd October 23, 2023 10:33
@foot foot merged commit 2c2d10a into main Oct 23, 2023
3 checks passed
@foot foot deleted the adds-optional-env-secret branch October 23, 2023 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants