mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-26 16:09:45 -05:00
config: use toPtr func to get pointers (#1287)
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
483c0b47fe
commit
060faae528
@ -282,7 +282,7 @@ func Default() *Config {
|
|||||||
MicroserviceVersion: compatibility.EnsurePrefixV(constants.VersionInfo),
|
MicroserviceVersion: compatibility.EnsurePrefixV(constants.VersionInfo),
|
||||||
KubernetesVersion: string(versions.Default),
|
KubernetesVersion: string(versions.Default),
|
||||||
StateDiskSizeGB: 30,
|
StateDiskSizeGB: 30,
|
||||||
DebugCluster: func() *bool { b := false; return &b }(),
|
DebugCluster: toPtr(false),
|
||||||
Provider: ProviderConfig{
|
Provider: ProviderConfig{
|
||||||
AWS: &AWSConfig{
|
AWS: &AWSConfig{
|
||||||
Region: "",
|
Region: "",
|
||||||
@ -300,11 +300,11 @@ func Default() *Config {
|
|||||||
ResourceGroup: "",
|
ResourceGroup: "",
|
||||||
InstanceType: "Standard_DC4as_v5",
|
InstanceType: "Standard_DC4as_v5",
|
||||||
StateDiskType: "Premium_LRS",
|
StateDiskType: "Premium_LRS",
|
||||||
DeployCSIDriver: func() *bool { b := true; return &b }(),
|
DeployCSIDriver: toPtr(true),
|
||||||
IDKeyDigest: idkeydigest.DefaultsFor(cloudprovider.Azure),
|
IDKeyDigest: idkeydigest.DefaultsFor(cloudprovider.Azure),
|
||||||
EnforceIDKeyDigest: func() *bool { b := true; return &b }(),
|
EnforceIDKeyDigest: toPtr(true),
|
||||||
ConfidentialVM: func() *bool { b := true; return &b }(),
|
ConfidentialVM: toPtr(true),
|
||||||
SecureBoot: func() *bool { b := false; return &b }(),
|
SecureBoot: toPtr(false),
|
||||||
Measurements: measurements.DefaultsFor(cloudprovider.Azure),
|
Measurements: measurements.DefaultsFor(cloudprovider.Azure),
|
||||||
},
|
},
|
||||||
GCP: &GCPConfig{
|
GCP: &GCPConfig{
|
||||||
@ -314,11 +314,11 @@ func Default() *Config {
|
|||||||
ServiceAccountKeyPath: "",
|
ServiceAccountKeyPath: "",
|
||||||
InstanceType: "n2d-standard-4",
|
InstanceType: "n2d-standard-4",
|
||||||
StateDiskType: "pd-ssd",
|
StateDiskType: "pd-ssd",
|
||||||
DeployCSIDriver: func() *bool { b := true; return &b }(),
|
DeployCSIDriver: toPtr(true),
|
||||||
Measurements: measurements.DefaultsFor(cloudprovider.GCP),
|
Measurements: measurements.DefaultsFor(cloudprovider.GCP),
|
||||||
},
|
},
|
||||||
OpenStack: &OpenStackConfig{
|
OpenStack: &OpenStackConfig{
|
||||||
DirectDownload: func() *bool { b := true; return &b }(),
|
DirectDownload: toPtr(true),
|
||||||
},
|
},
|
||||||
QEMU: &QEMUConfig{
|
QEMU: &QEMUConfig{
|
||||||
ImageFormat: "raw",
|
ImageFormat: "raw",
|
||||||
@ -622,3 +622,7 @@ func (c *Config) Validate(force bool) error {
|
|||||||
|
|
||||||
return &ValidationError{validationErrMsgs: validationErrMsgs}
|
return &ValidationError{validationErrMsgs: validationErrMsgs}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func toPtr[T any](v T) *T {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
@ -832,7 +832,3 @@ func TestConfigVersionCompatibility(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func toPtr[T any](v T) *T {
|
|
||||||
return &v
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user