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

Issue 205: Add WEBHOOK_NAMESPACE to deploy webhook service #206

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 4 additions & 0 deletions deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
- pravega-operator
imagePullPolicy: Always
env:
- name: WEBHOOK_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
Expand Down
2 changes: 1 addition & 1 deletion deploy/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ rules:
- apiGroups:
- admissionregistration.k8s.io
resources:
- "*"
- mutatingwebhookconfigurations
verbs:
- '*'
2 changes: 1 addition & 1 deletion pkg/webhook/add_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func newWebhookServer(mgr manager.Manager) (*webhook.Server, error) {
BootstrapOptions: &webhook.BootstrapOptions{
// TODO: garbage collect webhook k8s service
Service: &webhook.Service{
Namespace: os.Getenv("WATCH_NAMESPACE"),
Namespace: os.Getenv("WEBHOOK_NAMESPACE"),
Name: "pravega-admission-webhook",
Selectors: map[string]string{
"component": "pravega-operator",
Expand Down