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

ssa: HPA drift detection is broken on Kubernetes 1.26 #437

Closed
stefanprodan opened this issue Dec 15, 2022 · 2 comments · Fixed by #449
Closed

ssa: HPA drift detection is broken on Kubernetes 1.26 #437

stefanprodan opened this issue Dec 15, 2022 · 2 comments · Fixed by #449
Labels
area/server-side-apply SSA related issues and pull requests bug Something isn't working

Comments

@stefanprodan
Copy link
Member

When changing the HPA version in tests from v2beta2 to v2, the drift detections fails by reporting drift even if the object didn't changed. We need to update SSA to client-go 1.26 and figure out how to deal with the Kubernetes API bug (the workaround put in place for v2beta2 doesn't seem to work for v2).

@stefanprodan stefanprodan added bug Something isn't working area/server-side-apply SSA related issues and pull requests labels Dec 15, 2022
@hiddeco
Copy link
Member

hiddeco commented Dec 15, 2022

Context around previous addressing of issue in #207

@aryan9600
Copy link
Member

i tried to reproduce this on a 1.26 cluster created using kind and was unable to, there's no difference outputted when i run kubectl diff --server-side -f hpa.yaml and no drift is reported in the kustomize-controller logs with reconciliation progressing normally as it should.

❯ k logs -f -n flux-system kustomize-controller-64bd85bd5f-wpbcj
{"level":"info","ts":"2023-01-11T06:50:27.194Z","msg":"server-side apply completed","controller":"kustomization","controllerGroup":"kustomize.toolkit.fluxcd.io","controllerKind":"Kustomization","Kustomization":{"name":"podinfo","namespace":"flux-system"},"namespace":"flux-system","name":"podinfo","reconcileID":"9c2b509f-21e6-4278-bb1f-5a2dd69de59c","output":{"Deployment/default/podinfo":"created","HorizontalPodAutoscaler/default/podinfo":"created"," Service/default/podinfo":"created"},"revision":"master/fdd0a0b7dad56fbc6bb71e7e8badee5a3a3c663f"}
{"level":"info","ts":"2023-01-11T06:50:27.226Z","msg":"Reconciliation finished in 147.578915ms, next run in 5m0s","controller":"kustomization","controllerGroup":"kustomize.toolkit.fluxcd.io","controllerKind":"Kustomization","Kustomization":{"name":"podinfo","namespace":"flux-system"},"namespace":"flux-system","name":"podinfo","reconcileID":"9c2b509f-21e6-4278-bb1f-5a2dd69de59c","revision":"master/fdd0a0b7dad56fbc6bb71e7e8badee5a3a3c663f"}
{"level":"info","ts":"2023-01-11T06:55:26.545Z","msg":"server-side apply completed","controller":"kustomization","controllerGroup":"kustomize.toolkit.fluxcd.io","controllerKind":"Kustomization","Kustomization":{"name":"podinfo","namespace":"flux-system"},"namespace":"flux-system","name":"podinfo","reconcileID":"a4338a44-5312-402a-baf4-cea5545aafe2","output":{"Deployment/default/podinfo":"unchanged","HorizontalPodAutoscaler/default/podinfo":"unchanged","Service/default/podinfo":"unchanged"},"revision":"master/fdd0a0b7dad56fbc6bb71e7e8badee5a3a3c663f"}
{"level":"info","ts":"2023-01-11T06:55:26.560Z","msg":"Reconciliation finished in 109.120046ms, next run in 5m0s","controller":"kustomization","controllerGroup":"kustomize.toolkit.fluxcd.io","controllerKind":"Kustomization","Kustomization":{"name":"podinfo","namespace":"flux-system"},"namespace":"flux-system","name":"podinfo","reconcileID":"a4338a44-5312-402a-baf4-cea5545aafe2","revision":"master/fdd0a0b7dad56fbc6bb71e7e8badee5a3a3c663f"}
Events:
  Type    Reason       Age    From                  Message
  ----    ------       ----   ----                  -------
  Normal  Progressing  9m37s  kustomize-controller  Service/default/podinfo created
Deployment/default/podinfo created
HorizontalPodAutoscaler/default/podinfo created
  Normal  ReconciliationSucceeded  9m37s  kustomize-controller  Reconciliation finished in 147.578915ms, next run in 5m0s
  Normal  ReconciliationSucceeded  4m38s  kustomize-controller  Reconciliation finished in 109.120046ms, next run in 5m0s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/server-side-apply SSA related issues and pull requests bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants