controller-tools icon indicating copy to clipboard operation
controller-tools copied to clipboard

Tools to use with the controller-runtime libraries

Results 142 controller-tools issues
Sort by recently updated
recently updated
newest added

### Problem statement Currently, kubebuilder supports `rule` and `message` fields when specifying `+kubebuilder:validation:XValidation`. [Kubernetes 1.25 introduced CRD validation rules](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules) (beta0 which also allow specifying [`messageExpression`](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/). The following is now possible...

Recently I stumble upon a situation when running controller gen had no effect ``` controller-gen crd:headerFile="hack/boilerplate.go.txt",year=2024 paths="./pkg/api/..." output:dir="." ``` for the `crd` gen, but worked fine for `object` gen ```...

help wanted
lifecycle/frozen

def: ``` type GuestbookSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file // DeploymentSpec use...

lifecycle/rotten

I'm using kubebuilder which generates webhooks with [these markers](https://book.kubebuilder.io/reference/markers/webhook.html). The generated mutating webhook has a hardcoded name of `mutating-webhook-configuration` [here](https://github.com/kubernetes-sigs/controller-tools/blob/881ffb4682cb5882f5764aca5a56fe9865bc9ed6/pkg/webhook/parser.go#L422), and the validating webhook has a hardcoded name of `validating-webhook-configuration`...

lifecycle/frozen

When building tooling that looks at CRDs or works with k8s yaml, understanding the types that are are being used is helpful for custom validations, rewrites, generation, and other rules....

help wanted
lifecycle/frozen

Golang version: 1.20.6 CONTROLLER_TOOLS_VERSION ?= v0.12.0 ``` Error /workspace/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases Error: load packages in root "/workspace/.bob/gopath/pkg/mod/gopkg.in/[email protected]": err: exit status 1: stderr: go: gopkg.in/[email protected]: missing go.sum entry...

Currently, it is only possible to generate a webhook manifest for a service running inside the cluster. However, I think it should also be possible to generate manifests for webhook...

lifecycle/rotten

controller-gen crd:trivialVersions=true,preserveUnknownFields=false,crdVersions=v1 rbac:roleName=manager-role paths="./..." output:crd:artifacts:config=../config/crd/bases ;\ controller-gen crd:trivialVersions=true,preserveUnknownFields=false,crdVersions=v1 rbac:roleName=manager-role paths="./..." output:crd:artifacts:config=../helm/chaos-mesh/crds ; ![image](https://github.com/kubernetes-sigs/controller-tools/assets/37182663/a1063d57-46a5-4a9b-9fac-728f9f6ec8b9) if use make generate in root path of chaos-mesh,this happened: ![image](https://github.com/kubernetes-sigs/controller-tools/assets/37182663/7799cdfa-6764-4ace-8d71-ba03168af663)

lifecycle/rotten

Looking for suggestions. I am generating Kubernetes CRD (Custom Resource Definition) using kubebuilder. Along with CRD, I also need **to document** the REST endpoints by creating **OpenAPI v3 Spec (OAS)**...

lifecycle/rotten

Running the controller-gen works when using wildcards: ``` ./bin/controller-gen crd paths="./pkg/apis/foo/v1alpha1/..." output:stdout ``` but fails when running on a specific file: ``` ./bin/controller-gen crd paths="./pkg/apis/foo/v1alpha1/bar_types.go" output:stdout ``` with output: ```...