Skip to content
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

When CRDs and CRs are deployed in the same apply, the apply will fail due to race condition #1179

Closed
dniasoff opened this issue Feb 20, 2022 · 3 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@dniasoff
Copy link

What would you like to be added:
I would like kubectl to optionally wait for CustomResourceDefinitions to be established before attempting to apply a Custom Resource that is dependent on it.

A suitable workflow is to just apply all CRDs, do the equivalent of ```kubectl wait --for=condition=established -f crds.yaml`` and then apply other resources

Why is this needed:
When deploying CRDs and CRs in the same apply, the apply of CRs will initially fail. Although you can then run another apply which will then work, this is messy

See kubernetes-sigs/kustomize#3502

@dniasoff dniasoff added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 20, 2022
@k8s-ci-robot
Copy link
Contributor

@dniasoff: This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Feb 20, 2022
@eddiezane
Copy link
Member

We've discussed this before and decided to keep kubectl unbiased on the resources it is applying.

We do have a better warning message planned though kubernetes/kubernetes#107363

/close

@k8s-ci-robot
Copy link
Contributor

@eddiezane: Closing this issue.

In response to this:

We've discussed this before and decided to keep kubectl unbiased on the resources it is applying.

We do have a better warning message planned though kubernetes/kubernetes#107363

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

SergK added a commit to SergK/kubernetes-marketplace that referenced this issue Jan 19, 2024
There is an issue by applying single app.yaml file and we fail
to create CRDs and CRs in the same apply request [1]. This patch
changes the approach on how to install tekton, first by creating
CRD and then apply the rest of the Tekton Stack with CRs

[1]. kubernetes/kubectl#1179

Signed-off-by: Sergiy Kulanov <sergiy_kulanov@epam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants