banzaicloud / koperator

Oh no! Yet another Apache Kafka operator for Kubernetes
Apache License 2.0
788 stars 198 forks source link

Gitops tools keep reporting CRDs as out-of-sync due to status field #389

Closed abyth closed 4 years ago

abyth commented 4 years ago

Describe the bug CRDs contain status information that are subject to change once they are applied to a cluster. Gitops tools like argo-cd detect those changes and mark the entries as out-of-sync

Steps to reproduce the issue:

Expected behavior CRDs do not contain information that are subject to change, allowing gitops tools like argo-cd to successfully manage them and keep them in-sync

Additional context argo-cd: v1.5.2 kafka-operator: v0.12.0

stoader commented 4 years ago

@abyth Those fields are set by Kubernetes and used to store information about the state if CRD itself (e.g. what versions of the CRD Kubernetes serves in case a resource has multiple versions).

abyth commented 4 years ago

Thanks for your reply. I do understand what the fields are used for - i was just wondering whether or not they have to be part of the definition. Other CRDs we are using feature that field but are not defining it in the CRD resource. Forgot to mention it: We got around the issue by explicitly ignoring the /status field in our application:

  ignoreDifferences:
    - group: apiextensions.k8s.io
      kind: CustomResourceDefinition
      jsonPointers:
      - /status