Skip to content

Commit e897c9d

Browse files
authored
fix missing RoleReconciler ClusterRole secrets verbs as the RoleReconciler is watching referenced Secrets (#21)
1 parent 0b1057d commit e897c9d

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
env:
4848
GITHUB_USER_NAME: ${{ github.actor }}
4949
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
- name: Patch ClusterRole rolereconciler-cluster-role with secrets permission as the RoleReconciler is watching referenced Secrets
51+
run: |
52+
yq -i 'select(.metadata.name == "rolereconciler-cluster-role").rules += [{"apiGroups": [""], "resources": ["secrets"], "verbs": ["get", "list", "watch"]}]' operator/build/helm/kubernetes/postgresql-operator/templates/clusterrole.yaml
53+
shell: bash
5054
- name: Package Helm chart
5155
run: |
5256
tar -czf operator/build/helm/kubernetes/postgresql-operator-${{ steps.nextVersion.outputs.version }}.tgz -C operator/build/helm/kubernetes postgresql-operator

operator/src/main/resources/application.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ quarkus:
147147
memory: 300Mi
148148
limits:
149149
memory: 512Mi
150+
# Report bug as this or adding the ClusterRole and ClusterRoleBinding in operator/src/main/kubernetes/kubernetes.yml does not work, JOSDK simply ignores the ClusterRoleBinding
151+
#rbac:
152+
# cluster-roles:
153+
# "rolereconciler-cluster-role":
154+
# name: rolereconciler-cluster-role
155+
# policy-rules:
156+
# "secrets":
157+
# api-groups: [""]
158+
# resources: ["secrets"]
159+
# verbs: ["get", "list", "watch"]
150160
startup-probe:
151161
http-action-port-name: http
152162
initial-delay: PT2S

0 commit comments

Comments
 (0)