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

test: update bitnami Helm charts to use OCI package #1513

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Makefile.oss.prow
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ push-test-oci-images-public: "$(CRANE)"
cd $(KUSTOMIZE_COMPONENTS_DIR) && crane append -f <(tar -f - -c .) -t $(KUSTOMIZE_COMPONENTS_PUBLIC_GCR_IMAGE)
cd $(KUSTOMIZE_COMPONENTS_DIR) && crane append -f <(tar -f - -c .) -t $(KUSTOMIZE_COMPONENTS_PUBLIC_AR_IMAGE)

# The e2e test expects both versions exist as public.
# See `TestHelmVersionRange` and `rootSyncForWordpressHelmChart` in `e2e/testcases/helm_sync_test.go`.
WORDPRESS_HELM_CHART_VERSIONS := 15.2.35 15.4.1
WORDPRESS_HELM_CHART_SOURCE_REPO := oci://registry-1.docker.io/bitnamicharts/wordpress
WORDPRESS_HELM_CHART_PUBLIC_AR_REPO := oci://$(LOCATION)-docker.pkg.dev/$(TEST_INFRA_PROJECT)/config-sync-test-public

# This target is run as a singleton against the ci-artifacts project, since
# these require for the registries to be public.
.PHONY: push-test-helm-charts-public
push-test-helm-charts-public: "$(HELM)"
$(foreach version, $(WORDPRESS_HELM_CHART_VERSIONS), \
helm pull $(WORDPRESS_HELM_CHART_PUBLIC_AR_REPO)/wordpress \
--version $(version) &> /dev/null || \
$(MAKE) __push-test-helm-chart-from-pull VERSION=$(version);)

.PHONY: __push-test-helm-chart-from-pull
__push-test-helm-chart-from-pull: "$(HELM)"
helm pull $(WORDPRESS_HELM_CHART_SOURCE_REPO) --version $(VERSION)
@gcloud auth print-access-token | helm registry login -u oauth2accesstoken --password-stdin https://$(LOCATION)-docker.pkg.dev
helm push wordpress-$(VERSION).tgz $(WORDPRESS_HELM_CHART_PUBLIC_AR_REPO)

# The following targets are used to provision test resources in a prow environment

# kustomize-components private images (per dev/prow env registry)
Expand Down
2 changes: 1 addition & 1 deletion e2e/testcases/helm_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ func rootSyncForWordpressHelmChart(nt *nomostest.NT, valuesMutator func(map[stri
rs.Spec.Helm = &v1beta1.HelmRootSync{
Namespace: "wordpress",
HelmBase: v1beta1.HelmBase{
Repo: "https://charts.bitnami.com/bitnami",
Repo: "oci://us-docker.pkg.dev/kpt-config-sync-ci-artifacts/config-sync-test-public",
Chart: chartID.Name,
Version: chartID.Version,
ReleaseName: "my-wordpress",
Expand Down
7 changes: 5 additions & 2 deletions e2e/testdata/hydration/deprecated-GK/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ helmCharts:
version: 0.2.0
releaseName: my-prometheus-operator

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
nan-yu marked this conversation as resolved.
Show resolved Hide resolved
includeSelectors: true
includeTemplates: true
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ helmCharts:
commonAnnotations:
hydration-tool: kustomize

commonLabels:
team: monitoring
labels:
- pairs:
team: monitoring
includeSelectors: true
includeTemplates: true
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ helmCharts:
namespace: coredns
valuesFile: https://raw.githubusercontent.com/config-sync-examples/helm-components/main/coredns-values.yaml
- name: wordpress
repo: https://charts.bitnami.com/bitnami
repo: oci://us-docker.pkg.dev/kpt-config-sync-ci-artifacts/config-sync-test-public
version: 15.2.35
releaseName: my-wordpress
namespace: wordpress
valuesInline:
service:
type: ClusterIP

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
includeSelectors: true
includeTemplates: true
9 changes: 6 additions & 3 deletions e2e/testdata/hydration/helm-components/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ helmCharts:
releaseName: my-coredns
namespace: coredns
- name: wordpress
repo: https://charts.bitnami.com/bitnami
repo: oci://us-docker.pkg.dev/kpt-config-sync-ci-artifacts/config-sync-test-public
version: 15.2.35
releaseName: my-wordpress
namespace: wordpress
Expand All @@ -30,5 +30,8 @@ helmCharts:
service:
type: ClusterIP

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
includeSelectors: true
includeTemplates: true
7 changes: 5 additions & 2 deletions e2e/testdata/hydration/helm-overlay/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ helmCharts:
commonAnnotations:
hydration-tool: kustomize

commonLabels:
team: coredns
labels:
- pairs:
team: coredns
includeSelectors: true
includeTemplates: true
7 changes: 5 additions & 2 deletions e2e/testdata/hydration/helm-overlay/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
resources:
- overlay

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
includeSelectors: true
includeTemplates: true
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ resources:
- role.yaml
- networkpolicy.yaml

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
includeSelectors: true
includeTemplates: true
7 changes: 5 additions & 2 deletions e2e/testdata/hydration/namespace-repo/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ resources:
- role.yaml
- networkpolicy.yaml

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
includeSelectors: true
includeTemplates: true
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ patches:
- op: replace
path: /subjects/0/name
value: [email protected]
commonLabels:
environment: dev
labels:
- pairs:
environment: dev
includeSelectors: true
includeTemplates: true
7 changes: 5 additions & 2 deletions e2e/testdata/hydration/remote-base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
resources:
- overlay

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
includeSelectors: true
includeTemplates: true
7 changes: 5 additions & 2 deletions e2e/testdata/hydration/remote-overlay-kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
resources:
- github.com/config-sync-examples/kustomize-components/tenant-b?ref=main

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
includeSelectors: true
includeTemplates: true
7 changes: 5 additions & 2 deletions e2e/testdata/hydration/remote-resources-kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
resources:
- github.com/config-sync-examples/kustomize-components?ref=main

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
includeSelectors: true
includeTemplates: true
7 changes: 5 additions & 2 deletions e2e/testdata/hydration/resource-duplicate/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ resources:
- github.com/config-sync-examples/kustomize-components?ref=main
- namespace_tenant-a.yaml

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
includeSelectors: true
includeTemplates: true