-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: pass VM service account from iam create to cluster create via…
… config
- Loading branch information
Showing
14 changed files
with
75 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,6 +256,7 @@ func TestValidateInputs(t *testing.T) { | |
ClientX509CertURL: "client_cert", | ||
})) | ||
cfg.Provider.GCP.ServiceAccountKeyPath = "saKey.json" | ||
cfg.Provider.GCP.IAMServiceAccountVM = "[email protected]" | ||
} | ||
|
||
require.NoError(fh.WriteYAML(constants.ConfigFilename, cfg)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -539,6 +539,7 @@ func defaultConfigWithExpectedMeasurements(t *testing.T, conf *config.Config, cs | |
conf.Provider.GCP.Project = "test-project" | ||
conf.Provider.GCP.Zone = "test-zone" | ||
conf.Provider.GCP.ServiceAccountKeyPath = "test-key-path" | ||
conf.Provider.GCP.IAMServiceAccountVM = "[email protected]" | ||
conf.Attestation.GCPSEVSNP.Measurements[4] = measurements.WithAllBytes(0x44, measurements.Enforce, measurements.PCRMeasurementLength) | ||
conf.Attestation.GCPSEVSNP.Measurements[9] = measurements.WithAllBytes(0x11, measurements.Enforce, measurements.PCRMeasurementLength) | ||
conf.Attestation.GCPSEVSNP.Measurements[12] = measurements.WithAllBytes(0xcc, measurements.Enforce, measurements.PCRMeasurementLength) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,8 +122,9 @@ func TestGCPClusterVariables(t *testing.T) { | |
DiskType: "pd-ssd", | ||
}, | ||
}, | ||
CustomEndpoint: "example.com", | ||
CCTechnology: "SEV_SNP", | ||
CustomEndpoint: "example.com", | ||
CCTechnology: "SEV_SNP", | ||
IAMServiceAccountVM: "[email protected]", | ||
} | ||
|
||
// test that the variables are correctly rendered | ||
|
@@ -151,10 +152,11 @@ node_groups = { | |
zone = "eu-central-1b" | ||
} | ||
} | ||
custom_endpoint = "example.com" | ||
internal_load_balancer = false | ||
cc_technology = "SEV_SNP" | ||
additional_labels = null | ||
custom_endpoint = "example.com" | ||
internal_load_balancer = false | ||
cc_technology = "SEV_SNP" | ||
iam_service_account_vm = "[email protected]" | ||
additional_labels = null | ||
` | ||
got := vars.String() | ||
assert.Equal(t, strings.Fields(want), strings.Fields(got)) // to ignore whitespace differences | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -328,10 +328,10 @@ func TestFromFile(t *testing.T) { | |
} | ||
|
||
func TestValidate(t *testing.T) { | ||
const defaultErrCount = 33 // expect this number of error messages by default because user-specific values are not set and multiple providers are defined by default | ||
const defaultErrCount = 34 // expect this number of error messages by default because user-specific values are not set and multiple providers are defined by default | ||
const azErrCount = 7 | ||
const awsErrCount = 8 | ||
const gcpErrCount = 8 | ||
const gcpErrCount = 9 | ||
|
||
// TODO(AB#3132,3u13r): refactor config validation tests | ||
// Note that the `cnf.Image = ""` is a hack to align `bazel test` with `go test` behavior | ||
|
@@ -464,6 +464,7 @@ func TestValidate(t *testing.T) { | |
gcp.Project = "test-project" | ||
gcp.Zone = "test-zone" | ||
gcp.ServiceAccountKeyPath = "test-key-path" | ||
gcp.IAMServiceAccountVM = "[email protected]" | ||
cnf.Provider = ProviderConfig{} | ||
cnf.Provider.GCP = gcp | ||
cnf.Attestation.GCPSEVSNP.Measurements = measurements.M{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters