You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
k8s 1.10 with CustomResourceSubresources=true prevents operator from creating CRDs #1293
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.
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.
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
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!
Activity
brancz commentedon May 2, 2018
Thanks for reporting this! This is definitely a bug we need to fix! (cc @mxinden)
ajwdev commentedon May 14, 2018
Just ran into this. Is there any workarounds at the moment?
brancz commentedon May 15, 2018
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.
sslavic commentedon Jun 5, 2018
It seems https://github.com/kubernetes/apiextensions-apiserver/blob/master/pkg/apis/apiextensions/validation/validation.go#L303 doesn't allow
descriptionfield thatAlertmanagerand other Prometheus Operator CRDs use inopenAPIV3Schemahttps://github.com/coreos/prometheus-operator/blob/master/example/prometheus-operator-crd/alertmanager.crd.yaml#L15Quick fix could be just to remove the problematic field from CRDs.
sslavic commentedon Jun 5, 2018
Improvement for k8s 1.11 which allows
descriptionhas been provided by @nikhita (see kubernetes/kubernetes#64766).brancz commentedon Jun 5, 2018
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.
nikhita commentedon Jun 5, 2018
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.
brancz commentedon Jun 5, 2018
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
nikhita commentedon Jun 5, 2018
I understand the idea here 👍 but that would also disallow you to add descriptions in the subschemas (the non-root ones). :(
brancz commentedon Jun 5, 2018
I see, well if it's just the root one, can we just set that one to be blank?
nikhita commentedon Jun 5, 2018
That should do it. I'll send a PR :)
hobti01 commentedon Aug 2, 2018
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 :)
brancz commentedon Aug 2, 2018
@hobti01 have you tried this recently. To my knowledge this works now.
hobti01 commentedon Aug 3, 2018
I tried this yesterday, was there a change in the last 19 hours? ;)
hobti01 commentedon Aug 3, 2018
Hopefully this is not one of those "fixed in prometheus-operator but not updated in the helm chart" issues?
brancz commentedon Aug 3, 2018
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
hobti01 commentedon Aug 3, 2018
Thanks for the hint @brancz , I can confirm that this works with updated prometheus-operator and prometheus-config-reloader images.
Update prometheus operator version
brancz commentedon Aug 3, 2018
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!