-
-
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(cmd/scripts/kubernetes): Create install-cluster-issuer-zerossl s…
…cript
- Loading branch information
1 parent
e56b39f
commit 14abdc9
Showing
2 changed files
with
57 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
56 changes: 56 additions & 0 deletions
56
cmd/scripts/kubernetes/install_cluster_issuer_zerossl/install_cluster_issuer_zerossl.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,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") | ||
} |