Skip to content
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

Fix webhook not able to read secrets, when using namespaces issuers #3

Open
wants to merge 1 commit into
base: master
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
29 changes: 29 additions & 0 deletions component/cert-exoscale.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,35 @@ local certExoscale = com.Kustomization(
value: %(namespace)s
||| % { namespace: paramsCertManager.namespace },
},
{
target: {
kind: 'Role',
name: 'cert-manager-webhook-exoscale:secrets-reader',
},
patch: |||
- op: replace
path: /kind
value: ClusterRole
- op: remove
path: /metadata/namespace
|||,
},
{
target: {
kind: 'RoleBinding',
name: 'cert-manager-webhook-exoscale:secrets-reader',
},
patch: |||
- op: replace
path: /kind
value: ClusterRoleBinding
- op: remove
path: /metadata/namespace
- op: replace
path: /roleRef/kind
value: ClusterRole
|||,
},
{
target: {
kind: 'APIService',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
kind: ClusterRole
metadata:
labels:
app: exoscale-webhook
chart: exoscale-webhook-0.3.0
heritage: Helm
release: exoscale-webhook
name: cert-manager-webhook-exoscale:secrets-reader
namespace: syn-cert-manager
rules:
- apiGroups:
- ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
kind: ClusterRoleBinding
metadata:
labels:
app: exoscale-webhook
chart: exoscale-webhook-0.3.0
heritage: Helm
release: exoscale-webhook
name: cert-manager-webhook-exoscale:secrets-reader
namespace: syn-cert-manager
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
kind: ClusterRole
name: cert-manager-webhook-exoscale:secrets-reader
subjects:
- apiGroup: ""
Expand Down
Loading