You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing client-side apply with kubectl, the kubectl client also sets a managedFields entry called kubectl-client-side-apply. This is kept up-to-date to match the kubectl.kubernetes.io/last-applied-configuration.
When starting to move from deploying with kubectl apply to deploying the raw manifests with argocd, the kubectl-client-side-apply field manager is not updated anymore. There's also no other managedFields entry created that says argocd-controller-client-side-apply or similar for example.
To maintain compatibility with kubectl when deploying raw manifests, please make sure that the operation is tracked in managedFields as well, to maintain an element of least surprise.
❯ k get cm test -o yaml --show-managed-fields
apiVersion: v1
data:
test: test
kind: ConfigMap
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","data":{"test":"test"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"test","namespace":"default"}}
creationTimestamp: "2024-01-10T13:02:34Z"
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data:
.: {}
f:test: {}
f:metadata:
f:annotations:
.: {}
f:kubectl.kubernetes.io/last-applied-configuration: {}
manager: kubectl-client-side-apply
operation: Update
time: "2024-01-10T13:02:34Z"
name: test
namespace: default
resourceVersion: "88025"
uid: 2554be5e-f3b7-4657-b6a1-5a57becc350a
If the same resource is created with ArgoCD, there is no managedFields.
Expected behavior
Whenever argocd creates/updates a resource, a managedFields entry should reflect the same data that the kubectl.kubernetes.io/last-applied-configuration annotation contains.
Version
v2.9.3
The text was updated successfully, but these errors were encountered:
reegnz
changed the title
ArgoCD is not reproducing kubectl apply side-effects properly: not creating a managedFields entry
ArgoCD is not fully reproducing kubectl apply side-effects: not creating a managedFields entry
Jan 10, 2024
Checklist:
argocd version
.Describe the bug
When doing client-side apply with kubectl, the kubectl client also sets a managedFields entry called
kubectl-client-side-apply
. This is kept up-to-date to match thekubectl.kubernetes.io/last-applied-configuration
.When starting to move from deploying with kubectl apply to deploying the raw manifests with argocd, the
kubectl-client-side-apply
field manager is not updated anymore. There's also no other managedFields entry created that saysargocd-controller-client-side-apply
or similar for example.To maintain compatibility with
kubectl
when deploying raw manifests, please make sure that the operation is tracked in managedFields as well, to maintain an element of least surprise.To Reproduce
The managed fields is automatically updated:
If the same resource is created with ArgoCD, there is no managedFields.
Expected behavior
Whenever argocd creates/updates a resource, a managedFields entry should reflect the same data that the
kubectl.kubernetes.io/last-applied-configuration
annotation contains.Version
v2.9.3
The text was updated successfully, but these errors were encountered: