Skip to content
Merged
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
5 changes: 4 additions & 1 deletion cmd/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ func main() {
webhookHost = app.Flag("webhook-host", "The host of the webhook server.").Default("0.0.0.0").Envar("WEBHOOK_HOST").String()
webhookTLSCertDir = app.Flag("webhook-tls-cert-dir", "The directory of TLS certificate that will be used by the webhook server. There should be tls.crt and tls.key files.").Default("/").Envar("WEBHOOK_TLS_CERT_DIR").String()
_ = app.Flag("enable-validation-webhooks", "Enable support for Webhooks. [Deprecated, has no effect]").Default("false").Bool()
disableBucketWebhook = app.Flag("disable-bucket-validation-webhook", "Disable validation webhook for Bucket managed resources").Default("false").Envar("DISABLE_BUCKET_VALIDATION_WEBHOOK").Bool()
enableChangeLogs = app.Flag("enable-changelogs", "Enable support for capturing change logs during reconciliation.").Default("false").Envar("ENABLE_CHANGE_LOGS").Bool()
changelogsSocketPath = app.Flag("changelogs-socket-path", "Path for changelogs socket (if enabled)").Default("/var/run/changelogs/changelogs.sock").Envar("CHANGELOGS_SOCKET_PATH").String()
// Subresource Client Flags.
Expand Down Expand Up @@ -478,7 +479,9 @@ func main() {
})
kingpin.FatalIfError(err, "Cannot create Kube client")

setupBucketWebhook(mgr, backendStore)
if !*disableBucketWebhook {
setupBucketWebhook(mgr, backendStore)
}
setupProviderConfigControllers(
mgr,
o,
Expand Down
2 changes: 1 addition & 1 deletion docs/WEBHOOKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Provider Ceph provides Dynamic Admission Control for Buckets.
### Bucket Validation Webhook
Validates Bucket CRs for Create and Update operations.
This webhook is also configured with an `objectSelector` label `provider-ceph.crossplane.io/validation-required: true`.
It is the responsibility of the user (or the external system) to ensure that incoming Bucket CRs are given this label to enable webhook validation, should validation for the CR be desired.
It is the responsibility of the user (or the external system) to ensure that incoming Bucket CRs are given this label to enable webhook validation, should validation for the CR be desired. This webhook can be disabled completely by the command line argument `--disable-bucket-validation-webhook` when starting the provider.

Create and Update operations on Buckets are blocked by the bucket admission webhook when:
- The Bucket contains one or more providers (`bucket.spec.Providers`) that do not exist (i.e. a `ProviderConfig` of the same name does not exist in the k8s cluster).
Expand Down
Loading