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

.status field present in CRDs #586

Open
daurnimator opened this issue Jun 24, 2020 · 5 comments
Open

.status field present in CRDs #586

daurnimator opened this issue Jun 24, 2020 · 5 comments
Labels

Comments

@daurnimator
Copy link

In the CRD definitions, the trailing field (`.status) is set, e.g. https://github.com/coreos/kube-prometheus/blame/de9591cbb07ec4c2a3d3f95d5526753ea4247f08/manifests/setup/prometheus-operator-0thanosrulerCustomResourceDefinition.yaml#L4854-L4859

This makes the kustomization permanently dirty when trying to apply to a cluster.

Please remove the .status fields from the CRDs.

@brancz
Copy link
Collaborator

brancz commented Jun 25, 2020

This is unfortunately how the CRD generation tools generate them. I believe @pgier had looked into this somewhat recently. Is there an issue on the generation tools to get this fixed?

@daurnimator
Copy link
Author

Is there an issue on the generation tools to get this fixed?

which generation tools do you mean?

@dgrisonnet
Copy link
Contributor

We are using controller-gen to generate the CRDs. The issue was fixed in kubernetes-sigs/controller-tools#433 but AFAIK this patch has not been released yet.

That being said, there is another issue with controller-gen generating invalid CRDs in k8s 1.18 that prevent us from bumping its version. So, even if the patch removing the status field land in the next release, we might not be able to bump controller-gen in prometheus-operator.

@morgante
Copy link

@paulfantom
Copy link
Member

paulfantom commented Aug 18, 2021

This needs to be fixed in controller-tools, until then you can apply a quick and dirty hack in jsonnet code:

    prometheusOperator+: {
      "0alertmanagerConfigCustomResourceDefinition"+: {
        status:: null,
      },
      "0alertmanagerCustomResourceDefinition"+: {
        status:: null,
      },
      "0podmonitorCustomResourceDefinition"+: {
        status:: null,
      },
      "0probeCustomResourceDefinition"+: {
        status:: null,
      },
      "0prometheusCustomResourceDefinition"+: {
        status:: null,
      },
      "0prometheusruleCustomResourceDefinition"+: {
        status:: null,
      },
      "0servicemonitorCustomResourceDefinition"+: {
        status:: null,
      },
      "0thanosrulerCustomResourceDefinition"+: {
        status:: null,
      },
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants