bootstrapper: insert helm values for OpenStack

This commit is contained in:
Malte Poll 2023-03-17 09:54:15 +01:00 committed by Malte Poll
parent 7d4ab07163
commit 545091cf2f
2 changed files with 13 additions and 0 deletions

View File

@ -18,6 +18,7 @@ go_library(
"//internal/cloud/cloudprovider",
"//internal/cloud/gcpshared",
"//internal/cloud/metadata",
"//internal/cloud/openstack",
"//internal/constants",
"//internal/deploy/helm",
"//internal/kubernetes",

View File

@ -24,6 +24,7 @@ import (
"github.com/edgelesssys/constellation/v2/internal/cloud/azureshared"
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
"github.com/edgelesssys/constellation/v2/internal/cloud/gcpshared"
"github.com/edgelesssys/constellation/v2/internal/cloud/openstack"
"github.com/edgelesssys/constellation/v2/internal/constants"
"github.com/edgelesssys/constellation/v2/internal/deploy/helm"
"github.com/edgelesssys/constellation/v2/internal/kubernetes"
@ -507,6 +508,17 @@ func (k *KubeWrapper) setupExtraVals(ctx context.Context, serviceConfig constell
"tenantID": creds.TenantID,
},
}
case cloudprovider.OpenStack:
creds, err := openstack.AccountKeyFromURI(serviceConfig.cloudServiceAccountURI)
if err != nil {
return nil, err
}
credsIni := creds.CloudINI().String()
extraVals["ccm"] = map[string]any{
"OpenStack": map[string]any{
"secretData": credsIni,
},
}
}
return extraVals, nil