redpanda-data / helm-charts

Redpanda Helm Chart
http://redpanda.com
Apache License 2.0
77 stars 96 forks source link

PodDisruptionBudget generated with status field #1458

Closed wdonne closed 3 months ago

wdonne commented 3 months ago

What happened?

When rendering the Helm chart the PodDisruptionBudget resource is generated with a status field.

What did you expect to happen?

No status field. Only a controller should produce that.

How can we reproduce it (as minimally and precisely as possible)?. Please include values file.

```console $ helm helm template redpanda redpanda-data/redpanda # paste output here --- # Source: redpanda/templates/poddisruptionbudget.yaml apiVersion: policy/v1 kind: PodDisruptionBudget metadata: creationTimestamp: null labels: app.kubernetes.io/component: redpanda app.kubernetes.io/instance: redpanda app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: redpanda helm.sh/chart: redpanda-5.8.13 name: redpanda namespace: default spec: maxUnavailable: 1 selector: matchLabels: app.kubernetes.io/component: redpanda-statefulset app.kubernetes.io/instance: redpanda app.kubernetes.io/name: redpanda redpanda.com/poddisruptionbudget: redpanda status: currentHealthy: 0 desiredHealthy: 0 disruptionsAllowed: 0 expectedPods: 0 ```

Anything else we need to know?

No response

Which are the affected charts?

Redpanda

Chart Version(s)

```console 5.8.13 ```

Cloud provider

NA

JIRA Link: K8S-308

chrisseto commented 3 months ago

Hmmm, we could add a special case into gotohelm that excludes .Status from the zero values. It might be difficult to get a handle to the interface but detecting anything implementing meta.Object should do the trick.

See also https://github.com/redpanda-data/helm-charts/pull/1459

chrisseto commented 3 months ago

As a temporary work around, you might be able to use Kustomize's JSON Patches to remove the Status fields.