Is there a way/config where I could change default revisionHistoryLimit from 10 to another limit?

7/30/2019

I'm setting up a new server with kubernetes and because of storage limitations I need to change revisionHistoryLimit for all our existing and new projects to 2 or 3. I know I can change it in each deployment with spec.revisionHistoryLimit but I need to change it globally.

Thank you for answers and tips.

-- Michael Dostál
kubernetes
statefulset

1 Answer

7/31/2019

Possible cluster-wide policies are listed here,

https://kubernetes.io/docs/concepts/policy/pod-security-policy/

You can set pod-level security policies or you can limit resource-usage, both of which don't include the revisionHistoryLimit parameter. I am not aware of any other alternatives, so the answer to your question is you have to include the parameter in every deployment definition.

-- AYA
Source: StackOverflow