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

Conversation

nan-yu
Copy link
Contributor

@nan-yu nan-yu commented Dec 16, 2024

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.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from nan-yu. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nan-yu and reviewers,

code-review-assist is currently reviewing this pull request and will provide feedback shortly. In the meantime, here's a summary to help everyone quickly understand the changes:

This PR updates the Bitnami Helm chart repository URLs in the e2e tests to use the new OCI package format. This addresses an issue where helm pull was failing due to the old repository being unavailable. The PR also replaces the deprecated commonLabels with the updated labels field in several kustomization.yaml files to resolve a deprecation warning.

Specifically, the following files were modified:

  • e2e/testcases/helm_sync_test.go: Updated the Bitnami Helm repo URL to point to the OCI registry.
  • Multiple kustomization.yaml files under e2e/testdata/hydration/: Replaced commonLabels with labels to fix deprecation warnings. These files include: deprecated-GK/kustomization.yaml, dry-repo-without-kustomization/base/kustomization.yaml, helm-components-remote-values-kustomization.yaml, helm-components/kustomization.yaml, helm-overlay/base/kustomization.yaml, helm-overlay/kustomization.yaml, kustomize-components/base/kustomization.yaml, namespace-repo/base/kustomization.yaml, relative-path/overlays/dev/kustomization.yaml, remote-base/kustomization.yaml, remote-overlay-kustomization.yaml, remote-resources-kustomization.yaml, and resource-duplicate/kustomization.yaml.

These changes ensure the e2e tests continue to function correctly with the updated Bitnami Helm chart repository and address the deprecation warning.


And now, a little haiku to brighten your day:

Old repo's gone away,
OCI's new path shines bright now,
Tests run, all is well.

Thanks!

@nan-yu nan-yu requested a review from sdowell December 16, 2024 18:49
Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request updates the Bitnami Helm chart repository URL to use the OCI registry and replaces the deprecated commonLabels with labels. The changes are necessary and well-implemented. The commit message clearly explains the reason for the change and provides helpful links to the Bitnami blog post and the error log. The changes to the YAML files are correct and consistent. Overall, this is a good pull request and ready to be merged after addressing the minor suggestions below.

One minor suggestion is to ensure consistent formatting for the labels section across all YAML files. Some files use a single pair under labels, while others use a list of pairs. While both are valid, choosing one style and applying it consistently will improve readability.

e2e/testcases/helm_sync_test.go Outdated Show resolved Hide resolved
e2e/testdata/hydration/helm-components/kustomization.yaml Outdated Show resolved Hide resolved
@google-oss-prow google-oss-prow bot added size/L and removed size/M labels Dec 17, 2024
@nan-yu nan-yu force-pushed the helm-fix branch 2 times, most recently from 8dece8c to ac9d3ea Compare December 17, 2024 00:34
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants