cloud-native-toolkit / cloud-native-toolkit/planning

ArgoCD braking OpenShift Topology by using app.kubernetes.io/instance

Open
#769 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue Workstream:CI/CD and GitOps
Dominant language
No language data
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This weekend I was going crazy thinking I was messing up something in helm which generating the OCP connectsTo annotations pointing to `app.kubernetes.io/instance`
Well it turns out that ArgoCD is messing with the label on all object resources, it was putting the name of the argoapp instance, and I need it to be the one I computed in helm.
I fixed today by editing the ArgoCD

The label `app.kubernetes.io/instance` we configure to tell OCP about the topology of a multi deployment app.

I found a solution by configuring the CR for ArgoCD operator `application.instanceLabelKey` and set to `argocd.argoproj.io/instance`

We need to update the ArgoCD terraform/helm module to have this configmap value.

Found the answer in ArgoCD FAQ https://argoproj.github.io/argo-cd/faq/#why-is-my-app-out-of-sync-even-after-syncing
```
Why Is My App Out Of Sync Even After Syncing?¶
Is some cases, the tool you use may conflict with Argo CD by adding the app.kubernetes.io/instance label. E.g. using Kustomize common labels feature.

Argo CD automatically sets the app.kubernetes.io/instance label and uses it to determine which resources form the app. If the tool does this too, this causes confusion. You can change this label by setting the application.instanceLabelKey value in the argocd-cm. We recommend that you use argocd.argoproj.io/instance.

!!! note When you make this change your applications will become out of sync and will need re-syncing.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.