Skip to content

Commit d3f32af

Browse files
committed
terraform-provider: pass ServiceCIDR from resource to chart loader (#3793)
1 parent ce7283d commit d3f32af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

terraform-provider-constellation/internal/provider/cluster_resource.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,7 @@ func (r *ClusterResource) apply(ctx context.Context, data *ClusterResourceModel,
10931093
DeployCSIDriver: microserviceCfg.CSIDriver,
10941094
masterSecret: secrets.masterSecret,
10951095
serviceAccURI: serviceAccURI,
1096+
serviceCIDR: networkCfg.IPCidrService.ValueString(),
10961097
}
10971098
if csp == cloudprovider.OpenStack {
10981099
payload.openStackHelmValues = &helm.OpenStackValues{
@@ -1267,6 +1268,7 @@ type applyHelmChartsPayload struct {
12671268
masterSecret uri.MasterSecret // master secret of the cluster.
12681269
serviceAccURI string // URI of the service account used within the cluster.
12691270
openStackHelmValues *helm.OpenStackValues // OpenStack-specific Helm values.
1271+
serviceCIDR string // CIDR used for k8s services - needed for CoreDNS chart.
12701272
}
12711273

12721274
// applyHelmCharts applies the Helm charts to the cluster.
@@ -1288,6 +1290,7 @@ func (r *ClusterResource) applyHelmCharts(ctx context.Context, applier *constell
12881290
// The user has previously been warned about this when planning a microservice version change.
12891291
AllowDestructive: helm.AllowDestructive,
12901292
OpenStackValues: payload.openStackHelmValues,
1293+
ServiceCIDR: payload.serviceCIDR,
12911294
}
12921295

12931296
if err := applier.AnnotateCoreDNSResources(ctx); err != nil {

0 commit comments

Comments
 (0)