kubetest: pass through KOPS_ARCH if set

This allows us to test with a fast single-architecture build, useful
when running kubetest locally.
This commit is contained in:
justinsb 2023-01-07 17:22:52 -05:00
parent c7b1146e64
commit 571bd38ea1
1 changed files with 8 additions and 0 deletions

View File

@ -182,6 +182,14 @@ func (d *deployer) env() []string {
fmt.Sprintf("KOPS_FEATURE_FLAGS=%v", d.featureFlags()),
"KOPS_RUN_TOO_NEW_VERSION=1",
}...)
// Pass-through some env vars if set (on all clouds)
for _, k := range []string{"KOPS_ARCH"} {
if v := os.Getenv(k); v != "" {
vars = append(vars, k+"="+v)
}
}
if d.CloudProvider == "aws" {
// Pass through some env vars if set
for _, k := range []string{"AWS_PROFILE", "AWS_SHARED_CREDENTIALS_FILE"} {