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

[RFC-0002] Implement Flux OCI support for Helm #669

Closed
stefanprodan opened this issue Apr 13, 2022 · 10 comments · Fixed by #690
Closed

[RFC-0002] Implement Flux OCI support for Helm #669

stefanprodan opened this issue Apr 13, 2022 · 10 comments · Fixed by #690
Assignees
Labels
area/helm Helm related issues and pull requests area/oci OCI related issues and pull requests enhancement New feature or request
Milestone

Comments

@stefanprodan
Copy link
Member

Implement Flux OCI support for Helm according to RFC-0002 specifications.

For e2e testing we can use: https://github.com/users/stefanprodan/packages/container/package/charts%2Fpodinfo

@stefanprodan stefanprodan added enhancement New feature or request area/helm Helm related issues and pull requests labels Apr 13, 2022
@stefanprodan stefanprodan added this to the GA milestone Apr 13, 2022
@pembunuhraja85

This comment was marked as off-topic.

@makkes makkes reopened this May 19, 2022
@makkes makkes added the area/oci OCI related issues and pull requests label May 23, 2022
@adim
Copy link

adim commented Jun 9, 2022

I have an issue pulling charts from GCP Artifact Registry.
I deployed the chart according to: https://cloud.google.com/artifact-registry/docs/helm/store-helm-charts

Name:         hello-chart
Namespace:    flux-system
Labels:       kustomize.toolkit.fluxcd.io/name=infrastructure
              kustomize.toolkit.fluxcd.io/namespace=flux-system
Annotations:  <none>
API Version:  source.toolkit.fluxcd.io/v1beta2
Kind:         HelmRepository
Metadata:
  Creation Timestamp:  2022-06-09T14:43:23Z
  Finalizers:
    finalizers.fluxcd.io
  Generation:  1
  Managed Fields:
    API Version:  source.toolkit.fluxcd.io/v1beta2
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          f:kustomize.toolkit.fluxcd.io/name:
          f:kustomize.toolkit.fluxcd.io/namespace:
      f:spec:
        f:interval:
        f:type:
        f:url:
    Manager:      kustomize-controller
    Operation:    Apply
    Time:         2022-06-09T14:43:23Z
    API Version:  source.toolkit.fluxcd.io/v1beta2
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:finalizers:
          .:
          v:"finalizers.fluxcd.io":
    Manager:      source-controller
    Operation:    Update
    Time:         2022-06-09T14:43:23Z
    API Version:  source.toolkit.fluxcd.io/v1beta2
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        f:conditions:
        f:observedGeneration:
    Manager:         source-controller
    Operation:       Update
    Subresource:     status
    Time:            2022-06-09T14:43:24Z
  Resource Version:  2140070
  UID:               16023207-4bff-494a-a2a5-157a3f014ccf
Spec:
  Interval:  5m
  Timeout:   60s
  URL:       oci://us-central1-docker.pkg.dev/adim-project/quickstart-helm-repo/hello-chart
Status:
  Conditions:
    Last Transition Time:  2022-06-09T14:43:43Z
    Message:               failed to construct Helm client: scheme "oci" not supported
    Observed Generation:   1
    Reason:                Failed
    Status:                True
    Type:                  Stalled
    Last Transition Time:  2022-06-09T14:43:43Z
    Message:               failed to construct Helm client: scheme "oci" not supported
    Observed Generation:   1
    Reason:                Failed
    Status:                False
    Type:                  Ready
    Last Transition Time:  2022-06-09T14:43:43Z
    Message:               failed to construct Helm client: scheme "oci" not supported
    Observed Generation:   1
    Reason:                Failed
    Status:                True
    Type:                  FetchFailed
  Observed Generation:     1
Events:
  Type     Reason     Age    From               Message
  ----     ------     ----   ----               -------
  Normal   Succeeded  4m46s  source-controller  Helm repository is ready
  Warning  Failed     4m27s  source-controller  failed to construct Helm client: scheme "oci" not supported

Flux version:

flux: v0.31.1
helm-controller: v0.21.0
kustomize-controller: v0.25.0
notification-controller: v0.23.5
source-controller: v0.24.4

Any idea?

@souleb
Copy link
Member

souleb commented Jun 9, 2022

Did you follow the guide here: https://fluxcd.io/docs/guides/helmreleases/#helm-oci-repository?

You need spec.type set for an OCI Helmrepository.

@makkes
Copy link
Member

makkes commented Jun 9, 2022

@adim please set the .spec.type field to oci.

@adim
Copy link

adim commented Jun 9, 2022

already set it as oci, my YAML:

apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
  name: hello-chart
spec:
  type: oci
  interval: 5m
  url: oci://us-central1-docker.pkg.dev/adim-project/quickstart-helm-repo/hello-chart

@souleb
Copy link
Member

souleb commented Jun 9, 2022

The kubectl output says otherwise...

Did you apply manually a type change to an existing object?

Please open a separate issue for this.

@adim
Copy link

adim commented Jun 10, 2022

I delete the source and try to recreate it.
Now it's not created at all, Error:
HelmRepository/flux-system/hello-chart dry-run failed, error: failed to create typed patch object: .spec.type: field not declared in schema

Do I need to upgrade something?

@makkes
Copy link
Member

makkes commented Jun 10, 2022

Yes, you need to install the latest CRD version that comes with Flux 0.31.0. OCI support is part of source-controller starting with version 0.25.0.

@adim
Copy link

adim commented Jun 12, 2022

It works , Thank you @makkes

@scottrigby
Copy link
Member

yay 🎉 tidying up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Helm related issues and pull requests area/oci OCI related issues and pull requests enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants