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

Deployment of resources needs to use kubectl apply semantics #106

Closed
jessesuen opened this issue Apr 19, 2018 · 3 comments
Closed

Deployment of resources needs to use kubectl apply semantics #106

jessesuen opened this issue Apr 19, 2018 · 3 comments
Assignees

Comments

@jessesuen
Copy link
Member

jessesuen commented Apr 19, 2018

The way we are updating resources is not correct. kube.go::ApplyResource() is doing a simple Update() but it needs to do a Patch() using 3-way strategic merge like kubectl. Kubectl achieves this by storing last-applied-configuration as an annotation and incorporate that into the calculation. We need to do the same.

@jessesuen jessesuen changed the title Deployment of resources needs to kubectl edit semantics Deployment of resources needs to use kubectl apply semantics Apr 21, 2018
@jessesuen
Copy link
Member Author

jessesuen commented Apr 21, 2018

@jessesuen
Copy link
Member Author

For the record, a helm upgrade will do a 2-way strategic merge patch.

@jessesuen
Copy link
Member Author

jessesuen commented Apr 21, 2018

Given the complexity of the topic, I'm proposing that we just submit manifests literally just using the kubectl apply CLI. There's very little to be gained in any attempt to copy/re-implement kubectl's 3-way patch logic, other than having a pure go implementation, and not having to deal with forked processes.

On the other hand it provides the following benefits:

  1. meets users' expectation
  2. easy to explain -- the behavior of kubectl apply is very well documented
  3. it allows management of the application outside of Argo CD (e.g. users can perform a kubectl apply from their workstation)
  4. related to point 3, it enables Argo CD to adopt existing deployment pipelines which have been built using kubectl apply.
  5. needs no testing or code maintenance, since this logic is deferred to kubectl
  6. quick/easy to implement. we can move on to other features

@jessesuen jessesuen self-assigned this Apr 21, 2018
alexec added a commit that referenced this issue Apr 24, 2019
leoluz pushed a commit to leoluz/argo-cd that referenced this issue Sep 29, 2023
…oproj#106)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.10 to v1.0.12.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](codecov/codecov-action@v1.0.10...07127fd)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

1 participant