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

When preventDeletion is set to false, the field is removed #1052

Closed
sandert-k8s opened this issue Apr 25, 2024 · 1 comment · Fixed by #1056
Closed

When preventDeletion is set to false, the field is removed #1052

sandert-k8s opened this issue Apr 25, 2024 · 1 comment · Fixed by #1056
Assignees
Labels
blocked-needs-validation Issue need triage and validation bug Something isn't working
Milestone

Comments

@sandert-k8s
Copy link

sandert-k8s commented Apr 25, 2024

Bug description

preventDeletion is deleted from the tenant spec when it's on false.

How to reproduce

Steps to reproduce the behavior:

  1. Provide the Capsule Tenant YAML definitions
kind: Tenant
metadata:
  name: test-tenant
spec:
  owners:
    - clusterRoles:
        - admin
      kind: Group
      name: test-dev-admin-group
  preventDeletion: false

When preventDeletion is set to false in the tenant spec, this field is deleted in the applied spec, because the default is false. Due to this, some of our tenants keep out of sync in our GitOps tooling (ArgoCD), because Argo tries to add preventDeletion every time, and it gets deleted by Capsule.
Other than that, I think when you specifically set a value (even it's false), it should be added in the config spec.

  • Helm Chart version: (helm list -n capsule-system)
    Helm chart 0.6.2

  • Kubernetes version: (kubectl version)
    OpenShift 4.14.18

@sandert-k8s sandert-k8s added blocked-needs-validation Issue need triage and validation bug Something isn't working labels Apr 25, 2024
@oliverbaehler oliverbaehler self-assigned this Apr 27, 2024
@oliverbaehler oliverbaehler added this to the v0.7.0 milestone Apr 27, 2024
@oliverbaehler
Copy link
Collaborator

You can use this until this is fixed:

  ignoreDifferences:
  - group: capsule.clastix.io
    kind: Tenant
    jqPathExpressions:
      - >-
      - '.spec.preventDeletion'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-needs-validation Issue need triage and validation bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants