diff --git a/bicep/modules/blade_service.bicep b/bicep/modules/blade_service.bicep index 7578ab12..ffab1679 100644 --- a/bicep/modules/blade_service.bicep +++ b/bicep/modules/blade_service.bicep @@ -717,38 +717,6 @@ module appConfigMap './aks-config-map/main.bicep' = { \______| |__| |__| \______/ | _| |_______/ */ -var componentKustomization = { - path: serviceLayerConfig.gitops.components - timeoutInSeconds: 300 - syncIntervalInSeconds: 300 - retryIntervalInSeconds: 300 - prune: true -} - -var applicationKustomization = { - path: serviceLayerConfig.gitops.applications - dependsOn: [ - 'components' - ] - timeoutInSeconds: 300 - syncIntervalInSeconds: 300 - retryIntervalInSeconds: 300 - prune: true -} - -var experimentalKustomization = { - experimental: { - path: serviceLayerConfig.gitops.experimental - dependsOn: [ - 'applications' - ] - timeoutInSeconds: 300 - syncIntervalInSeconds: 300 - retryIntervalInSeconds: 300 - prune: true - } -} - //--------------Flux Config--------------- module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-configuration:0.3.3' = if(enableSoftwareLoad) { name: '${bladeConfig.sectionName}-cluster-gitops' @@ -768,11 +736,53 @@ module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-config tag: serviceLayerConfig.gitops.tag } } - - kustomizations: union( - componentKustomization, - applicationKustomization, - enableExperimental ? experimentalKustomization : {}) + kustomizations: enableExperimental ? { + components: { + path: serviceLayerConfig.gitops.components + timeoutInSeconds: 300 + syncIntervalInSeconds: 300 + retryIntervalInSeconds: 300 + prune: true + } + applications: { + path: serviceLayerConfig.gitops.applications + dependsOn: [ + 'components' + ] + timeoutInSeconds: 300 + syncIntervalInSeconds: 300 + retryIntervalInSeconds: 300 + prune: true + } + experimental: { + path: serviceLayerConfig.gitops.experimental + dependsOn: [ + 'applications' + ] + timeoutInSeconds: 300 + syncIntervalInSeconds: 300 + retryIntervalInSeconds: 300 + prune: true + } + } : { + components: { + path: serviceLayerConfig.gitops.components + timeoutInSeconds: 300 + syncIntervalInSeconds: 300 + retryIntervalInSeconds: 300 + prune: true + } + applications: { + path: serviceLayerConfig.gitops.applications + dependsOn: [ + 'components' + ] + timeoutInSeconds: 300 + syncIntervalInSeconds: 300 + retryIntervalInSeconds: 300 + prune: true + } + } } dependsOn: [ app_config