Skip to content

k8s 1.10 with CustomResourceSubresources=true prevents operator from creating CRDs #1293

Closed

Description

@dprotaso

What did you do?

Use prometheus-operator on a kubernetes 1.10 cluster with the feature gate CustomResourceSubresources set to true

Use the bundle yaml from the root of the repo: https://github.com/coreos/prometheus-operator/blob/master/bundle.yaml

What did you expect to see?

Operator/Controller is able to create CRDs

What did you see instead? Under which circumstances?

The operator fails to create CRDs - see logs below
https://gist.github.com/bsnchan/1f721c6e9f7aa989cb0c070ed305bd02

Activity

  1. brancz commented on May 2, 2018

    @brancz
    Contributor

    Thanks for reporting this! This is definitely a bug we need to fix! (cc @mxinden)

  2. ajwdev commented on May 14, 2018

    @ajwdev

    Just ran into this. Is there any workarounds at the moment?

  3. brancz commented on May 15, 2018

    @brancz
    Contributor

    I'm not aware, but we should work on this, we're currently quite busy but I'm hoping we can get this fixed for the next release.

  4. sslavic commented on Jun 5, 2018

    @sslavic

    Improvement for k8s 1.11 which allows description has been provided by @nikhita (see kubernetes/kubernetes#64766).

  5. brancz commented on Jun 5, 2018

    @brancz
    Contributor

    Thanks for investigating @sslavic, I do wonder why the CRD fails to be created by the operator then though, as it shouldn't be rendered in the first place if the code doesn't have the appropriate proto/json tags.

  6. nikhita commented on Jun 5, 2018

    @nikhita

    I do wonder why the CRD fails to be created by the operator then though, as it shouldn't be rendered in the first place if the code doesn't have the appropriate proto/json tags.

    I think the code has the appropriate proto/json tags. In Kubernetes, if the subresource feature is enabled, we validate that some constructs should not be present at the root schema.

    It is rendered, but fails validation.

  7. brancz commented on Jun 5, 2018

    @brancz
    Contributor

    Thanks for the quick answer and explanation @nikhita!

    In that case it sounds we should skip, or at least enable to skip setting the description in the first place: https://github.com/ant31/crd-validation/blob/master/pkg/convert_types.go#L95

  8. nikhita commented on Jun 5, 2018

    @nikhita

    In that case it sounds we should skip, or at least enable to skip setting the description in the first place: https://github.com/ant31/crd-validation/blob/master/pkg/convert_types.go#L95

    I understand the idea here 👍 but that would also disallow you to add descriptions in the subschemas (the non-root ones). :(

  9. brancz commented on Jun 5, 2018

    @brancz
    Contributor

    I see, well if it's just the root one, can we just set that one to be blank?

  10. nikhita commented on Jun 5, 2018

    @nikhita

    I see, well if it's just the root one, can we just set that one to be blank?

    That should do it. I'll send a PR :)

  11. hobti01 commented on Aug 2, 2018

    @hobti01

    Is there any progress on this issue?
    I hope @nikhita had a good holiday but also hope there is time to fix this blocking issue :)

  12. brancz commented on Aug 2, 2018

    @brancz
    Contributor

    @hobti01 have you tried this recently. To my knowledge this works now.

  13. hobti01 commented on Aug 3, 2018

    @hobti01

    I tried this yesterday, was there a change in the last 19 hours? ;)

  14. hobti01 commented on Aug 3, 2018

    @hobti01

    Hopefully this is not one of those "fixed in prometheus-operator but not updated in the helm chart" issues?

  15. brancz commented on Aug 3, 2018

    @brancz
    Contributor

    The helm charts are community maintained and are easily outdated, so that's perfectly possible .. all versions starting from >=0.22.0 are actually tested with CustomResourceSubresources enabled: d609448

  16. hobti01 commented on Aug 3, 2018

    @hobti01

    Thanks for the hint @brancz , I can confirm that this works with updated prometheus-operator and prometheus-config-reloader images.

  17. added a commit that references this issue on Aug 3, 2018
    3e19298
  18. brancz commented on Aug 3, 2018

    @brancz
    Contributor

    In that case I’m closing this here, but please continue to comment should there be more problems related to this, or open a new issue. Thanks a lot for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions