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

Watch .Release.Namespace by default #32

Merged
merged 2 commits into from
Apr 23, 2021
Merged
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
2 changes: 1 addition & 1 deletion connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ $ helm install --set connect.applicationName=connect connect ./connect
| operator.token.key | string | `"token"` | The key for the 1Password Connect token stored in the 1Password token secret |
| operator.token.name | string | `"onepassword-token"` | The name of Kubernetes Secret containing the 1Password Connect API token |
| operator.token.value | string | `"onepassword-token"` | An API token generated for 1Password Connect to be used by the Connect Operator |
| operator.watchNamespace | {} | .Release.Namespace | A list of Namespaces for the 1Password Connect Operator to watch and manage |
| operator.watchNamespace | {} | [`{{ .Release.Namespace }}`] | A list of Namespaces for the 1Password Connect Operator to watch and manage |
2 changes: 1 addition & 1 deletion connect/templates/operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
command: ["/manager"]
env:
- name: WATCH_NAMESPACE
value: {{ include "helm-toolkit.utils.joinListWithComma" .Values.operator.watchNamespace | default .Release.Namespace }}
value: {{ tpl (include "helm-toolkit.utils.joinListWithComma" .Values.operator.watchNamespace) . }}
- name: POD_NAME
valueFrom:
fieldRef:
Expand Down
3 changes: 2 additions & 1 deletion connect/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- $clusterRoleName := .Values.operator.clusterRole.name -}}
{{- $serviceAccountName := .Values.operator.serviceAccount.name -}}
{{- range $namespace := .Values.operator.watchNamespace }}
{{- $namespace = tpl $namespace $ -}}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
Expand All @@ -20,4 +21,4 @@ roleRef:
apiGroup: rbac.authorization.k8s.io
---
{{- end }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions connect/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ operator:
pollingInterval: 10
version: "1.0.0"
nodeSelector: {}
watchNamespace: []
watchNamespace:
- "{{ .Release.Namespace }}" # This will be interpolated in the templates, using the tpl function
token:
name: onepassword-token
key: token
Expand All @@ -50,4 +51,3 @@ operator:
service:
type: Nodeport
port: 8080