-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(install_ingress_aks): Create
slu s k install-ingress-aks
- Loading branch information
1 parent
e8ba735
commit be0cd5a
Showing
3 changed files
with
70 additions
and
0 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
47 changes: 47 additions & 0 deletions
47
cmd/scripts/kubernetes/install_ingress_aks/install_ingress_aks.go
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package install_ingress | ||
|
||
import ( | ||
parent_cmd "github.com/sikalabs/slu/cmd/scripts/kubernetes" | ||
"github.com/sikalabs/slu/utils/k8s_scripts" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var FlagDry bool | ||
var FlagLoadBalancerIP string | ||
var FlagResourceGroupName string | ||
|
||
var Cmd = &cobra.Command{ | ||
Use: "install-ingress-aks", | ||
Short: "Install Ingress Nginx AKS (Azure)", | ||
Aliases: []string{"iiaks"}, | ||
Args: cobra.NoArgs, | ||
Run: func(c *cobra.Command, args []string) { | ||
k8s_scripts.InstallIngressAKS(FlagLoadBalancerIP, FlagResourceGroupName, FlagDry) | ||
}, | ||
} | ||
|
||
func init() { | ||
parent_cmd.Cmd.AddCommand(Cmd) | ||
Cmd.Flags().BoolVar( | ||
&FlagDry, | ||
"dry", | ||
false, | ||
"Dry run", | ||
) | ||
Cmd.Flags().StringVarP( | ||
&FlagLoadBalancerIP, | ||
"loadbalancer-ip", | ||
"i", | ||
"", | ||
"LoadBalancer IP", | ||
) | ||
Cmd.MarkFlagRequired("loadbalancer-ip") | ||
Cmd.Flags().StringVarP( | ||
&FlagResourceGroupName, | ||
"resource-group-name", | ||
"r", | ||
"", | ||
"Resource Group Name", | ||
) | ||
Cmd.MarkFlagRequired("resource-group-name") | ||
} |
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