Skip to content

Commit

Permalink
Fix controller's roles + pusher webhook service
Browse files Browse the repository at this point in the history
  • Loading branch information
damsien committed May 29, 2024
1 parent 064b70e commit 6c3d32a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
18 changes: 17 additions & 1 deletion chart/0.0.1/templates/rbac/controller/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ rules:
- get
- list
- watch
# Create and patch events related to kgio objects in any namespace
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand All @@ -30,11 +38,19 @@ rules:
- apiGroups:
- kgio.dams.kgio
resources:
- gitremote
- gitremotes
verbs:
- get
- list
- watch
- apiGroups:
- kgio.dams.kgio
resources:
- gitremotes/status
verbs:
- get
- patch
- update
- apiGroups:
- kgio.dams.kgio
resources:
Expand Down
2 changes: 1 addition & 1 deletion chart/0.0.1/templates/webhook/webhook-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ metadata:
app.kubernetes.io/component: webhook
app.kubernetes.io/created-by: dams
app.kubernetes.io/part-of: {{ .Release.Name }}
name: {{ .Values.webhook.services.pusher }}
name: webhook-pusher-service
spec:
ports:
- port: 443
Expand Down
1 change: 0 additions & 1 deletion chart/0.0.1/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ webhook:
secret: webhook-server-cert
services:
crd: webhook-crd-service
pusher: webhook-pusher-service

controller:
securityContext:
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/resourcesinterceptor_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (r *ResourcesInterceptorReconciler) Reconcile(ctx context.Context, req ctrl
}

// The service is located in the manager/controller namespace
serviceName := "resources-interceptor-webhook"
serviceName := "webhook-pusher-service"
operatorNamespace := r.Namespace
clientConfig := admissionv1.WebhookClientConfig{
Service: &admissionv1.ServiceReference{
Expand Down

0 comments on commit 6c3d32a

Please sign in to comment.