Skip to content

Commit

Permalink
test: update bitnami Helm charts to use OCI package
Browse files Browse the repository at this point in the history
Per
https://blog.bitnami.com/2023/04/httpsblog.bitnami.com202304bitnami-helm-charts-now-oci.html,
Bitnami Helm charts are now GA as OCI packages. This commit updates its
repo URL to use the OCI package, which fixes the `helm pull` error:
```
KNV1068: failed to run kustomize build in /repo/source/.worktrees/b2c6bf5708654b1c2b7fbd898b48ca206de5a47b/helm-components, stdout: : # Warning: 'commonLabels' is deprecated. Please use 'labels' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
                Error: Error: looks like "https://charts.bitnami.com/bitnami" is not a valid chart repository or cannot be reached: Get "https://charts.bitnami.com/bitnami/index.yaml": dial tcp: lookup charts.bitnami.com on 10.66.32.10:53: server misbehaving
                : unable to run: 'helm pull --untar --untardir /repo/source/.worktrees/b2c6bf5708654b1c2b7fbd898b48ca206de5a47b/helm-components/charts/wordpress-15.2.35 --repo https://charts.bitnami.com/bitnami wordpress --version 15.2.35' with env=[HELM_CONFIG_HOME=/tmp/kustomize-helm-1930457181/helm HELM_CACHE_HOME=/tmp/kustomize-helm-1930457181/helm/.cache HELM_DATA_HOME=/tmp/kustomize-helm-1930457181/helm/.data] (is 'helm' installed?): exit status 1
```

Link: https://oss.gprow.dev/view/gs/oss-prow-build-kpt-config-sync/logs/kpt-config-sync-standard-regular-csr/1868596976711372800

It also replaces the deprecated `commonLabels` with `labels` to suppress
the warning.
  • Loading branch information
nan-yu committed Dec 16, 2024
1 parent 478b45e commit a309922
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 29 deletions.
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://registry-1.docker.io/bitnamicharts",
Chart: chartID.Name,
Version: chartID.Version,
ReleaseName: "my-wordpress",
Expand Down
5 changes: 3 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,6 @@ helmCharts:
version: 0.2.0
releaseName: my-prometheus-operator

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ helmCharts:
commonAnnotations:
hydration-tool: kustomize

commonLabels:
team: monitoring
labels:
- pairs:
team: monitoring
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ 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://registry-1.docker.io/bitnamicharts
version: 15.2.35
releaseName: my-wordpress
namespace: wordpress
valuesInline:
service:
type: ClusterIP

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
7 changes: 4 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://registry-1.docker.io/bitnamicharts
version: 15.2.35
releaseName: my-wordpress
namespace: wordpress
Expand All @@ -30,5 +30,6 @@ helmCharts:
service:
type: ClusterIP

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
5 changes: 3 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,6 @@ helmCharts:
commonAnnotations:
hydration-tool: kustomize

commonLabels:
team: coredns
labels:
- pairs:
team: coredns
5 changes: 3 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,6 @@
resources:
- overlay

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

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
5 changes: 3 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,6 @@ resources:
- role.yaml
- networkpolicy.yaml

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ patches:
- op: replace
path: /subjects/0/name
value: [email protected]
commonLabels:
environment: dev
labels:
- pairs:
environment: dev
5 changes: 3 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,6 @@
resources:
- overlay

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
5 changes: 3 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,6 @@
resources:
- github.com/config-sync-examples/kustomize-components/tenant-b?ref=main

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
5 changes: 3 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,6 @@
resources:
- github.com/config-sync-examples/kustomize-components?ref=main

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration
5 changes: 3 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,6 @@ resources:
- github.com/config-sync-examples/kustomize-components?ref=main
- namespace_tenant-a.yaml

commonLabels:
test-case: hydration
labels:
- pairs:
test-case: hydration

0 comments on commit a309922

Please sign in to comment.