Skip to content

Extend the defaults accepted via configuration #2476

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

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

benedikt-haug
Copy link
Contributor

What this PR does / why we need it:
This PR is part of the Hackaton.
This PR extend the defaults gardener dashboard accepts via configuration.
Additionally, it moves the default declaration to the config store so they are declared in the same spot.
Lastly, it also adds the example folder describing the new additions made possible by the gardener-dashboard-frontend configmap.

Which issue(s) this PR fixes:

Special notes for your reviewer:
/cc @marc1404 @klocke-io

Release note:

Extend the defaults gardener dashboard accepts via configuration

@gardener-robot-ci-2
Copy link
Contributor

Thank you @benedikt-haug for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below.

@gardener-robot
Copy link

@benedikt-haug Thank you for your contribution.

@gardener-robot gardener-robot added the size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) label Jun 4, 2025
@klocke-io
Copy link
Contributor

/ok-to-test

@gardener-robot gardener-robot added the needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jun 4, 2025
@grolu
Copy link
Contributor

grolu commented Jun 4, 2025

Nice!
Please also have a look at this PR: #2467
Especially the defaultInfrastructures configuration may cause conflicts.

@klocke-io klocke-io added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jun 4, 2025
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jun 4, 2025
@grolu
Copy link
Contributor

grolu commented Jun 4, 2025

Maybe it would be better to group the default options under a key in the config, e.g., shootDefaults. This way, we can ensure the config remains clear and all shoot default settings are grouped together. These settings are also likely to grow, so this approach gives us better control.

Additionally, these values need to be added to the Helm charts. Right now, the Helm charts are the only documentation for the dashboard configuration. We should consider introducing a dedicated documentation page for the configuration — but that’s a separate task and not related to this PR.

@klocke-io klocke-io added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jun 4, 2025
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jun 4, 2025
@gardener-robot gardener-robot added size/l Size of pull request is large (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else and removed size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) labels Jun 4, 2025
@benedikt-haug
Copy link
Contributor Author

benedikt-haug commented Jun 4, 2025

Nice! Please also have a look at this PR: #2467 Especially the defaultInfrastructures configuration may cause conflicts.

Sure <3
On quick glance it looks like all it would take to allow user overrides for your new knownInfraVendors array would be to move the defaulting function to store/config.js, just like this PR does for all the other defaults.

Maybe it would be better to group the default options under a key in the config, e.g., shootDefaults. This way, we can ensure the config remains clear and all shoot default settings are grouped together. These settings are also likely to grow, so this approach gives us better control.

Seems reasonable :) Incorporated that feedback. Also moved the "old" variables there, while including a fallback for the users of the old naming scheme so things don't suddenly break.

Additionally, these values need to be added to the Helm charts. Right now, the Helm charts are the only documentation for the dashboard configuration. We should consider introducing a dedicated documentation page for the configuration — but that’s a separate task and not related to this PR.

Added an example like the other repos have it. Also tried to extend the helm charts to feature the new variable. Do you know how to test the charts locally, helm template . ain't working for me?

@grolu
Copy link
Contributor

grolu commented Jun 5, 2025

Do you know how to test the charts locally, helm template . ain't working for me?

We implemented tests for the help charts. You can adapt them and run them with yarn test in the charts directory

@@ -230,19 +230,19 @@ export const useConfigStore = defineStore('config', () => {
})

const controlPlaneHighAvailabilityHelp = computed(() => {
return state.value?.shootDefaults.controlPlaneHighAvailabilityHelp ?? state.value?.controlPlaneHighAvailabilityHelp
return state.value?.shootDefaults?.controlPlaneHighAvailabilityHelp ?? state.value?.controlPlaneHighAvailabilityHelp
Copy link
Contributor

Choose a reason for hiding this comment

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

we should introduce a shootDefaults computed that defaults to {} to reduce optional chaining.

@klocke-io klocke-io added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jun 6, 2025
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jun 6, 2025
@gardener-robot
Copy link

@holgerkoser, @klocke-io You have pull request review open invite, please check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review needs/second-opinion Needs second review by someone else size/l Size of pull request is large (see gardener-robot robot/bots/size.py)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants