Skip to content

Commit

Permalink
Fix for broken RBAC in the pelorus-operator 0.0.3
Browse files Browse the repository at this point in the history
This fixes RBAC issues with the pelorus-operator 0.0.3.

There was another issue with the image tags within the image stream
created for each individual exporter, which should be fixed by this
PR.

No need to create new Release as the pelorus-operator and pelrus-bundle
may be created without new github release.

Signed-off-by: Michal Pryc <mpryc@redhat.com>
  • Loading branch information
mpryc committed Mar 2, 2023
1 parent 3ee9fac commit b22d522
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:

{{- if and (not .source_ref) (not .source_url) }}
- name: PELORUS_IMAGE_TAG
value: {{ .app_name }}:{{ .image_tag | default "stable" }}
value: {{ .app_name }}:{{ .image_tag | default "v2.0.7" }}
{{- end }}

{{- if .extraEnv }}
Expand Down Expand Up @@ -90,6 +90,8 @@ spec:
{{- if or .source_ref .source_url }}
name: {{ .app_name }}:latest
{{- else }}
# default is an internal registry tag and must match the default from
# _imagestream_from_image.yaml
name: {{ .app_name }}:{{ .image_tag | default "stable" }}
{{- end }}
type: ImageChange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ spec:
name: {{ .image_name }}
# .image_name is provided without tag
{{- else }}
name: {{ .image_name }}:{{ .image_tag | default "2.0.7" }}
name: {{ .image_name }}:{{ .image_tag | default "v2.0.7" }}
{{- end }}
{{- else }}
name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "2.0.7" }}
name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.7" }}
# .image_name
{{- end }}
name: {{ .image_tag | default "2.0.7" }}
name: {{ .image_tag | default "stable" }}
referencePolicy:
type: Local
# define
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ metadata:
categories: |
Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery
containerImage: quay.io/pelorus/pelorus-operator:0.0.4
createdAt: "2023-03-02T13:39:53Z"
createdAt: "2023-03-02T21:50:29Z"
description: |
Tool that helps IT organizations measure their impact on the overall performance of their organization
operatorframework.io/suggested-namespace: pelorus
Expand Down Expand Up @@ -159,6 +159,15 @@ spec:
- clusterroles
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- secrets
- serviceaccounts
- services
verbs:
- '*'
- apiGroups:
- rbac.authorization.k8s.io
resources:
Expand Down Expand Up @@ -200,15 +209,6 @@ spec:
- routes
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- secrets
- serviceaccounts
- services
verbs:
- '*'
- apiGroups:
- operators.coreos.com
resources:
Expand Down
18 changes: 9 additions & 9 deletions pelorus-operator/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ rules:
resources:
- "clusterrolebindings"
- "clusterroles"
- verbs:
- "*"
apiGroups:
- ""
resources:
- "configmaps"
- "secrets"
- "serviceaccounts"
- "services"
- verbs:
- "*"
apiGroups:
Expand Down Expand Up @@ -93,14 +102,5 @@ rules:
- "route.openshift.io"
resources:
- "routes"
- verbs:
- "*"
apiGroups:
- ""
resources:
- "configmaps"
- "secrets"
- "serviceaccounts"
- "services"

#+kubebuilder:scaffold:rules
2 changes: 1 addition & 1 deletion pelorus-operator/helm-charts/pelorus/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ dependencies:
repository: file://./subcharts/exporters
version: 2.0.7
digest: sha256:f613fb665d4f9b0d17119698eada144f11dd85bf498197b5ad587bcbafaebdbe
generated: "2023-03-02T14:39:47.359886943+01:00"
generated: "2023-03-02T22:50:23.529649522+01:00"
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:

{{- if and (not .source_ref) (not .source_url) }}
- name: PELORUS_IMAGE_TAG
value: {{ .app_name }}:{{ .image_tag | default "stable" }}
value: {{ .app_name }}:{{ .image_tag | default "v2.0.7" }}
{{- end }}

{{- if .extraEnv }}
Expand Down Expand Up @@ -90,6 +90,8 @@ spec:
{{- if or .source_ref .source_url }}
name: {{ .app_name }}:latest
{{- else }}
# default is an internal registry tag and must match the default from
# _imagestream_from_image.yaml
name: {{ .app_name }}:{{ .image_tag | default "stable" }}
{{- end }}
type: ImageChange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ spec:
name: {{ .image_name }}
# .image_name is provided without tag
{{- else }}
name: {{ .image_name }}:{{ .image_tag | default "2.0.7" }}
name: {{ .image_name }}:{{ .image_tag | default "v2.0.7" }}
{{- end }}
{{- else }}
name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "2.0.7" }}
name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.7" }}
# .image_name
{{- end }}
name: {{ .image_tag | default "2.0.7" }}
name: {{ .image_tag | default "stable" }}
referencePolicy:
type: Local
# define
Expand Down

0 comments on commit b22d522

Please sign in to comment.