From e4ed64cdf8192f42d79792b3d922fcb5a204c395 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Fri, 20 Sep 2024 12:56:21 +0000 Subject: [PATCH] change tests Signed-off-by: Austin Abro --- src/internal/bigbang/bigbang_test.go | 270 ++++++++++++------ .../bigbang/testdata/create/default.yaml | 132 --------- .../bigbang/testdata/create/not_airgap.yaml | 75 ----- .../bigbang/testdata/create/skip_flux.yaml | 120 -------- 4 files changed, 176 insertions(+), 421 deletions(-) delete mode 100644 src/internal/bigbang/testdata/create/default.yaml delete mode 100644 src/internal/bigbang/testdata/create/not_airgap.yaml delete mode 100644 src/internal/bigbang/testdata/create/skip_flux.yaml diff --git a/src/internal/bigbang/bigbang_test.go b/src/internal/bigbang/bigbang_test.go index d28dd141ae..cd058bfad0 100644 --- a/src/internal/bigbang/bigbang_test.go +++ b/src/internal/bigbang/bigbang_test.go @@ -260,22 +260,88 @@ func TestAddBigBangManifests(t *testing.T) { func TestCreate(t *testing.T) { t.Parallel() + bbHealthChecks := []v1alpha1.NamespacedObjectKindReference{ + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "grafana"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "istio"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "istio-operator"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "kiali"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "kyverno"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "kyverno-policies"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "kyverno-reporter"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "loki"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "monitoring"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "neuvector"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "promtail"}, + {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "tempo"}, + } + bbImages := []string{ + "registry1.dso.mil/ironbank/big-bang/grafana/grafana-plugins:11.1.4", + "registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:1.27.5", + "registry1.dso.mil/ironbank/big-bang/base:2.1.0", + "registry1.dso.mil/ironbank/opensource/istio/pilot:1.22.4", + "registry1.dso.mil/ironbank/opensource/istio/proxyv2:1.22.4", + "registry1.dso.mil/ironbank/opensource/istio/operator:1.22.4", + "registry1.dso.mil/ironbank/opensource/kiali/kiali:v1.89.0", + "registry1.dso.mil/ironbank/opensource/kiali/kiali-operator:v1.89.1", + "registry1.dso.mil/ironbank/opensource/kyverno:v1.12.5", + "registry1.dso.mil/ironbank/opensource/kyverno/kyvernopre:v1.12.5", + "registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.7", + "registry1.dso.mil/ironbank/redhat/ubi/ubi9-minimal:9.4", + "registry1.dso.mil/ironbank/opensource/kyverno/kyverno/reports-controller:v1.12.5", + "registry1.dso.mil/ironbank/opensource/kyverno/kyverno/background-controller:v1.12.5", + "registry1.dso.mil/ironbank/opensource/kyverno/kyverno/cleanup-controller:v1.12.5", + "registry1.dso.mil/ironbank/opensource/kyverno/kyvernocli:v1.12.5", + "registry1.dso.mil/ironbank/opensource/kyverno/policy-reporter:2.20.1", + "registry1.dso.mil/ironbank/opensource/grafana/loki:3.1.1", + "registry1.dso.mil/ironbank/opensource/kubernetes-sigs/metrics-server:v0.7.1", + "registry1.dso.mil/ironbank/opensource/prometheus/alertmanager:v0.27.0", + "registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.6", + "registry1.dso.mil/ironbank/opensource/kubernetes/kube-state-metrics:v2.12.0", + "registry1.dso.mil/ironbank/opensource/ingress-nginx/kube-webhook-certgen:v1.3.0", + "registry1.dso.mil/ironbank/opensource/prometheus/prometheus:v2.53.0", + "registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-config-reloader:v0.75.0", + "registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-operator:v0.75.0", + "registry1.dso.mil/ironbank/opensource/prometheus/node-exporter:v1.8.1", + "registry1.dso.mil/ironbank/opensource/thanos/thanos:v0.35.1", + "registry1.dso.mil/ironbank/neuvector/neuvector/controller:5.3.4", + "registry1.dso.mil/ironbank/neuvector/neuvector/enforcer:5.3.4", + "registry1.dso.mil/ironbank/neuvector/neuvector/manager:5.3.4", + "registry1.dso.mil/ironbank/neuvector/neuvector/scanner:5", + "registry1.dso.mil/ironbank/neuvector/neuvector/prometheus-exporter:5.3.2", + "registry1.dso.mil/ironbank/opensource/grafana/promtail:v3.0.0", + "registry1.dso.mil/ironbank/opensource/grafana/tempo:2.5.0", + "registry1.dso.mil/ironbank/opensource/grafana/tempo-query:2.5.0", + } + bbRepos := []string{ + "https://repo1.dso.mil/big-bang/bigbang@2.35.0", + "https://repo1.dso.mil/big-bang/product/packages/grafana.git@8.4.6-bb.1", + "https://repo1.dso.mil/big-bang/product/packages/istio-controlplane.git@1.22.4-bb.1", + "https://repo1.dso.mil/big-bang/product/packages/istio-operator.git@1.22.4-bb.0", + "https://repo1.dso.mil/big-bang/product/packages/kiali.git@1.89.0-bb.0", + "https://repo1.dso.mil/big-bang/product/packages/kyverno-policies.git@3.2.5-bb.3", + "https://repo1.dso.mil/big-bang/product/packages/kyverno-reporter.git@2.24.1-bb.0", + "https://repo1.dso.mil/big-bang/product/packages/kyverno.git@3.2.6-bb.0", + "https://repo1.dso.mil/big-bang/product/packages/loki.git@6.10.0-bb.0", + "https://repo1.dso.mil/big-bang/product/packages/metrics-server.git@3.12.1-bb.4", + "https://repo1.dso.mil/big-bang/product/packages/monitoring.git@62.1.0-bb.0", + "https://repo1.dso.mil/big-bang/product/packages/neuvector.git@2.7.8-bb.1", + "https://repo1.dso.mil/big-bang/product/packages/promtail.git@6.16.2-bb.3", + "https://repo1.dso.mil/big-bang/product/packages/tempo.git@1.10.3-bb.0", + } tests := []struct { - name string - airgap bool - version string - repo string - skipFlux bool - pkg v1alpha1.ZarfPackage - expectedPackage string + name string + airgap bool + version string + repo string + skipFlux bool + pkg v1alpha1.ZarfPackage }{ { - name: "default BB install", - airgap: true, - version: "2.35.0", - repo: "https://repo1.dso.mil/big-bang/bigbang", - skipFlux: false, - expectedPackage: filepath.Join("testdata", "create", "default.yaml"), + name: "default BB install", + airgap: true, + version: "2.35.0", + repo: "https://repo1.dso.mil/big-bang/bigbang", + skipFlux: false, pkg: v1alpha1.ZarfPackage{ APIVersion: "zarf.dev/v1alpha1", Kind: v1alpha1.ZarfPackageConfig, @@ -314,60 +380,52 @@ func TestCreate(t *testing.T) { }, }, }, - Images: []string{ - "registry1.dso.mil/ironbank/big-bang/grafana/grafana-plugins:11.1.4", - "registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:1.27.5", - "registry1.dso.mil/ironbank/big-bang/base:2.1.0", - "registry1.dso.mil/ironbank/opensource/istio/pilot:1.22.4", - "registry1.dso.mil/ironbank/opensource/istio/proxyv2:1.22.4", - "registry1.dso.mil/ironbank/opensource/istio/operator:1.22.4", - "registry1.dso.mil/ironbank/opensource/kiali/kiali:v1.89.0", - "registry1.dso.mil/ironbank/opensource/kiali/kiali-operator:v1.89.1", - "registry1.dso.mil/ironbank/opensource/kyverno:v1.12.5", - "registry1.dso.mil/ironbank/opensource/kyverno/kyvernopre:v1.12.5", - "registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.7", - "registry1.dso.mil/ironbank/redhat/ubi/ubi9-minimal:9.4", - "registry1.dso.mil/ironbank/opensource/kyverno/kyverno/reports-controller:v1.12.5", - "registry1.dso.mil/ironbank/opensource/kyverno/kyverno/background-controller:v1.12.5", - "registry1.dso.mil/ironbank/opensource/kyverno/kyverno/cleanup-controller:v1.12.5", - "registry1.dso.mil/ironbank/opensource/kyverno/kyvernocli:v1.12.5", - "registry1.dso.mil/ironbank/opensource/kyverno/policy-reporter:2.20.1", - "registry1.dso.mil/ironbank/opensource/grafana/loki:3.1.1", - "registry1.dso.mil/ironbank/opensource/kubernetes-sigs/metrics-server:v0.7.1", - "registry1.dso.mil/ironbank/opensource/prometheus/alertmanager:v0.27.0", - "registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.6", - "registry1.dso.mil/ironbank/opensource/kubernetes/kube-state-metrics:v2.12.0", - "registry1.dso.mil/ironbank/opensource/ingress-nginx/kube-webhook-certgen:v1.3.0", - "registry1.dso.mil/ironbank/opensource/prometheus/prometheus:v2.53.0", - "registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-config-reloader:v0.75.0", - "registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-operator:v0.75.0", - "registry1.dso.mil/ironbank/opensource/prometheus/node-exporter:v1.8.1", - "registry1.dso.mil/ironbank/opensource/thanos/thanos:v0.35.1", - "registry1.dso.mil/ironbank/neuvector/neuvector/controller:5.3.4", - "registry1.dso.mil/ironbank/neuvector/neuvector/enforcer:5.3.4", - "registry1.dso.mil/ironbank/neuvector/neuvector/manager:5.3.4", - "registry1.dso.mil/ironbank/neuvector/neuvector/scanner:5", - "registry1.dso.mil/ironbank/neuvector/neuvector/prometheus-exporter:5.3.2", - "registry1.dso.mil/ironbank/opensource/grafana/promtail:v3.0.0", - "registry1.dso.mil/ironbank/opensource/grafana/tempo:2.5.0", - "registry1.dso.mil/ironbank/opensource/grafana/tempo-query:2.5.0", + Images: bbImages, + Repos: bbRepos, + Actions: v1alpha1.ZarfComponentActions{ + OnRemove: v1alpha1.ZarfComponentActionSet{ + Before: []v1alpha1.ZarfComponentAction{ + { + 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.", + }, + }, + }, }, - Repos: []string{ - "https://repo1.dso.mil/big-bang/bigbang@2.35.0", - "https://repo1.dso.mil/big-bang/product/packages/grafana.git@8.4.6-bb.1", - "https://repo1.dso.mil/big-bang/product/packages/istio-controlplane.git@1.22.4-bb.1", - "https://repo1.dso.mil/big-bang/product/packages/istio-operator.git@1.22.4-bb.0", - "https://repo1.dso.mil/big-bang/product/packages/kiali.git@1.89.0-bb.0", - "https://repo1.dso.mil/big-bang/product/packages/kyverno-policies.git@3.2.5-bb.3", - "https://repo1.dso.mil/big-bang/product/packages/kyverno-reporter.git@2.24.1-bb.0", - "https://repo1.dso.mil/big-bang/product/packages/kyverno.git@3.2.6-bb.0", - "https://repo1.dso.mil/big-bang/product/packages/loki.git@6.10.0-bb.0", - "https://repo1.dso.mil/big-bang/product/packages/metrics-server.git@3.12.1-bb.4", - "https://repo1.dso.mil/big-bang/product/packages/monitoring.git@62.1.0-bb.0", - "https://repo1.dso.mil/big-bang/product/packages/neuvector.git@2.7.8-bb.1", - "https://repo1.dso.mil/big-bang/product/packages/promtail.git@6.16.2-bb.3", - "https://repo1.dso.mil/big-bang/product/packages/tempo.git@1.10.3-bb.0", + HealthChecks: bbHealthChecks, + }, + }, + }, + }, + { + name: "skip flux", + airgap: true, + version: "2.35.0", + repo: "https://repo1.dso.mil/big-bang/bigbang", + skipFlux: true, + pkg: v1alpha1.ZarfPackage{ + APIVersion: "zarf.dev/v1alpha1", + Kind: v1alpha1.ZarfPackageConfig, + Metadata: v1alpha1.ZarfMetadata{ + Name: "bigbang", + }, + Components: []v1alpha1.ZarfComponent{ + { + Name: "bigbang", + Required: helpers.BoolPtr(true), + Manifests: []v1alpha1.ZarfManifest{ + { + Name: "bigbang", + Namespace: "bigbang", + Files: []string{ + "manifests/bb-gitrepository.yaml", + "manifests/bb-zarf-credentials.yaml", + "manifests/bb-helmrelease.yaml", + }, + }, }, + Images: bbImages, + Repos: bbRepos, Actions: v1alpha1.ZarfComponentActions{ OnRemove: v1alpha1.ZarfComponentActionSet{ Before: []v1alpha1.ZarfComponentAction{ @@ -378,40 +436,64 @@ func TestCreate(t *testing.T) { }, }, }, - HealthChecks: []v1alpha1.NamespacedObjectKindReference{ - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "grafana"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "istio"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "istio-operator"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "kiali"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "kyverno"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "kyverno-policies"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "kyverno-reporter"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "loki"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "monitoring"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "neuvector"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "promtail"}, - {APIVersion: "helm.toolkit.fluxcd.io/v2", Kind: "HelmRelease", Namespace: "bigbang", Name: "tempo"}, + HealthChecks: bbHealthChecks, + }, + }, + }, + }, + { + name: "Not air gapped", + airgap: false, + version: "2.35.0", + repo: "https://repo1.dso.mil/big-bang/bigbang", + skipFlux: false, + pkg: v1alpha1.ZarfPackage{ + APIVersion: "zarf.dev/v1alpha1", + Kind: v1alpha1.ZarfPackageConfig, + Metadata: v1alpha1.ZarfMetadata{ + YOLO: true, + Name: "bigbang", + }, + Components: []v1alpha1.ZarfComponent{ + { + Name: "flux", + Required: helpers.BoolPtr(true), + Manifests: []v1alpha1.ZarfManifest{ + { + Name: "flux-system", + Namespace: "flux-system", + Files: []string{"flux/bb-flux.yaml"}, + }, + }, + }, + { + Name: "bigbang", + Required: helpers.BoolPtr(true), + Manifests: []v1alpha1.ZarfManifest{ + { + Name: "bigbang", + Namespace: "bigbang", + Files: []string{ + "manifests/bb-gitrepository.yaml", + "manifests/bb-helmrelease.yaml", + }, + }, + }, + Actions: v1alpha1.ZarfComponentActions{ + OnRemove: v1alpha1.ZarfComponentActionSet{ + Before: []v1alpha1.ZarfComponentAction{ + { + 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: bbHealthChecks, }, }, }, }, - // { - // name: "skip flux", - // airgap: true, - // version: "2.35.0", - // repo: "https://repo1.dso.mil/big-bang/bigbang", - // skipFlux: true, - // expectedPackage: filepath.Join("testdata", "create", "skip_flux.yaml"), - // }, - // { - // name: "Not air gapped", - // airgap: false, - // version: "2.35.0", - // repo: "https://repo1.dso.mil/big-bang/bigbang", - // skipFlux: false, - // expectedPackage: filepath.Join("testdata", "create", "not_airgap.yaml"), - // }, } for _, tt := range tests { diff --git a/src/internal/bigbang/testdata/create/default.yaml b/src/internal/bigbang/testdata/create/default.yaml deleted file mode 100644 index d85f8a9cdc..0000000000 --- a/src/internal/bigbang/testdata/create/default.yaml +++ /dev/null @@ -1,132 +0,0 @@ -apiVersion: zarf.dev/v1alpha1 -kind: ZarfPackageConfig -metadata: - name: bigbang -components: -- name: flux - required: true - manifests: - - name: flux-system - namespace: flux-system - files: - - flux/bb-flux.yaml - images: - - registry1.dso.mil/ironbank/fluxcd/source-controller:v1.3.0 - - registry1.dso.mil/ironbank/fluxcd/kustomize-controller:v1.3.0 - - registry1.dso.mil/ironbank/fluxcd/helm-controller:v1.0.1 - - registry1.dso.mil/ironbank/fluxcd/notification-controller:v1.3.0 -- name: bigbang - required: true - manifests: - - name: bigbang - namespace: bigbang - files: - - manifests/bb-gitrepository.yaml - - manifests/bb-zarf-credentials.yaml - - manifests/bb-helmrelease.yaml - images: - - registry1.dso.mil/ironbank/big-bang/grafana/grafana-plugins:11.1.4 - - registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:1.27.5 - - registry1.dso.mil/ironbank/big-bang/base:2.1.0 - - registry1.dso.mil/ironbank/opensource/istio/pilot:1.22.4 - - registry1.dso.mil/ironbank/opensource/istio/proxyv2:1.22.4 - - registry1.dso.mil/ironbank/opensource/istio/operator:1.22.4 - - registry1.dso.mil/ironbank/opensource/kiali/kiali:v1.89.0 - - registry1.dso.mil/ironbank/opensource/kiali/kiali-operator:v1.89.1 - - registry1.dso.mil/ironbank/opensource/kyverno:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/kyvernopre:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.7 - - registry1.dso.mil/ironbank/redhat/ubi/ubi9-minimal:9.4 - - registry1.dso.mil/ironbank/opensource/kyverno/kyverno/reports-controller:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/kyverno/background-controller:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/kyverno/cleanup-controller:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/kyvernocli:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/policy-reporter:2.20.1 - - registry1.dso.mil/ironbank/opensource/grafana/loki:3.1.1 - - registry1.dso.mil/ironbank/opensource/kubernetes-sigs/metrics-server:v0.7.1 - - registry1.dso.mil/ironbank/opensource/prometheus/alertmanager:v0.27.0 - - registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.6 - - registry1.dso.mil/ironbank/opensource/kubernetes/kube-state-metrics:v2.12.0 - - registry1.dso.mil/ironbank/opensource/ingress-nginx/kube-webhook-certgen:v1.3.0 - - registry1.dso.mil/ironbank/opensource/prometheus/prometheus:v2.53.0 - - registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-config-reloader:v0.75.0 - - registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-operator:v0.75.0 - - registry1.dso.mil/ironbank/opensource/prometheus/node-exporter:v1.8.1 - - registry1.dso.mil/ironbank/opensource/thanos/thanos:v0.35.1 - - registry1.dso.mil/ironbank/neuvector/neuvector/controller:5.3.4 - - registry1.dso.mil/ironbank/neuvector/neuvector/enforcer:5.3.4 - - registry1.dso.mil/ironbank/neuvector/neuvector/manager:5.3.4 - - registry1.dso.mil/ironbank/neuvector/neuvector/scanner:5 - - registry1.dso.mil/ironbank/neuvector/neuvector/prometheus-exporter:5.3.2 - - registry1.dso.mil/ironbank/opensource/grafana/promtail:v3.0.0 - - registry1.dso.mil/ironbank/opensource/grafana/tempo:2.5.0 - - registry1.dso.mil/ironbank/opensource/grafana/tempo-query:2.5.0 - repos: - - https://repo1.dso.mil/big-bang/bigbang@2.35.0 - - https://repo1.dso.mil/big-bang/product/packages/grafana.git@8.4.6-bb.1 - - https://repo1.dso.mil/big-bang/product/packages/istio-controlplane.git@1.22.4-bb.1 - - https://repo1.dso.mil/big-bang/product/packages/istio-operator.git@1.22.4-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/kiali.git@1.89.0-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/kyverno-policies.git@3.2.5-bb.3 - - https://repo1.dso.mil/big-bang/product/packages/kyverno-reporter.git@2.24.1-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/kyverno.git@3.2.6-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/loki.git@6.10.0-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/metrics-server.git@3.12.1-bb.4 - - https://repo1.dso.mil/big-bang/product/packages/monitoring.git@62.1.0-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/neuvector.git@2.7.8-bb.1 - - https://repo1.dso.mil/big-bang/product/packages/promtail.git@6.16.2-bb.3 - - https://repo1.dso.mil/big-bang/product/packages/tempo.git@1.10.3-bb.0 - actions: - onRemove: - before: - - 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: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: grafana - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: istio - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: istio-operator - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kiali - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kyverno - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kyverno-policies - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kyverno-reporter - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: loki - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: monitoring - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: neuvector - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: promtail - - 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 deleted file mode 100644 index 9b3a92ccab..0000000000 --- a/src/internal/bigbang/testdata/create/not_airgap.yaml +++ /dev/null @@ -1,75 +0,0 @@ -apiVersion: zarf.dev/v1alpha1 -kind: ZarfPackageConfig -metadata: - name: bigbang - yolo: true -components: -- name: flux - required: true - manifests: - - name: flux-system - namespace: flux-system - files: - - flux/bb-flux.yaml -- name: bigbang - required: true - manifests: - - name: bigbang - namespace: bigbang - files: - - manifests/bb-gitrepository.yaml - - manifests/bb-helmrelease.yaml - actions: - onRemove: - before: - - 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: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: grafana - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: istio - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: istio-operator - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kiali - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kyverno - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kyverno-policies - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kyverno-reporter - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: loki - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: monitoring - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: neuvector - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: promtail - - 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 deleted file mode 100644 index bb21a5be29..0000000000 --- a/src/internal/bigbang/testdata/create/skip_flux.yaml +++ /dev/null @@ -1,120 +0,0 @@ -apiVersion: zarf.dev/v1alpha1 -kind: ZarfPackageConfig -metadata: - name: bigbang -components: -- name: bigbang - required: true - manifests: - - name: bigbang - namespace: bigbang - files: - - manifests/bb-gitrepository.yaml - - manifests/bb-zarf-credentials.yaml - - manifests/bb-helmrelease.yaml - images: - - registry1.dso.mil/ironbank/big-bang/grafana/grafana-plugins:11.1.4 - - registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:1.27.5 - - registry1.dso.mil/ironbank/big-bang/base:2.1.0 - - registry1.dso.mil/ironbank/opensource/istio/pilot:1.22.4 - - registry1.dso.mil/ironbank/opensource/istio/proxyv2:1.22.4 - - registry1.dso.mil/ironbank/opensource/istio/operator:1.22.4 - - registry1.dso.mil/ironbank/opensource/kiali/kiali:v1.89.0 - - registry1.dso.mil/ironbank/opensource/kiali/kiali-operator:v1.89.1 - - registry1.dso.mil/ironbank/opensource/kyverno:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/kyvernopre:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.7 - - registry1.dso.mil/ironbank/redhat/ubi/ubi9-minimal:9.4 - - registry1.dso.mil/ironbank/opensource/kyverno/kyverno/reports-controller:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/kyverno/background-controller:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/kyverno/cleanup-controller:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/kyvernocli:v1.12.5 - - registry1.dso.mil/ironbank/opensource/kyverno/policy-reporter:2.20.1 - - registry1.dso.mil/ironbank/opensource/grafana/loki:3.1.1 - - registry1.dso.mil/ironbank/opensource/kubernetes-sigs/metrics-server:v0.7.1 - - registry1.dso.mil/ironbank/opensource/prometheus/alertmanager:v0.27.0 - - registry1.dso.mil/ironbank/opensource/kubernetes/kubectl:v1.29.6 - - registry1.dso.mil/ironbank/opensource/kubernetes/kube-state-metrics:v2.12.0 - - registry1.dso.mil/ironbank/opensource/ingress-nginx/kube-webhook-certgen:v1.3.0 - - registry1.dso.mil/ironbank/opensource/prometheus/prometheus:v2.53.0 - - registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-config-reloader:v0.75.0 - - registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-operator:v0.75.0 - - registry1.dso.mil/ironbank/opensource/prometheus/node-exporter:v1.8.1 - - registry1.dso.mil/ironbank/opensource/thanos/thanos:v0.35.1 - - registry1.dso.mil/ironbank/neuvector/neuvector/controller:5.3.4 - - registry1.dso.mil/ironbank/neuvector/neuvector/enforcer:5.3.4 - - registry1.dso.mil/ironbank/neuvector/neuvector/manager:5.3.4 - - registry1.dso.mil/ironbank/neuvector/neuvector/scanner:5 - - registry1.dso.mil/ironbank/neuvector/neuvector/prometheus-exporter:5.3.2 - - registry1.dso.mil/ironbank/opensource/grafana/promtail:v3.0.0 - - registry1.dso.mil/ironbank/opensource/grafana/tempo:2.5.0 - - registry1.dso.mil/ironbank/opensource/grafana/tempo-query:2.5.0 - repos: - - https://repo1.dso.mil/big-bang/bigbang@2.35.0 - - https://repo1.dso.mil/big-bang/product/packages/grafana.git@8.4.6-bb.1 - - https://repo1.dso.mil/big-bang/product/packages/istio-controlplane.git@1.22.4-bb.1 - - https://repo1.dso.mil/big-bang/product/packages/istio-operator.git@1.22.4-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/kiali.git@1.89.0-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/kyverno-policies.git@3.2.5-bb.3 - - https://repo1.dso.mil/big-bang/product/packages/kyverno-reporter.git@2.24.1-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/kyverno.git@3.2.6-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/loki.git@6.10.0-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/metrics-server.git@3.12.1-bb.4 - - https://repo1.dso.mil/big-bang/product/packages/monitoring.git@62.1.0-bb.0 - - https://repo1.dso.mil/big-bang/product/packages/neuvector.git@2.7.8-bb.1 - - https://repo1.dso.mil/big-bang/product/packages/promtail.git@6.16.2-bb.3 - - https://repo1.dso.mil/big-bang/product/packages/tempo.git@1.10.3-bb.0 - actions: - onRemove: - before: - - 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: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: grafana - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: istio - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: istio-operator - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kiali - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kyverno - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kyverno-policies - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: kyverno-reporter - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: loki - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: monitoring - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: neuvector - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: promtail - - apiVersion: helm.toolkit.fluxcd.io/v2 - kind: HelmRelease - namespace: bigbang - name: tempo