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

Set CF_INSTANCE_INDEX based on statefulset.kubernetes.io/pod-index label #2732

Open
tcdowney opened this issue Jul 27, 2023 · 0 comments
Open

Comments

@tcdowney
Copy link
Member

tcdowney commented Jul 27, 2023

⚠️ BLOCKED UNTIL VERSION 1.27 FALLS OUT OF SUPPORT ⚠️

Background

Kubernetes version 1.28+ will set the statefulset.kubernetes.io/pod-index label on Pods within a StatefulSet. We should be able to set the CF_INSTANCE_INDEX env var on Pods with the value of that label using the K8s Downward API instead of our custom webhook.

Action to take

  • Update the statefulset-runner (and inform users who may be using custom runners) to set CF_INSTANCE_INDEX based on the new pod index label
  • Remove the webhook that does this job today

Impact

  • This will simplify the code and allow us to remove an awkward Pod mutating webhook.
  • Question: Will this change cause all StatefulSets to roll at the same time or will it only take effect when a user explicitly restarts an app? Or will it just occur when the statefulset-runner controller resyncs a particular AppWorkload?

Dev Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ⚙️ Chores
Development

No branches or pull requests

1 participant