Skip to content

Commit

Permalink
feat(cmd/scripts/kubernetes): Create install-cluster-issuer-zerossl s…
Browse files Browse the repository at this point in the history
…cript
  • Loading branch information
ondrejsika committed Aug 31, 2023
1 parent e56b39f commit 14abdc9
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ import (
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes/install_cert_manager"
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes/install_cluster_issuer"
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes/install_cluster_issuer_cloudflare"
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes/install_cluster_issuer_zerossl"
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes/install_hello_world"
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes/install_ingress"
_ "github.com/sikalabs/slu/cmd/scripts/kubernetes/install_ingress_aks"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package install_cluster_issuer_zerossl

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 FlagEmail string
var FlagKeyID string
var FlagKeySecret string

var Cmd = &cobra.Command{
Use: "install-cluster-issuer-zerossl",
Short: "Install ZeroSSL Cluster Issuer",
Aliases: []string{"iciz"},
Args: cobra.NoArgs,
Run: func(c *cobra.Command, args []string) {
k8s_scripts.InstallClusterIssuerZeroSSL(FlagEmail, FlagKeyID, FlagKeySecret, FlagDry)
},
}

func init() {
parent_cmd.Cmd.AddCommand(Cmd)
Cmd.Flags().BoolVar(
&FlagDry,
"dry",
false,
"Dry run",
)
Cmd.Flags().StringVarP(
&FlagEmail,
"email",
"e",
"",
"Email of ZeroSSL account",
)
Cmd.MarkFlagRequired("email")
Cmd.Flags().StringVarP(
&FlagKeyID,
"key-id",
"i",
"",
"ZeroSSL KeyID",
)
Cmd.MarkFlagRequired("key-id")
Cmd.Flags().StringVarP(
&FlagKeySecret,
"key-secret",
"s",
"",
"ZeroSSL KeySecret",
)
Cmd.MarkFlagRequired("key-secret")
}

0 comments on commit 14abdc9

Please sign in to comment.