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

HelmChart is not reconciled when updating GitRepository #1427

Closed
ViBiOh opened this issue May 19, 2021 · 3 comments
Closed

HelmChart is not reconciled when updating GitRepository #1427

ViBiOh opened this issue May 19, 2021 · 3 comments

Comments

@ViBiOh
Copy link
Contributor

ViBiOh commented May 19, 2021

Describe the bug

We have a GitRepository that stores our Helm Chart, we use this chart in a HelmRelease. When updating the chart, the GitRepository is correctly fetched/reconciled, the HelmRelease is reconciled too, but the HelmChart is not updated.

Don't know if it's related, but the chart modifications are in a files/ folder (not the templates).

kubectl describe gitrepository --namespace=infra app
> Last Update Time      2021-05-19T08:11:37Z

kubectl describe helmchart --namespace=infra infra-app
> Last Update Time      2021-05-18T15:00:55Z

kubectl describe helmrelease --namespace=infra app
> Last Update Time        2021-05-19T07:30:06Z

To Reproduce

---
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
  name: app
  namespace: infra
spec:
  url: ssh://git@github.com/org/repo
  interval: 10m
  ref:
    branch: mybranch
  secretRef:
    name: github

---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: app
  namespace: infra
spec:
  interval: 60m
  chart:
    spec:
      chart: infra/app
      sourceRef:
        kind: GitRepository
        name: app

Here the structure of the folder in the GitRepository

> tree
.
├── Chart.yaml
├── README.md
├── files
│   ├── custom-httpd.conf.tpl
│   └── vhosts.conf.tpl
├── release-notes.md
├── templates
│   ├── configmap.yaml

Expected behavior

HelmChart is reconciliated before HelmRelease and/or a CLI option for reconciliating HelmChart manually.

Additional context

flux version 0.13.4
@hiddeco
Copy link
Member

hiddeco commented May 19, 2021

Did you update the version in your Chart.yaml file? This is required for the controller to detect the changes until fluxcd/source-controller#308 has landed.

@ViBiOh
Copy link
Contributor Author

ViBiOh commented May 19, 2021

Ha! Good news if it comes in CRD, I read in the current documentation that this behavior is intended. I remember to have read that it takes the latest commit of git references (in case of a branch). Is it a recent change or I just discovered it now?

I may confuse with HelmOperator so let me know if that case ^^

@hiddeco
Copy link
Member

hiddeco commented May 19, 2021

I remember to have read that it takes the latest commit of git references (in case of a branch).

This was true for the Helm Operator, but no longer for the source-controller and helm-controller. For that to work, the PR I linked earlier needs to end up in a release.

@hiddeco hiddeco closed this as completed May 19, 2021
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

No branches or pull requests

2 participants