kubernetes-sigs / cluster-api-operator

Home for Cluster API Operator, a subproject of sig-cluster-lifecycle
https://cluster-api-operator.sigs.k8s.io
Apache License 2.0
146 stars 60 forks source link

Helm Chart CRDs Placement Causes Flaky Installations #534

Open kahirokunn opened 1 month ago

kahirokunn commented 1 month ago

What steps did you take and what happened: Attempting to install the Helm chart for cluster-api-operator results in a flaky installation process. The CRDs are located in the templates/operator-components.yaml file instead of the crds directory.

helm upgrade --install cluster-api-operator-docker cluster-api-operator/cluster-api-operator --version 0.10.1 -n cluster-api-operator-docker --create-namespace --values ./cluster-api-operator-values.yaml
Release "cluster-api-operator-docker" does not exist. Installing it now.
Error: failed post-install: warning: Hook post-install cluster-api-operator/templates/core-conditions.yaml failed: 1 error occurred:
        * Internal error occurred: failed calling webhook "vcoreprovider.kb.io": failed to call webhook: Post "https://capi-operator-webhook-service.cluster-api-operator-docker.svc:443/mutate-operator-cluster-x-k8s-io-v1alpha2-coreprovider?timeout=10s": no endpoints available for service "capi-operator-webhook-service"

What did you expect to happen: The Helm install should complete successfully without errors.

Anything else you would like to add: It is possible to separate the CustomResourceDefinitions from the other components using commands like the following:

cat operator-components.yaml | yq 'select(.kind != "CustomResourceDefinition")'
cat operator-components.yaml | yq 'select(.kind == "CustomResourceDefinition")'

Can we consider reorganizing the files accordingly?

Environment:

/kind bug [One or more /area labels. See https://github.com/kubernetes-sigs/cluster-api-operator/labels?q=area for the list of labels]


Feel free to fill in the specific versions and any additional environment details before submitting the issue.

k8s-ci-robot commented 1 month ago

This issue is currently awaiting triage.

If CAPI Operator contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
kahirokunn commented 1 month ago

We have verified that cluster-api-operator cannot be successfully installed by helm upgrade --install . The helm install works.

kahirokunn commented 1 month ago

It won't work if you move it as it is because CRDs uses the go template. 😢

dtzar commented 1 month ago

related to #188

kahirokunn commented 1 month ago

Oh, Thx.

dtzar commented 1 month ago

/reopen

I think it's still worth keeping open as the team considers the design of where CRDs are placed.

k8s-ci-robot commented 1 month ago

@dtzar: Reopened this issue.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-operator/issues/534#issuecomment-2130533922): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
kahirokunn commented 1 month ago

Okay👌