- 
                Notifications
    You must be signed in to change notification settings 
- Fork 34
Fix #17: Make RBAC resources unique and optional #18
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
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,4 +1,9 @@ | ||
| apiVersion: v1 | ||
| description: Deploy the F5 Networks BIG-IP Controller for Kubernetes and OpenShift (k8s-bigip-ctlr). | ||
| name: f5-bigip-ctlr | ||
| version: 0.0.4 | ||
| version: 0.1.0 | ||
| home: https://github.com/F5Networks/charts | ||
| keywords: | ||
| - f5-bigip | ||
| sources: | ||
| - https://clouddocs.f5.com/containers/v2/kubernetes/kctlr-k8s-ingress-ctlr.html | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| {{- if .Values.rbac.create -}} | ||
| kind: ClusterRole | ||
| apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
| metadata: | ||
| name: f5-bigip-ctlr-clusterrole | ||
| name: {{ template "f5-bigip-ctlr.fullname" . }} | ||
| labels: | ||
| app: {{ template "f5-bigip-ctlr.name" . }} | ||
| chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
| chart: {{ template "f5-bigip-ctlr.chart" . }} | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Charts in helm are expected to be tied to a version. This naming convention is deliberate and should be retained. Operators may be expected to use multiple versions of a chart during rolling deployments, testing etc., and having the name explicitly reference the version should make tracking, debugging, and human error elimination easier. @f5tsomanchi The names of resources should be validated in a test environment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @recursivelycurious - as said in the above comments, The RBAC aspects look fine, however, this MR had not been merged yet due to difficulty around a testing environment to run the system tests. They may need to be modified to run the newer charts. 
 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you look in the helpers  | ||
| release: {{ .Release.Name }} | ||
| heritage: {{ .Release.Service }} | ||
| rules: | ||
|  | @@ -37,3 +38,4 @@ rules: | |
| - update | ||
| - create | ||
| - patch | ||
| {{- end -}} | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,18 +1,19 @@ | ||
| {{- if .Values.rbac.create -}} | ||
| kind: ClusterRoleBinding | ||
| apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
| metadata: | ||
| name: f5-bigip-ctlr-clusterrolebinding | ||
| namespace: kube-system | ||
| name: {{ template "f5-bigip-ctlr.fullname" . }} | ||
| labels: | ||
| app: {{ template "f5-bigip-ctlr.name" . }} | ||
| chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
| chart: {{ template "f5-bigip-ctlr.chart" . }} | ||
| release: {{ .Release.Name }} | ||
| heritage: {{ .Release.Service }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: f5-bigip-ctlr-clusterrole | ||
| name: {{ template "f5-bigip-ctlr.fullname" . }} | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: f5-bigip-ctlr-serviceaccount | ||
| namespace: kube-system | ||
| name: {{ template "f5-bigip-ctlr.serviceAccountName" . }} | ||
| namespace: {{ .Release.Namespace | quote }} | ||
| {{- end -}} | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,10 +1,13 @@ | ||
| {{- if .Values.rbac.create -}} | ||
| {{- if .Values.serviceAccount.create -}} | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: f5-bigip-ctlr-serviceaccount | ||
| namespace: kube-system | ||
| name: {{ template "f5-bigip-ctlr.fullname" . }} | ||
| labels: | ||
| app: {{ template "f5-bigip-ctlr.name" . }} | ||
| chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
| chart: {{ template "f5-bigip-ctlr.chart" . }} | ||
| release: {{ .Release.Name }} | ||
| heritage: {{ .Release.Service }} | ||
| heritage: {{ .Release.Service }} | ||
| {{- end -}} | ||
| {{- end -}} | 
Uh oh!
There was an error while loading. Please reload this page.