Skip to content

Commit 1102417

Browse files
committed
fixup! webhook: generate webhook using operator-sdk but without defaulting/mutating
1 parent 27d7cab commit 1102417

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

api/v1/dpuoperatorconfig_webhook.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"k8s.io/apimachinery/pkg/runtime"
2121
ctrl "sigs.k8s.io/controller-runtime"
2222
logf "sigs.k8s.io/controller-runtime/pkg/log"
23+
//"sigs.k8s.io/controller-runtime/pkg/webhook"
2324
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
2425
)
2526

@@ -40,6 +41,7 @@ func (r *DpuOperatorConfig) SetupWebhookWithManager(mgr ctrl.Manager) error {
4041
// Modifying the path for an invalid path can cause API server errors; failing to locate the webhook.
4142
//+kubebuilder:webhook:path=/validate-config-openshift-io-v1-dpuoperatorconfig,mutating=false,failurePolicy=fail,sideEffects=None,groups=config.openshift.io,resources=dpuoperatorconfigs,verbs=create;update,versions=v1,name=vdpuoperatorconfig.kb.io,admissionReviewVersions=v1
4243

44+
//var _ webhook.Validator = &DpuOperatorConfig{}
4345

4446
// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
4547
func (r *DpuOperatorConfig) ValidateCreate() (admission.Warnings, error) {

bundle/manifests/dpu-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ metadata:
3838
}
3939
]
4040
capabilities: Basic Install
41-
createdAt: "2025-02-25T11:27:28Z"
41+
createdAt: "2025-02-25T12:29:34Z"
4242
features.operators.openshift.io/cnf: "false"
4343
features.operators.openshift.io/cni: "true"
4444
features.operators.openshift.io/csi: "false"

manifests/stable/dpu-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ metadata:
3838
}
3939
]
4040
capabilities: Basic Install
41-
createdAt: "2025-02-25T11:27:28Z"
41+
createdAt: "2025-02-25T12:29:34Z"
4242
features.operators.openshift.io/cnf: "false"
4343
features.operators.openshift.io/cni: "true"
4444
features.operators.openshift.io/csi: "false"

vendor/github.com/openshift/dpu-operator/api/v1/dpuoperatorconfig_webhook.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)