Skip to content

Commit

Permalink
set gcp base in config load
Browse files Browse the repository at this point in the history
  • Loading branch information
theganyo committed Apr 13, 2020
1 parent e6997e3 commit bf30f31
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shared/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ func (r *RootArgs) loadConfig() error {
case LegacySaaSManagementBase:
r.IsLegacySaaS = true
case GCPExperienceBase:
case "":
r.ManagementBase = GCPExperienceBase
r.IsGCPManaged = true
default:
r.IsOPDK = true
Expand All @@ -232,13 +234,15 @@ func loadEnv(r *RootArgs, env OverrideEnv) {
}
}

// PrintMissingFlags will aggregate and print an error for the passed set of flags
func (r *RootArgs) PrintMissingFlags(missingFlagNames []string) error {
if len(missingFlagNames) > 0 {
return fmt.Errorf(`required flag(s) "%s" not set`, strings.Join(missingFlagNames, `", "`))
}
return nil
}

// KubernetesCRD has generic Kubernetes headers for CRD generation
type KubernetesCRD struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Expand All @@ -247,6 +251,7 @@ type KubernetesCRD struct {
Data map[string]string `yaml:"data"`
}

// Metadata is for Kubernetes CRD generation
type Metadata struct {
Name string `yaml:"name"`
Namespace string `yaml:"namespace"`
Expand Down

0 comments on commit bf30f31

Please sign in to comment.