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

k8s-handle fails on serialized deploy (CRD -> Object) #111

Open
ghost opened this issue Jan 9, 2020 · 2 comments
Open

k8s-handle fails on serialized deploy (CRD -> Object) #111

ghost opened this issue Jan 9, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Jan 9, 2020

CRD defined object deploy fails even in right sequence serialized case:

  1. Deploy CRD
  2. Deploy custom object

config.yaml:

  - template: "zalando-postgres-operator/OperatorConfigurationCustomResourceDefinition.yaml.j2"
  - template: "zalando-postgres-operator/OperatorConfiguration.yaml.j2"

Log:

2020-01-09 07:24:52 ERROR:k8s_handle:RuntimeError: No valid plural name of resource definition discovered
@rvadim rvadim added the bug Something isn't working label Jan 9, 2020
@rvadim rvadim self-assigned this Feb 5, 2020
@rvadim
Copy link
Collaborator

rvadim commented Feb 5, 2020

Hi, can you provide full example here, so we can reproduce problem?

@furiousassault
Copy link
Collaborator

furiousassault commented Feb 6, 2020

@rvadim, I think we see how the issue can be reproduced.

The problem is, when we have a CRD and the objects of that CRD in the same deployment, it's highly likely will be failed due to some time gap between CRD accept by the Apiserver and the moment when it can handle the objects of that CRD.

Sort of my bad, when I implemented this functionality, I haven't checked and handled this case: deployed CRD and objects in different deployments and didn't want to make logic more complex.
We hadn't used deployments described by @kichay at that moment, so it wasn't a high priority issue.

To avoid that, we should implement a mechanism of CRD deployment which listens the events until the event that confirms CRD readiness appears (or timeout expires), and continue deployment or fail after that.

I can take this issue when I'll have some free time, or you can take it, if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants