Skip to content

feat: add healthchecks for TenantResource and GlobalTenantResource #1922

Description

@oliverbaehler

Describe the feature

A clear and concise description of the feature.

Currently for TenantResource and GlobalTenantResource we only provide a Ready condition which is based on if objects were successfully applied or not. We should provide an additional condition Healthy where we can verify if resulting objects are healthy, with custom expressions or kstatus compability.

---
apiVersion: capsule.clastix.io/v1beta2
kind: GlobalTenantResource
metadata:
  name: tenant-sops-providers
spec:
  resyncPeriod: 600s
  scope: Tenant
  healthChecks:
    - apiVersion:  addons.projectcapsule.dev/v1alpha1
      kind: SopsProvider
      failed: status.conditions.filter(e, e.type == 'Synced').all(e, e.status == 'False')
      current: status.conditions.filter(e, e.type == 'Synced').all(e, e.status == 'True')
  resources:
    - rawItems:
        - apiVersion: addons.projectcapsule.dev/v1alpha1
          kind: SopsProvider
          metadata:
            name: "{{tenant.name}}-secrets"
          spec:
            keys:
            - namespaceSelector:
                matchLabels:
                  capsule.clastix.io/tenant: "{{tenant.name}}"
            sops:
            - namespaceSelector:
                matchLabels:
                  capsule.clastix.io/tenant: "{{tenant.name}}"

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