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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup-kind action: add feature-gates input #346

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

norbjd
Copy link

@norbjd norbjd commented Oct 28, 2023

Hello 馃憢

First, thanks for the setup-kind action, it's very useful to remove boilerplate in all repositories requiring KinD.

For one of my projects, I was missing the featureGates parameter in my KinD config with this action. This is something possible (see docs about feature gates), so I've decided to add it here and contribute upstream to also benefit others.

With this change, we can define one or multiple (or zero) feature gates, separated by commas:

- name: Setup KinD with 1 feature gate
  uses: norbjd/actions/setup-kind@add-feature-gates-to-setup-kind
  with:
    k8s-version: 1.28.x
    kind-worker-count: 1
    feature-gates: InPlacePodVerticalScaling,HPAScaleToZero,ConsistentListFromCache # NEW!

And this will create a KinD config with these feature gates enabled:

apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
# existing stuff, I have not touched that
featureGates:
  InPlacePodVerticalScaling: true
  HPAScaleToZero: true
  ConsistentListFromCache: true

I have created a test repository using this action to see if my change works correctly: https://github.com/norbjd/test-setup-kind-action/blob/main/.github/workflows/test.yaml.

I have tested the following cases:

Hope this is something you can consider adding in that action.

Thanks! 馃檹

@norbjd
Copy link
Author

norbjd commented Oct 29, 2023

Just to clarify, I've used a comma-separated value for feature-gates because as far as I can tell, it's not possible to define an action input with list type, something like the following:

- name: Not possible
  uses: norbjd/actions/setup-kind@add-feature-gates-to-setup-kind
  with:
    # ...
    feature-gates:
      - InPlacePodVerticalScaling
      - HPAScaleToZero
      - ConsistentListFromCache

Tell me if I'm wrong though.

Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks so much for this

can you please update the documentation?

@norbjd
Copy link
Author

norbjd commented Dec 3, 2023

Hello 馃憢

Sorry about the late reply. I've added some documentation in the README.md as asked: 9a9a4f7. I didn't add it initially because I thought only required fields were documented in the README.md.

Anyway, I hope this is clear enough 馃榿 otherwise feel free to propose me something and I'll gladly add it.

Thanks!

@norbjd norbjd requested a review from cpanato December 3, 2023 13:27
@norbjd
Copy link
Author

norbjd commented Mar 17, 2024

Hello @cpanato, just a kind up 馃槆

Are you happy with the last changes? Otherwise, feel free to tell me! Thanks 馃檪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants