controller-tools
controller-tools copied to clipboard
Tools to use with the controller-runtime libraries
This issue seems to be similar to Issue #442, but i am not sure if the root cause is the same. When writing a Schema, containing a nested struct, the...
Trying to build the webhook testdata in ./pkg/webhook/testdata fails: ``` ./webhook.go:26:7: cannot use c (variable of type *CronJob) as "k8s.io/apimachinery/pkg/runtime".Object value in argument to ctrl.NewWebhookManagedBy(mgr).For: *CronJob does not implement "k8s.io/apimachinery/pkg/runtime".Object...
Currently, if both XValidation and AtMostOneOf/ExactlyOneOf constraints are specified, the ordering of CEL rules can change due to both sets of markers have the same apply priority. This change ensures...
### Problem Statement When inferring the version of a CRD from the package name: https://github.com/kubernetes-sigs/controller-tools/blob/a57ec68d4aca081c0ead223796f18b7c6c3a61c1/pkg/crd/parser.go#L135-L145 a developer can make a mistake where they don't use the same value for the...
I have a bunch of types that implement custom unmarshalling logic through implementing json.Unmarshaler interface. These types' spec structure does not correspond to the actual struct layout, so the only...
Signed-off-by: Stefan Büringer [email protected] controller-tools repo is now configured in a way that blocks creation of pull requests by actions (see https://github.com/kubernetes-sigs/controller-tools/actions/runs/12463704971). This PR changes the process. Now it's necessary...
Hi, I'm trying to build a k8s operator using kubebuilder and face an issue similar to one reported in https://github.com/kubernetes-sigs/controller-tools/issues/324. A CRD definition is generated with `$ref` being used instead...
This change adds logic to understand and interpret k8s:immutable tag in controller-gen. This tag is getting introduced for native types in K8s as part of [5073-declarative-validation-with-validation-gen](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/5073-declarative-validation-with-validation-gen) KEP. On detecting the...
## Overview Closes #441 This pull request introduces a new marker `kubebuilder:schemaModifier`, which allows modifying specific fields in `JSONSchemaProps` for CustomResourceDefinitions (CRDs). This marker supports flexible rules for targeting specific...
For my operator, we found a panic in this tool. https://github.com/openshift/kueue-operator/pull/363 is able to reproduce this failure with using latest controller-tools. ``` go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen crd paths=./pkg/apis/kueueoperator/v1/... schemapatch:manifests=./manifests output:crd:dir=./manifests panic:...