cli: set placeholder uid for QEMU / MiniConstellation (#1069)

This commit is contained in:
Malte Poll 2023-01-25 14:42:52 +01:00 committed by GitHub
parent fc8a43f4f1
commit 2d326ea3f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View File

@ -52,7 +52,7 @@ func checkForMiniCluster(fileHandler file.Handler) error {
if idFile.CloudProvider != cloudprovider.QEMU {
return errors.New("cluster is not a QEMU based Constellation")
}
if idFile.UID != "mini" {
if idFile.UID != constants.MiniConstellationUID {
return errors.New("cluster is not a MiniConstellation cluster")
}

View File

@ -223,7 +223,7 @@ func (m *miniUpCmd) createMiniCluster(ctx context.Context, fileHandler file.Hand
return err
}
idFile.UID = "mini" // use UID "mini" to identify MiniConstellation clusters.
idFile.UID = constants.MiniConstellationUID // use UID "mini" to identify MiniConstellation clusters.
m.log.Debugf("Cluster id file contains %v", idFile)
return fileHandler.WriteJSON(constants.ClusterIDsFileName, idFile, file.OptNone)
}

View File

@ -2,6 +2,10 @@ output "ip" {
value = module.control_plane.instance_ips[0]
}
output "uid" {
value = "qemu" // placeholder
}
output "initSecret" {
value = random_password.initSecret.result
sensitive = true

View File

@ -141,6 +141,8 @@ const (
// EnvVarAzureClientSecretValue is environment variable to overwrite
// provider.azure.clientSecretValue .
EnvVarAzureClientSecretValue = EnvVarPrefix + "AZURE_CLIENT_SECRET_VALUE"
// MiniConstellationUID is a sentinel value for the UID of a mini constellation.
MiniConstellationUID = "mini"
//
// Kubernetes.