kubernetes-sigs / kubernetes-sigs/cluster-api-operator

helm: argocd it not able to see version change of Custom Resources

Open
#1,052 1 comment 0 reactions 0 assignees View on GitHub
kind/bug needs-triage
Dominant language
Go
Stars
286
Forks
131
Avg merge
2d 15h
Merged PRs (30d)
3

Description

**What steps did you take and what happened:**
1. Install the operator via argocd with helm-values for the capi components
```
# app-cluster-api.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cluster-api-operator
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: capi-operator-system
server: https://kubernetes.default.svc
project: default
source:
repoURL: https://kubernetes-sigs.github.io/cluster-api-operator
targetRevision: 0.26.0
chart: cluster-api-operator
helm:
values: |
core:
cluster-api:
enabled: true
version: v1.11.9
bootstrap:
kubeadm:
enabled: true
version: v1.11.9
controlPlane:
kubeadm:
enabled: true
version: v1.11.9
infrastructure:
proxmox:
enabled: true
version: v0.8.1
ipam:
in-cluster:
enabled: true
version: v1.0.3
addon:
helm:
enabled: true
version: v0.5.3
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
- Force=true
automated:
prune: true
selfHeal: true
```
2. Change component versions within the app
```
# app-cluster-api.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cluster-api-operator
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: capi-operator-system
server: https://kubernetes.default.svc
project: default
source:
repoURL: https://kubernetes-sigs.github.io/cluster-api-operator
targetRevision: 0.26.0
chart: cluster-api-operator
helm:
values: |
core:
cluster-api:
enabled: true
version: v1.11.10
bootstrap:
kubeadm:
enabled: true
version: v1.11.10
controlPlane:
kubeadm:
enabled: true
version: v1.11.10
infrastructure:
proxmox:
enabled: true
version: v0.8.1
ipam:
in-cluster:
enabled: true
version: v1.0.3
addon:
helm:
enabled: true
version: v0.5.3
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
automated:
prune: true
selfHeal: true
```
3. The version of the CR is not upgraded - argocd does not see's a diff
```
kubectl get controlplaneproviders -A
NAMESPACE NAME INSTALLEDVERSION READY
kubeadm-control-plane-system kubeadm v1.11.9 True

```
**What did you expect to happen:**
ArgoCD should see the diff and ugprade the CR

**Anything else you would like to add:**
AI said the problem is that the CR's are helm-hooks - so are there a excluded form the argocd comparison.
This would explain the behavior - any ideas? Would it an idea to add argocd-annotations to make this use-case compatible? If you are open to it.

/kind bug

Contributor guide

Open the contributing guide

Research direction

Start with app-cluster-api.yaml and the chart's rendered resources, then check how the Helm hooks and Argo CD comparison treat the component CRs. Done means changing a component version produces an Argo CD diff and updates the installed CR version.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.