-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wait for CRD ready state #11717
Comments
From the docs:
IMHO it would be good if helm would wait for the CRD resource to be available (Established) here. I think a PR would be welcome. |
The wait flag already waits for CRD readiness: Lines 153 to 163 in 76157c6
|
I'm trying to use terraform k8s operator (but it's not waiting even when using --wait flag with helm ) also reached terraform k8s operator team here is ticket: hashicorp/terraform-k8s#155 |
That's not terraform, that's FluxCD. I see you say it takes 15 minutes. The helm default is 5 minutes. Perhaps you need to extend the timeout. For FluxCD, see their documentation: https://fluxcd.io/flux/components/helm/helmreleases/ For support with FluxCD, see https://fluxcd.io/support/#getting-help-from-the-flux-community |
HELM status changes to ready in a few seconds. I want helm to wait for created resources to become ready. |
Ah, so you don't mean the CRD, you mean the custom resource. There's no way to determine when a custom resource is ready - or even if a custom resource can be ready. There's no standard. This would need to be tackled in kubernetes before helm could do anything. |
@joejulian since there's no official standard, nor an indication of whether there will be one or whether it's useful for other use-cases, why not just create a simple interface and check if it's implemented so we have a way to achieve this? Could be as simple as: type Readiness interface {
IsReady() bool
} Then we can check if the interface is implemented in the Not supporting any way to incorporate readiness for the CR, can cause all sorts of issues with deployment pipelines and even just generally using helm for templating CRs. |
Maybe you can do that with hooks: set up a pod that checks the custom resource for your desired status. It can't be done as part of the helm binary though. It's not up to helm to create kubernetes standards. iirc, that's under the authority of sig-apimachinery. |
@joejulian Can helm support CR like this? |
Can we update the title to |
Just checking how kubectl works, CRDs define additional printer columns that kubectl will use. A very standard one is type=Ready, see cert-manager Helm could attempt to divine this and return True if it doesn't match |
I have CRD which I want to wrap to helm(template).
The question is how do I know if CRD resource is ready?
In other words, I want cli to wait until CRD becomes ready when using --wait
The text was updated successfully, but these errors were encountered: