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

Can not use Telepresence as Helm chart dependency #3833

Closed
Blarc opened this issue Apr 3, 2025 · 10 comments · Fixed by #3840
Closed

Can not use Telepresence as Helm chart dependency #3833

Blarc opened this issue Apr 3, 2025 · 10 comments · Fixed by #3840
Assignees

Comments

@Blarc
Copy link

Blarc commented Apr 3, 2025

I have the following Chart.yaml:

apiVersion: v2
dependencies:
  - name: telepresence-oss
    repository: oci://ghcr.io/telepresenceio/telepresence-oss
    version: 2.22.2
    condition: enabled
description: Helm chart to deploy telepresence
name: telepresence-oss
version: 1.0.0

When I run command helm dependencies update or helm dependencies build, I get the following response:

Downloading telepresence-oss from repo oci://ghcr.io/telepresenceio/telepresence-oss
Save error occurred:  could not download oci://ghcr.io/telepresenceio/telepresence-oss/telepresence-oss: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Atelepresenceio%2Ftelepresence-oss%2Ftelepresence-oss%3Apull&service=ghcr.io: 403 Forbidden
Error: could not download oci://ghcr.io/telepresenceio/telepresence-oss/telepresence-oss: failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Atelepresenceio%2Ftelepresence-oss%2Ftelepresence-oss%3Apull&service=ghcr.io: 403 Forbidden

I want to have telepresence as Helm chart dependency so I can deploy it with GitOps and have Renovate watch it for automatic updates.

@thallgren
Copy link
Member

OCI support was experimental in Helm versions prior to 3.8. What version are you using? This Helm documentation might be helpful.

@Blarc
Copy link
Author

Blarc commented Apr 3, 2025

OCI support was experimental in Helm versions prior to 3.8. What version are you using? This Helm documentation might be helpful.

> helm version
version.BuildInfo{Version:"3.16.4", GitCommit:"7877b45b63f95635153b29a42c0c2f4273ec45ca", GitTreeState:"clean", GoVersion:"go1.22.9"}

@thallgren
Copy link
Member

thallgren commented Apr 3, 2025

This documentation states:

The repository for a given entry in Chart.yaml is specified as the registry reference without the basename

So your dependencies should probably look like this:

dependencies:
  - name: telepresence-oss
    repository: oci://ghcr.io/telepresenceio
    version: 2.22.2
    condition: enabled

@Blarc
Copy link
Author

Blarc commented Apr 4, 2025

🤦 Thanks a lot.

@Blarc Blarc closed this as completed Apr 4, 2025
@Blarc
Copy link
Author

Blarc commented Apr 4, 2025

I've run the helm dependencies build command which now passes and charts folder is created. I've now tried running
helm install telepresence-oss . --dry-run which fails:

Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
telepresence-oss:
- (root): Additional property global is not allowed

@Blarc Blarc reopened this Apr 4, 2025
@thallgren
Copy link
Member

thallgren commented Apr 4, 2025

So where does this additional "global" property come from? Telepresence has no such property.

@Blarc
Copy link
Author

Blarc commented Apr 4, 2025

So where does this additional "global" property come from? Telepresence have no such property.

I have no idea. I tried doing this from scratch and I get the same error. Here are the steps:

cd /tmp && mkdir telepresence && cd telepresence
cat > Chart.yaml <<EOF                                                                                                                                                                                                                                                                              
apiVersion: v2
dependencies:
  - name: telepresence-oss
    repository: oci://ghcr.io/telepresenceio
    version: 2.22.2
    condition: enabled
description: Helm chart to deploy telepresence
name: telepresence-oss
version: 1.0.0
EOF
helm dependency build . && helm install telepresence-oss . --dry-run

Result:

...
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading telepresence-oss from repo oci://ghcr.io/telepresenceio
Pulled: ghcr.io/telepresenceio/telepresence-oss:2.22.2
Digest: sha256:d6ce398ec1c67542b969490d2b5949c575ea14c11d7b9109b250301e1944b856
Deleting outdated charts
Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
telepresence-oss:
- (root): Additional property global is not allowed

@thallgren
Copy link
Member

thallgren commented Apr 4, 2025

Oh, I get it. In a scenario where a chart is used as a subchart, it will always be able to access global values. So helm probably adds it as an empty object. I guess our chart must accept it and any values that it may contain, although it's never used.

thallgren added a commit that referenced this issue Apr 5, 2025
The JSON schema validation implemented in Telepresence 2.22.0 had a
defect: it rejected the `global` object. This object, a Helm-managed
construct, facilitates the propagation of arbitrary configurations from
a parent chart to its dependencies. Consequently, charts intended for
dependency use must permit the presence of the `global` object.

Closes #3833

Signed-off-by: Thomas Hallgren <[email protected]>
@thallgren thallgren self-assigned this Apr 5, 2025
@thallgren
Copy link
Member

A 2.22.3 release candidate is available that fixes this problem. Please give it a spin.

@Blarc
Copy link
Author

Blarc commented Apr 7, 2025

Seems it works 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants