Open jceb opened 2 years ago
+1
Turns out my issue was with one of the inner git repo manifests. The sequence of troubleshoot this was:
kubectl get gitrepositories.source.toolkit.fluxcd.io
kubectl get kustomizations.kustomize.toolkit.fluxcd.io
That should reveal the reason for the failure to apply changes and provide the meaning for further investigation.
I am having the same issue. Recently I started to use a GitRepository
that uses included repository and when the webhook receiver update the included repo, the including one isn't updated automatically. It needs to be reconciled manually.
But the chain reaction doesn't end there. The kustomization using that git repository will not trigger automatically because the "main" repository didn't update only the included repository did. So we also need to manually force a reconciliation on the kustomization after to get it executed and apply the changes
Same issue here on flux version 2.4.0
and k3s version v1.30.5+k3s1 (9b586704)
. Attached are the description of two GitRepositories, one included in the other.
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: forgejo-next-digest
namespace: flux-system
spec:
interval: 15m
ref:
branch: main
url: https://code.forgejo.org/infrastructure/next-digest.git
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: flux-system
namespace: flux-system
spec:
interval: 15m
ref:
branch: main
url: https://code.forgejo.org/infrastructure/k8s-cluster.git
# https://fluxcd.io/flux/components/source/gitrepositories/#include
include:
- repository:
name: forgejo-next-digest
toPath: flux/apps/digest
Version:
I noticed that an update of a Git Repository that's included in another one (https://fluxcd.io/docs/components/source/gitrepositories/#including-gitrepository) doesn't trigger an update of the including repository and subsequently also not the reconciliation of the kustomization.
I'd like to use a webhook to trigger a reconciliation chain for every change in a repository as described here. The following configuration is applied in the cluster:
Receiver:
3 repositories: the
chart-values
repository is included in thehelm-charts
repository and provides additional values to the helm charts in this particular cluster:When a webhook is triggered for the
chart-values
repository, the following happens - no kustomization is triggered and therefore the changes aren't applied:The desired behavior is shown when a webhook triggers a reconciliation for the not-included
flux-system
repository - the kustomization is properly triggered after the repository has been updated: