Skip to content

feat(t8s-cluster/management-cluster): set apiServerLoadBalancer.provider via TeutonetesCloud#1898

Merged
cwrau merged 1 commit intomainfrom
feat/t8s-cluster/set-loadbalancerprovider-from-teutonetescloud
Jan 15, 2026
Merged

feat(t8s-cluster/management-cluster): set apiServerLoadBalancer.provider via TeutonetesCloud#1898
cwrau merged 1 commit intomainfrom
feat/t8s-cluster/set-loadbalancerprovider-from-teutonetescloud

Conversation

@cwrau
Copy link
Copy Markdown
Member

@cwrau cwrau commented Jan 12, 2026

Summary by CodeRabbit

  • New Features
    • Load balancer provider field now automatically populates based on cloud configuration when available for OpenStack clusters.
    • Maintains full backward compatibility with existing API server load balancer settings.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings January 12, 2026 12:53
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

A Helm template file for the t8s-cluster chart now includes a new conditional logic to populate the loadBalancerProvider field under apiServerLoadBalancer by looking up the TeutonetesCloud resource and extracting provider information when available.

Changes

Cohort / File(s) Summary
t8s-cluster Helm Template
charts/t8s-cluster/templates/management-cluster/clusterClass/openStackClusterTemplate/_openStackClusterTemplateSpec.yaml
Added 4 lines to introduce a cloud template lookup and conditionally set the loadBalancerProvider field from the cloud spec. Existing apiServerLoadBalancer configuration and other sections remain unmodified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

t8s-cluster

Suggested reviewers

  • tasches
  • teutonet-bot
  • marvinWolff

Poem

🐰 A cloud takes shape in template's care,
Provider fields float through the air,
Load balancers find their way,
Four lines of YAML brighten the day! ☁️

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: setting apiServerLoadBalancer.provider field using TeutonetesCloud lookup in the management cluster template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3fced54 and 2e6ee92.

📒 Files selected for processing (1)
  • charts/t8s-cluster/templates/management-cluster/clusterClass/openStackClusterTemplate/_openStackClusterTemplateSpec.yaml
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: cwrau
Repo: teutonet/teutonet-helm-charts PR: 1601
File: charts/base-cluster/templates/dns/external-dns.yaml:30-32
Timestamp: 2025-07-24T09:55:53.655Z
Learning: In charts/base-cluster/templates/dns/external-dns.yaml, the dns.provider field in values.yaml has always been expected to be a map format (e.g., `{ cloudflare: {} }`), never a string format. The template correctly uses `{{ .Values.dns.provider | keys | first }}` to extract the provider name from the map keys.
Learnt from: cwrau
Repo: teutonet/teutonet-helm-charts PR: 1601
File: charts/base-cluster/templates/dns/external-dns.yaml:33-39
Timestamp: 2025-07-24T09:56:41.380Z
Learning: In the teutonet-helm-charts base-cluster chart, secret names like "external-dns" for Cloudflare provider are intentionally hard-coded. Users who need custom secret names should use Helm's `valuesFrom` feature to override values rather than expecting dedicated fields in values.yaml. This design keeps the values.yaml clean while still allowing full customization flexibility.
📚 Learning: 2025-07-24T09:55:53.655Z
Learnt from: cwrau
Repo: teutonet/teutonet-helm-charts PR: 1601
File: charts/base-cluster/templates/dns/external-dns.yaml:30-32
Timestamp: 2025-07-24T09:55:53.655Z
Learning: In charts/base-cluster/templates/dns/external-dns.yaml, the dns.provider field in values.yaml has always been expected to be a map format (e.g., `{ cloudflare: {} }`), never a string format. The template correctly uses `{{ .Values.dns.provider | keys | first }}` to extract the provider name from the map keys.

Applied to files:

  • charts/t8s-cluster/templates/management-cluster/clusterClass/openStackClusterTemplate/_openStackClusterTemplateSpec.yaml
📚 Learning: 2025-07-24T09:56:41.380Z
Learnt from: cwrau
Repo: teutonet/teutonet-helm-charts PR: 1601
File: charts/base-cluster/templates/dns/external-dns.yaml:33-39
Timestamp: 2025-07-24T09:56:41.380Z
Learning: In the teutonet-helm-charts base-cluster chart, secret names like "external-dns" for Cloudflare provider are intentionally hard-coded. Users who need custom secret names should use Helm's `valuesFrom` feature to override values rather than expecting dedicated fields in values.yaml. This design keeps the values.yaml clean while still allowing full customization flexibility.

Applied to files:

  • charts/t8s-cluster/templates/management-cluster/clusterClass/openStackClusterTemplate/_openStackClusterTemplateSpec.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Agent
  • GitHub Check: wait-for-checks
🔇 Additional comments (1)
charts/t8s-cluster/templates/management-cluster/clusterClass/openStackClusterTemplate/_openStackClusterTemplateSpec.yaml (1)

13-15: Safe navigation pattern is correct.

The with block combined with the parenthesized safe navigation (($cloud).spec).loadBalancerProvider correctly handles cases where:

  • The TeutonetesCloud resource doesn't exist ($cloud is empty map)
  • The resource exists but lacks spec or loadBalancerProvider

In all these cases, the provider field is omitted as intended.

