Skip to content
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: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ helm-generate: manifests kubebuilder ## Regenerate Helm chart from kustomize
# Fix generated files that kubebuilder doesn't template correctly
$(SED) -i 's/team-operator-metrics-service/{{ .Values.controllerManager.serviceAccountName }}-metrics-service/g' dist/chart/templates/certmanager/certificate.yaml
$(SED) -i 's/team-operator-controller-manager-metrics-service/{{ .Values.controllerManager.serviceAccountName }}-metrics-service/g' dist/chart/templates/metrics/metrics-service.yaml
# Fix RoleBinding namespace to use watchNamespace value
$(SED) -i '/kind: RoleBinding/,/roleRef:/{s/namespace: posit-team/namespace: {{ .Values.watchNamespace }}/}' dist/chart/templates/rbac/role_binding.yaml
# Remove kubebuilder-generated test workflow - we use our own CI workflows
rm -f .github/workflows/test-chart.yml

Expand Down
5 changes: 1 addition & 4 deletions config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ metadata:
app.kubernetes.io/part-of: team-operator
app.kubernetes.io/managed-by: kustomize
name: manager-rolebinding
# NOTE: The namespace will be set via kustomize to `posit-team-system` but we need this
# role binding to be in the `posit-team` "watch namespace". I haven't figured out how to
# do this directly in the kustomize layer, but we have an opportunity to patch arbitrary
# things in pulumi, so that's where this will get patched before apply. ~ @meatballhat
namespace: posit-team
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand Down
5 changes: 1 addition & 4 deletions dist/chart/templates/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: team-operator-manager-rolebinding
# NOTE: The namespace will be set via kustomize to `posit-team-system` but we need this
# role binding to be in the `posit-team` "watch namespace". I haven't figured out how to
# do this directly in the kustomize layer, but we have an opportunity to patch arbitrary
# things in pulumi, so that's where this will get patched before apply. ~ @meatballhat
namespace: {{ .Values.watchNamespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand Down