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

Add option to dispay qbec.io/component and qbec.io/last-applied in show #163

Open
kvaps opened this issue Sep 10, 2020 · 2 comments · May be fixed by #197
Open

Add option to dispay qbec.io/component and qbec.io/last-applied in show #163

kvaps opened this issue Sep 10, 2020 · 2 comments · May be fixed by #197

Comments

@kvaps
Copy link
Contributor

kvaps commented Sep 10, 2020

When using qbec with argocd it alows to only generate YAML but do not apply, so qbec show is used to generate YAML.

But once qbec apply used locally then qbec will show wrong state even if it is updated by argo to actual one.

To avoid such problems we need an opportunity to display qbec.io/component and qbec.io/last-applied annotations for qbec show command.

More details about qbec and argocd integration read in my article:
https://itnext.io/configure-custom-tooling-in-argo-cd-a4948d95626e

@gotwarlost
Copy link
Contributor

how does Argo CD maintain previous state? I'm wondering if you'll have the reverse problem with Argo CD using wrong last applied configuration even if qbec supports the feature above

@kvaps
Copy link
Contributor Author

kvaps commented Sep 12, 2020

This is a good question, Argo CD is fully rely on state described in Git. Even small difference in resources definition in Git and Kubernetes applied manifests causes OutOfSync error, eg. if you have:

resources:
  requests:
    cpu: 100m

Kubernetes will replace it to:

resources:
  requests:
    cpu: 0.1

As about applying, Argo CD uses few phases, on the early phases it invokes helm template or qbec show to generate the manifests from the Git, and the last phase invokes somewhat like kubectl apply. I can tell by the presence having kubectl.kubernetes.io/last-applied-configuration annotation in on the applied manifests.

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

Successfully merging a pull request may close this issue.

2 participants