Skip to content

Commit

Permalink
Allow infrastructure provider to be overridden when deploying compone…
Browse files Browse the repository at this point in the history
…nts.
  • Loading branch information
GrahamDumpleton committed Feb 14, 2023
1 parent c7adac2 commit 6c33de0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion client-programs/pkg/cmd/admin_platform_deploy_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
type AdminPlatformDeployOptions struct {
Config string
Kubeconfig string
Provider string
Version string
}

Expand All @@ -23,7 +24,7 @@ func (o *AdminPlatformDeployOptions) Run() error {
return err
}

fullConfig.ClusterInfrastructure.Provider = "kind"
fullConfig.ClusterInfrastructure.Provider = o.Provider

clusterConfig := cluster.NewClusterConfig(o.Kubeconfig)

Expand Down Expand Up @@ -67,6 +68,12 @@ func (p *ProjectInfo) NewAdminPlatformDeployCmd() *cobra.Command {
"",
"kubeconfig file to use instead of $KUBECONFIG or $HOME/.kube/config",
)
c.Flags().StringVar(
&o.Provider,
"provider",
"kind",
"infastructure provider deployment is being made to",
)
c.Flags().StringVar(
&o.Version,
"version",
Expand Down
9 changes: 8 additions & 1 deletion client-programs/pkg/cmd/admin_services_deploy_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
type AdminServicesDeployOptions struct {
Config string
Kubeconfig string
Provider string
Version string
}

Expand All @@ -23,7 +24,7 @@ func (o *AdminServicesDeployOptions) Run() error {
return err
}

fullConfig.ClusterInfrastructure.Provider = "kind"
fullConfig.ClusterInfrastructure.Provider = o.Provider

clusterConfig := cluster.NewClusterConfig(o.Kubeconfig)

Expand Down Expand Up @@ -58,6 +59,12 @@ func (p *ProjectInfo) NewAdminServicesDeployCmd() *cobra.Command {
"",
"kubeconfig file to use instead of $KUBECONFIG or $HOME/.kube/config",
)
c.Flags().StringVar(
&o.Provider,
"provider",
"kind",
"infastructure provider deployment is being made to",
)
c.Flags().StringVar(
&o.Version,
"version",
Expand Down

0 comments on commit 6c33de0

Please sign in to comment.