Deploy HelmRelease from a local helm chart path #2254
-
I'm using flux v2 to deploy my project, and I'd like to use a HelmRelease/HelmRepository to deploy a local helm chart. I'm wondering if this is possible. Here's the structure of the repository: .
├── deployment
│ ├── charts # local helm charts
│ │ └── prediction-server # chart for seldon-core prediction server
│ │ ├── templates
│ │ ├── Chart.yaml
│ │ └── values.yaml
│ └── manifests # flux manifests
│ ├── prediction-server # prediction server namespace and helm release
│ │ ├── namespace.yaml
│ │ └── release.yaml
│ └── sources # helm repostories
│ └── prediction-server.yaml
└── README.md With flux bootstrapped as follows: flux bootstrap github \
--owner=ashrafgt \
--repository=test \
--branch=develop \
--path=deployment/manifests Is it possible to have a HelmRepository that points to the local helm chart somehow? Maybe something like this: # deployment/manifests/sources/prediction-server.yaml
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: local
namespace: flux-system
spec:
interval: 5m
url: ../deployment/charts And then have a HelmRelease that deploys the chart like this: # deployment/manifests/prediction-server/release.yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: prediction-server
namespace: test
spec:
releaseName: prediction-server
chart:
spec:
chart: prediction-server
sourceRef:
kind: HelmRepository
name: local
namespace: flux-system
version: 0.1.0 Thank you for any help and advice! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Please see the Helm docs here: https://fluxcd.io/docs/guides/helmreleases/#git-repository PS. A HelmRelease can use a GitRepository as source. |
Beta Was this translation helpful? Give feedback.
-
Hi @stefanprodan - I'm following this documentation to accomplish the same ask as the op (referencing a local helm chart within a private git repo). However, I think the documentation is misleading (or I am reading it incorrectly). Based on the code snippets, I tried the following:
however, this returns this error:
Thanks for your help! cc @jimid27 |
Beta Was this translation helpful? Give feedback.
-
@stefanprodan , I have used the same GitRepository, and Helmrelease, where I am changing the values.yaml with different replica count and image tag, but on the source controller log I am able to see "no changes since last reconcilation", but whenever I change the Chart.yaml "version: 0.3.0" , its deploying the new chnages.
How this can be resolve as, we need to change the image tag only in the values.yaml from the CI pipeline, instead of changing the Chart.yaml "version: 0.3.0" |
Beta Was this translation helpful? Give feedback.
Please see the Helm docs here: https://fluxcd.io/docs/guides/helmreleases/#git-repository
PS. A HelmRelease can use a GitRepository as source.