-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mechanism to handle webhook definitons as part of webhook deployment
Add mechanism to webhook controller to create validatingWebhookConfigurations and mutatingWebhookConfigurations right before webhoo registration in webhook deployment. This patch ensures that the names used in the webhookConfigurations remain static without risking edits by OLM Signed-off-by: Nikhil Thomas <[email protected]>
- Loading branch information
1 parent
5107bd9
commit 0180d75
Showing
10 changed files
with
202 additions
and
142 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
cmd/openshift/webhook/kodata/validating-defaulting-webhook/500_webhooks.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
labels: | ||
app: tekton-operator | ||
name: tekton-operator-webhook | ||
name: webhook.operator.tekton.dev | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1beta1 | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: tekton-operator-webhook | ||
namespace: openshift-operators | ||
failurePolicy: Fail | ||
name: webhook.operator.tekton.dev | ||
sideEffects: None | ||
--- | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: ValidatingWebhookConfiguration | ||
metadata: | ||
labels: | ||
app: tekton-operator | ||
name: tekton-operator-webhook | ||
name: config.webhook.operator.tekton.dev | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1beta1 | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: tekton-operator-webhook | ||
namespace: openshift-operators | ||
failurePolicy: Fail | ||
name: config.webhook.operator.tekton.dev | ||
namespaceSelector: | ||
matchExpressions: | ||
- key: operator.tekton.dev/release | ||
operator: Exists | ||
sideEffects: None | ||
--- | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: ValidatingWebhookConfiguration | ||
metadata: | ||
labels: | ||
app: tekton-operator | ||
name: tekton-operator-webhook | ||
name: validation.webhook.operator.tekton.dev | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1beta1 | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: tekton-operator-webhook | ||
namespace: openshift-operators | ||
failurePolicy: Fail | ||
name: validation.webhook.operator.tekton.dev | ||
sideEffects: None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2021 The Tekton Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: tekton-operator-webhook-certs | ||
labels: | ||
name: tekton-operator-webhook | ||
app: tekton-operator | ||
# The data is populated at install time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.