From d93eeda45ed32e87c4e189e3e90a9507432242a4 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Thu, 19 Sep 2024 13:30:31 +0000 Subject: [PATCH] fix health checks Signed-off-by: Austin Abro --- src/internal/bigbang/bigbang.go | 4 ++-- .../bigbang/testdata/create/default.yaml | 24 +++++++++---------- .../bigbang/testdata/create/not_airgap.yaml | 24 +++++++++---------- .../bigbang/testdata/create/skip_flux.yaml | 24 +++++++++---------- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/internal/bigbang/bigbang.go b/src/internal/bigbang/bigbang.go index 5a2a6c7e43..b59f79cc80 100644 --- a/src/internal/bigbang/bigbang.go +++ b/src/internal/bigbang/bigbang.go @@ -193,8 +193,8 @@ func Create(ctx context.Context, bbOpts Opts) error { } healthCheck := v1alpha1.NamespacedObjectKindReference{ - APIVersion: "v1", - Kind: "HelmRelease", + APIVersion: hr.typeMeta.APIVersion, + Kind: hr.typeMeta.Kind, Name: hr.metadata.Name, Namespace: hr.metadata.Namespace, } diff --git a/src/internal/bigbang/testdata/create/default.yaml b/src/internal/bigbang/testdata/create/default.yaml index cac2e6c00b..d85f8a9cdc 100644 --- a/src/internal/bigbang/testdata/create/default.yaml +++ b/src/internal/bigbang/testdata/create/default.yaml @@ -82,51 +82,51 @@ components: - cmd: ./zarf tools kubectl patch helmrelease -n bigbang bigbang --type=merge -p '{"spec":{"suspend":true}}' description: Suspend Big Bang HelmReleases to prevent reconciliation during removal. healthChecks: - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: grafana - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: istio - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: istio-operator - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kiali - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kyverno - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kyverno-policies - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kyverno-reporter - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: loki - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: monitoring - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: neuvector - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: promtail - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: tempo diff --git a/src/internal/bigbang/testdata/create/not_airgap.yaml b/src/internal/bigbang/testdata/create/not_airgap.yaml index 6db48ffe94..9b3a92ccab 100644 --- a/src/internal/bigbang/testdata/create/not_airgap.yaml +++ b/src/internal/bigbang/testdata/create/not_airgap.yaml @@ -25,51 +25,51 @@ components: - cmd: ./zarf tools kubectl patch helmrelease -n bigbang bigbang --type=merge -p '{"spec":{"suspend":true}}' description: Suspend Big Bang HelmReleases to prevent reconciliation during removal. healthChecks: - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: grafana - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: istio - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: istio-operator - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kiali - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kyverno - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kyverno-policies - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kyverno-reporter - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: loki - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: monitoring - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: neuvector - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: promtail - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: tempo diff --git a/src/internal/bigbang/testdata/create/skip_flux.yaml b/src/internal/bigbang/testdata/create/skip_flux.yaml index 8f45a04d45..bb21a5be29 100644 --- a/src/internal/bigbang/testdata/create/skip_flux.yaml +++ b/src/internal/bigbang/testdata/create/skip_flux.yaml @@ -70,51 +70,51 @@ components: - cmd: ./zarf tools kubectl patch helmrelease -n bigbang bigbang --type=merge -p '{"spec":{"suspend":true}}' description: Suspend Big Bang HelmReleases to prevent reconciliation during removal. healthChecks: - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: grafana - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: istio - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: istio-operator - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kiali - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kyverno - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kyverno-policies - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: kyverno-reporter - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: loki - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: monitoring - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: neuvector - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: promtail - - apiVersion: v1 + - apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease namespace: bigbang name: tempo