Note: The TeutonetesCloud CRD is external (t8s-engine.teuto.net/v1alpha1) and not defined in this repository, so the spec.loadBalancerProvider field path cannot be verified from the codebase alone. Verification of the field path requires access to the external CRD schema.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @cwrau, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new feature to dynamically configure the API server load balancer provider within the t8s-cluster management cluster for OpenStack. By integrating with the TeutonetesCloud custom resource, the system can now automatically apply the specified load balancer provider, enhancing the declarative management of cloud infrastructure settings and improving overall configuration flexibility.

Highlights

  • Dynamic Load Balancer Provider Configuration: The apiServerLoadBalancer.provider field can now be dynamically set for OpenStack clusters, allowing for more flexible and centralized management of load balancer types.
  • Integration with TeutonetesCloud: The configuration now leverages the TeutonetesCloud custom resource to retrieve the loadBalancerProvider setting, ensuring consistency with cloud-specific definitions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to set the apiServerLoadBalancer.provider using a value from a TeutonetesCloud resource. The current implementation, however, does not safely handle the case where the lookup for this resource might fail to find it. This could lead to template rendering errors. My review includes a critical comment with a suggested code change to add the necessary checks and prevent such errors.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the ability to dynamically set the apiServerLoadBalancer.provider field in OpenStack cluster templates by looking up the value from a TeutonetesCloud custom resource. The implementation uses Helm's lookup function to fetch the TeutonetesCloud resource and extract the loadBalancerProvider field from its spec.

Changes:

  • Adds a lookup to fetch TeutonetesCloud resource based on the cloud value
  • Conditionally sets apiServerLoadBalancer.provider if the loadBalancerProvider field exists in the TeutonetesCloud spec
  • Uses the with statement to handle cases where the field may not be present

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cwrau cwrau added this pull request to the merge queue Jan 15, 2026
Merged via the queue into main with commit 6bf8889 Jan 15, 2026
39 checks passed
@cwrau cwrau deleted the feat/t8s-cluster/set-loadbalancerprovider-from-teutonetescloud branch January 15, 2026 09:18
github-merge-queue Bot pushed a commit that referenced this pull request Jan 15, 2026
🤖 I have created a release *beep* *boop*
---


##
[9.5.0](t8s-cluster-v9.4.1...t8s-cluster-v9.5.0)
(2026-01-15)


### Features

* **t8s-cluster/artifacthub:** use centralised helmRepositories template
([#1846](#1846))
([73a41f9](73a41f9))
* **t8s-cluster/cilium:** enable kubeProxy replacement
([#1815](#1815))
([b3c412d](b3c412d))
* **t8s-cluster/management-cluster:** add cluster-autoscaler deployment
([#1756](#1756))
([5b6ead9](5b6ead9))
* **t8s-cluster/management-cluster:** enable ImageVolume feature flag
([#1786](#1786))
([9676ee0](9676ee0))
* **t8s-cluster/management-cluster:** set apiServerLoadBalancer.provider
via TeutonetesCloud
([#1898](#1898))
([6bf8889](6bf8889))
* **t8s-cluster/management-cluster:** switch to hcp
([#1759](#1759))
([303b0b6](303b0b6))
* **t8s-cluster/management-cluster:** use new
KubeletEnsureSecretPulledImages feature gate
([#1858](#1858))
([40d7bef](40d7bef))
* **t8s-cluster:** migrate to CAPI v1beta2
([#1685](#1685))
([dc5f071](dc5f071))


### Bug Fixes

* **t8s-cluster/autoscaler:** these names are inside the workload
cluster
([#1877](#1877))
([f345cea](f345cea))
* **t8s-cluster/management-cluster:** leave out protocol if `nil`
([#1837](#1837))
([f370dac](f370dac))
* **t8s-cluster:** only allow nodePools with valid k8s names
([#1851](#1851))
([b9431c5](b9431c5))


### Miscellaneous Chores

* **t8s-cluster/dependencies:** update common docker tag to v1.6.0
([#1811](#1811))
([b3b4c94](b3b4c94))
* **t8s-cluster/dependencies:** update common docker tag to v1.7.0
([#1873](#1873))
([71e062f](71e062f))
* **t8s-cluster/dependencies:** update helm release cilium to v1.18.6
([#1894](#1894))
([e1adc88](e1adc88))
* **t8s-cluster/dependencies:** update helm release cluster-autoscaler
to v9.53.0
([#1856](#1856))
([dc67fcd](dc67fcd))
* **t8s-cluster/dependencies:** update helm release
openstack-cloud-controller-manager to v2.34.1
([#1553](#1553))
([e984d19](e984d19))
* **t8s-cluster/dependencies:** update registry.k8s.io/etcd docker tag
to v3.5.24
([#1793](#1793))
([a5098e3](a5098e3))
* **t8s-cluster/dependencies:** update registry.k8s.io/etcd docker tag
to v3.6.6
([#1813](#1813))
([e07ffa7](e07ffa7))
* **t8s-cluster/dependencies:** update registry.k8s.io/etcd docker tag
to v3.6.7
([#1895](#1895))
([cf1d3b4](cf1d3b4))
* **t8s-cluster/flux:** use centralised HelmRepositories instead of
per-instance
([#1758](#1758))
([3deff65](3deff65))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants