Skip to content

feat: Make helm chart names dynamic #593

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions templates/helm/templates/caches-role-binding.yaml.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ack-namespaces-cache-{{ .ControllerName }}-controller
name: {{ IncludeTemplate "app.fullname" }}-namespaces-cache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @michaelhtm ! is app.fullname unique per installation?

roleRef:
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io
name: ack-namespaces-cache-{{ .ControllerName }}-controller
name: {{ IncludeTemplate "app.fullname" }}-namespaces-cache
subjects:
- kind: ServiceAccount
name: {{ IncludeTemplate "service-account.name" }}
Expand All @@ -14,12 +14,12 @@ subjects:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ack-configmaps-cache-{{ .ControllerName }}-controller
name: {{ IncludeTemplate "app.fullname" }}-configmaps-cache
namespace: {{ "{{ .Release.Namespace }}" }}
roleRef:
kind: Role
apiGroup: rbac.authorization.k8s.io
name: ack-configmaps-cache-{{ .ControllerName }}-controller
name: {{ IncludeTemplate "app.fullname" }}-configmaps-cache
subjects:
- kind: ServiceAccount
name: {{ IncludeTemplate "service-account.name" }}
Expand Down
4 changes: 2 additions & 2 deletions templates/helm/templates/caches-role.yaml.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ack-namespaces-cache-{{ .ControllerName }}-controller
name: {{ IncludeTemplate "app.fullname" }}-namespaces-cache
rules:
- apiGroups:
- ""
Expand All @@ -15,7 +15,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ack-configmaps-cache-{{ .ControllerName }}-controller
name: {{ IncludeTemplate "app.fullname" }}-configmaps-cache
namespace: {{ "{{ .Release.Namespace }}" }}
rules:
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion templates/helm/templates/cluster-role-binding.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ metadata:
roleRef:
kind: Role
apiGroup: rbac.authorization.k8s.io
name: ack-{{ .ControllerName }}-controller
name: {{ IncludeTemplate "app.fullname" }}-controller
subjects:
- kind: ServiceAccount
name: {{ "{{ $serviceAccountName }}" }}
Expand Down
4 changes: 2 additions & 2 deletions templates/helm/templates/cluster-role-controller.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ack-{{ .ControllerName }}-controller
name: {{ IncludeTemplate "app.fullname" }}-controller
labels:
{{ "{{- range $key, $value := $labels }}" }}
{{ "{{ $key }}: {{ $value | quote }}" }}
Expand All @@ -18,7 +18,7 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ack-{{ .ControllerName }}-controller
name: {{ IncludeTemplate "app.fullname" }}-controller
namespace: {{ "{{ . }}" }}
labels:
{{ "{{- range $key, $value := $labels }}" }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{.ControllerName}}-leader-election-rolebinding
name: {{ IncludeTemplate "app.fullname" }}-leader-election-rolebinding
{{ "{{ if .Values.leaderElection.namespace }}" }}
namespace: {{ "{{ .Values.leaderElection.namespace }}" }}
{{ "{{ else }}" }}
Expand All @@ -11,7 +11,7 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{.ControllerName}}-leader-election-role
name: {{ IncludeTemplate "app.fullname" }}-leader-election-role
subjects:
- kind: ServiceAccount
name: {{ IncludeTemplate "service-account.name" }}
Expand Down
2 changes: 1 addition & 1 deletion templates/helm/templates/leader-election-role.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{.ControllerName}}-leader-election-role
name: {{ IncludeTemplate "app.fullname" }}-leader-election-role
{{ "{{ if .Values.leaderElection.namespace }}" }}
namespace: {{ "{{ .Values.leaderElection.namespace }}" }}
{{ "{{ else }}" }}
Expand Down
2 changes: 1 addition & 1 deletion templates/helm/templates/role-reader.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: ack-{{ .ControllerName }}-reader
name: {{ IncludeTemplate "app.fullname" }}-reader
namespace: {{ "{{ .Release.Namespace }}" }}
rules:
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion templates/helm/templates/role-writer.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: ack-{{ .ControllerName }}-writer
name: {{ IncludeTemplate "app.fullname" }}-writer
namespace: {{ "{{ .Release.Namespace }}" }}
rules:
- apiGroups:
Expand Down