Comments (6)
Here is @reegnz's argo-cd issue: argoproj/argo-cd#16813
from pluto.
Relying on managedFields would also mean inspecting helm releases is not necessary anymore. See helm/helm#9870
from pluto.
This sounds great! I'm not super familiar with managed fields. Do they only get set when you use server-side-apply? My understanding is that it's not the default in many clients currently (for example ArgoCD).
from pluto.
Only case where managedfields is not usable IMHO is when the client does it's own patch-ing, then it won't definitely be set AFAICT, only if the client is aware about setting it as well.
If a client uses kubectl directly to perform client-side apply, the kubectl client calculates the patch and invokes the patch commands, as well as setting a fieldmanager entry to kubectl-client-side-apply
which lines up with whatever is present in the last-applied-configuration
annotation.
So using managedFields doesn't strictly need server-side apply, it's a way of communicating who's managing a given set of fields, either with patch or server-side apply.
AFAIK ArgoCD uses kubectl client-side apply semantics by default. Sadly it doesn't seem to set the managedFields
so it doesn't fully replicate kubectl behaviour.
I'll propose to the argocd project that argocd replicate what kubectl does and set the kubectl-client-side-apply
field manager, or even an argocd-client-side-apply
field manager so it's actually lines up with what kubectl is doing.
IMHO it's generally good practice to set a manager even if your client uses patches, so that it's reflected in the managedFields
what client is patching a given field. But it seems like not everyone is following that practice yet.
Either way, fully removing inspection of the last-applied-configuration
annotation is likely not a good idea at this point, as long as there's some really popular clients that do not utilize managedFields when imitating kubectl apply (in a faulty manner IMHO) using the kubernetes sdk.
tl;dr - utilizing managedFields
by k8s clients enables tools like pluto
to work regardless of how the manifest is manipulated, but it's the client's responsibility to communicate this info in a standardized manner. That standard is managedFields
, and clients that don't create/update it are to be regarded as hidden (even broken IMHO), hurting visibility and observability. Pluto should continue looking at the kubectl
annotation for backward-compatibilities sake, but it shouldn't be aware of additional tools that might be managing a given resource. Instead pluto
should simply inspect managedFields
.
from pluto.
Checked fluxcd v2 kustomize-controller, it seems to use server-side apply already, so that would be an immediate win:
https://github.com/fluxcd/kustomize-controller/blob/92a078585ef8228f11541ec79da3dd0bc5a25b2a/internal/controller/kustomization_controller.go#L399-L402
from pluto.
This is still very much an issue.
from pluto.
Related Issues (20)
- detect-api-resources - "Failed to retrieve" certain resources HOT 8
- Container image not updated HOT 1
- Exit code documentation mismatch between advanced.md docs and output.go code. HOT 1
- `kubectl.kubernetes.io/last-applied-configuration` annotation causes false positive on deprecated api report HOT 4
- Clarity of what target versions are supported HOT 1
- Docs: misleading example of how to use --columns option HOT 1
- Doc website nav is broken HOT 4
- Show all apiVersions that are found, and indicate which ones are deprecated/removed
- Exit codes not working since 5.12 HOT 3
- Vulnerabilities in go verson 1.20.4 HOT 1
- Pluto showing API versions not in use
- "REPL AVAIL" and "REPL AVAIL IN" not outputed as custom columns
- Target-versions doesnt work correctly
- Vault token expired or not available!
- What happened to the release 5.19.2 and 5.19.4? HOT 3
- audit.k8s.io/v1beta1 and audit.k8s.io/v1alpha1 deprecate check? HOT 3
- Question: Why is the action copying the binary from the container image? HOT 1
- Add a "--kubeconfig" global flag HOT 3
- Can pluto be run inside a cluster? Is there a helm chart or a reference manifest? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pluto.