feat: service.{http,ssh}.loadBalancerClass #640

Merged
justusbunsi merged 5 commits from Karitham/helm-chart:main into main 2024-07-15 15:13:25 +00:00
Contributor

Description of the change

Introduce service.{http,ssh}.loadBalancerClass

Benefits

Feature was not supported before. This is required if your cluster has multiple loadBalancer options and you want to select one

Possible drawbacks

More yaml.

Checklist

  • Parameters are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Templating unittests are added
<!-- Before you open the request please review the following guidelines and tips to help it be more easily integrated: - Describe the scope of your change - i.e. what the change does. - Describe any known limitations with your change. - Please run any tests or examples that can exercise your modified code. Thank you for contributing! We will try to review, test and integrate the change as soon as we can. --> ### Description of the change Introduce `service.{http,ssh}.loadBalancerClass` <!-- Describe the scope of your change - i.e. what the change does. --> ### Benefits <!-- What benefits will be realized by the code change? --> Feature was not supported before. This is required if your cluster has multiple loadBalancer options and you want to select one ### Possible drawbacks <!-- Describe any known limitations with your change --> More yaml. ### Checklist <!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] --> - [x] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) - [x] Templating unittests are added
Contributor

Thanks for contributing. It would be great to add unit tests for this feature. To ensure it is rendered correctly in different scenarios.

Thanks for contributing. It would be great to add unit tests for this feature. To ensure it is rendered correctly in different scenarios.
Author
Contributor

These tests should roughly cover the changes, namely making sure type: LoadBalancer properties aren't set when we aren't in a LoadBalancer and that loadBalancerClass exists (only) when it's set.

These tests should roughly cover the changes, namely making sure `type: LoadBalancer` properties aren't set when we aren't in a `LoadBalancer` and that `loadBalancerClass` exists (only) when it's set.
pat-s reviewed 2024-05-02 08:26:20 +00:00
@@ -52,0 +54,4 @@
template: templates/gitea/ssh-svc.yaml
set:
service:
ssh:
Collaborator

Thanks for adding tests!

Can we expand the tests to check for existence/non-existence for both ssh and http?

Thanks for adding tests! Can we expand the tests to check for existence/non-existence for **both** `ssh` and `http`?
Collaborator

ping @Karitham

ping @Karitham
Author
Contributor

oop sorry forgot about this

oop sorry forgot about this
Author
Contributor

I've added a test but I'm generally unhappy about using regex to test this, unfortunately I don't really have a better solution. Let me know if I can make them better

I've added a test but I'm generally unhappy about using regex to test this, unfortunately I don't really have a better solution. Let me know if I can make them better
Contributor

You could split the it with the regex and just duplicate that spec. Duplicating within tests is totally fine, IMO.

You could split the `it` with the regex and just duplicate that spec. Duplicating within tests is totally fine, IMO.
Karitham force-pushed main from 5851f9a65c to 1707c56fd1 2024-05-27 07:39:45 +00:00 Compare
pat-s added 1 commit 2024-07-13 12:03:28 +00:00
Merge branch 'main' into main
All checks were successful
check-and-test / check-and-test (pull_request) Successful in 34s
1e710633c5
pat-s approved these changes 2024-07-13 12:04:50 +00:00
pat-s left a comment
Collaborator

@Karitham Thanks for your patience. LGTM now.

@justusbunsi Feel free to add more comments or merge!

@Karitham Thanks for your patience. LGTM now. @justusbunsi Feel free to add more comments or merge!
justusbunsi added the
kind
feature
label 2024-07-15 15:12:33 +00:00
justusbunsi merged commit a535919025 into main 2024-07-15 15:13:25 +00:00
Sign in to join this conversation.
No description provided.