Skip to content

Commit 6cc033e

Browse files
authored
Fixed an issue where floating pool names using a domain selector were not displayed (#2700)
1 parent 1f1440c commit 6cc033e

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

frontend/src/components/ShootDetails/GShootInfrastructureCard.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ export default {
321321
const {
322322
credential,
323323
isSharedCredential,
324+
openStackDomainName,
324325
} = useCloudProviderBinding(shootCloudProviderBinding)
325326
326327
return {
@@ -346,6 +347,7 @@ export default {
346347
getResourceRefName,
347348
credential,
348349
isSharedCredential,
350+
openStackDomainName,
349351
}
350352
},
351353
computed: {
@@ -375,6 +377,7 @@ export default {
375377
const availableFloatingPools = this.floatingPoolsByCloudProfileRefAndRegionAndDomain({
376378
cloudProfileRef: this.shootCloudProfileRef,
377379
region: this.shootRegion,
380+
secretDomain: this.openStackDomainName,
378381
})
379382
const floatingPoolWildCardObjects = wildcardObjectsFromStrings(map(availableFloatingPools, 'name'))
380383

frontend/src/composables/credential/useCloudProviderBinding.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import { useCloudProfileStore } from '@/store/cloudProfile'
1515
import { useGardenerExtensionStore } from '@/store/gardenerExtension'
1616
import { useCredentialStore } from '@/store/credential'
1717

18+
import { decodeBase64 } from '@/utils'
19+
1820
import {
1921
isSharedCredential as _isSharedCredential,
2022
isInfrastructureBinding as _isInfrastructureBinding,
@@ -185,6 +187,14 @@ export const useCloudProviderBinding = (binding, options = {}) => {
185187
)
186188
})
187189

190+
const openStackDomainName = computed(() => {
191+
if (binding.value?.provider?.type !== 'openstack' || !hasOwnSecret.value) {
192+
return undefined
193+
}
194+
const domainName = get(credential.value, ['data', 'domainName'])
195+
return domainName ? decodeBase64(domainName) : undefined
196+
})
197+
188198
return {
189199
// Classification
190200
isSharedCredential,
@@ -214,5 +224,8 @@ export const useCloudProviderBinding = (binding, options = {}) => {
214224
// Quotas & lifecycle
215225
quotas,
216226
selfTerminationDays,
227+
228+
// Other
229+
openStackDomainName,
217230
}
218231
}

frontend/src/composables/useShootHelper.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,10 @@ export function createShootHelperComposable (shootItem, options = {}) {
153153
return cloudProfileStore.kubernetesVersionIsNotLatestPatch(kubernetesVersion.value, cloudProfileRef.value)
154154
})
155155

156-
const { selfTerminationDays } = useCloudProviderBinding(infrastructureBinding)
156+
const {
157+
selfTerminationDays,
158+
openStackDomainName,
159+
} = useCloudProviderBinding(infrastructureBinding)
157160

158161
const allPurposes = computed(() => {
159162
if (some(addons.value, 'enabled')) {
@@ -198,7 +201,7 @@ export function createShootHelperComposable (shootItem, options = {}) {
198201
return cloudProfileStore.floatingPoolNamesByCloudProfileRefAndRegionAndDomain({
199202
cloudProfileRef: cloudProfileRef.value,
200203
region: region.value,
201-
secretDomain: get(infrastructureBinding.value, ['data', 'domainName']),
204+
secretDomain: openStackDomainName.value,
202205
})
203206
})
204207

0 commit comments

Comments
 (0)