@@ -17,68 +17,73 @@ func main() {
1717 Usage : "GitOps CLI" ,
1818 Flags : []cli.Flag {
1919 & cli.StringFlag {
20- Name : "root-dir" ,
21- Value : "" ,
22- Usage : "root directory of the git repository" ,
20+ Name : "root-dir" ,
21+ Value : "" ,
22+ Usage : "root directory of the git repository" ,
2323 EnvVars : []string {"GITOPS_ROOT_DIR" },
2424 },
2525 & cli.StringFlag {
26- Name : "kubeconfig" ,
26+ Name : "kubeconfig" ,
2727 Aliases : []string {"k" },
28- Value : "" ,
29- Usage : "kubeconfig file to use for connecting to the Kubernetes cluster" ,
28+ Value : "" ,
29+ Usage : "kubeconfig file to use for connecting to the Kubernetes cluster" ,
3030 EnvVars : []string {"KUBECONFIG" , "GITOPS_KUBECONFIG" },
3131 },
3232 & cli.BoolFlag {
33- Name : "verbose" ,
33+ Name : "verbose" ,
3434 Aliases : []string {"v" },
35- Usage : "debug output" ,
35+ Usage : "debug output" ,
3636 EnvVars : []string {"GITOPS_VERBOSE" },
3737 },
3838 & cli.BoolFlag {
39- Name : "very-verbose" ,
39+ Name : "very-verbose" ,
4040 Aliases : []string {"vv" },
41- Usage : "trace output" ,
41+ Usage : "trace output" ,
4242 EnvVars : []string {"GITOPS_VERY_VERBOSE" },
4343 },
4444 & cli.BoolFlag {
45- Name : "cleartext" ,
46- Usage : "print secrets in cleartext to the console" ,
45+ Name : "cleartext" ,
46+ Usage : "print secrets in cleartext to the console" ,
4747 EnvVars : []string {"GITOPS_CLEARTEXT" },
4848 },
4949 & cli.BoolFlag {
50- Name : "print" ,
51- Usage : "print secrets to the console" ,
50+ Name : "print" ,
51+ Usage : "print secrets to the console" ,
5252 EnvVars : []string {"GITOPS_PRINT" },
5353 },
54+ & cli.BoolFlag {
55+ Name : "show-unchanged" ,
56+ Usage : "display unchanged secrets in the plan overview" ,
57+ EnvVars : []string {"GITOPS_SHOW_UNCHANGED" },
58+ },
5459 },
5560 Commands : []* cli.Command {
5661 {
57- Name : "secrets" ,
62+ Name : "secrets" ,
5863 Aliases : []string {"s" },
59- Usage : "GitOps managed secrets" ,
64+ Usage : "GitOps managed secrets" ,
6065 Flags : []cli.Flag {
6166 & cli.StringFlag {
62- Name : "dir" ,
67+ Name : "dir" ,
6368 Aliases : []string {"d" },
64- Value : "" ,
65- Usage : "directory to limit secret discovery to" ,
69+ Value : "" ,
70+ Usage : "directory to limit secret discovery to" ,
6671 EnvVars : []string {"GITOPS_SECRETS_DIR" },
6772 },
6873 },
6974 Subcommands : []* cli.Command {
7075 {
71- Name : "apply" ,
76+ Name : "apply" ,
7277 Aliases : []string {"a" },
73- Usage : "Push secrets into your infrastructure" ,
78+ Usage : "Push secrets into your infrastructure" ,
7479 Subcommands : []* cli.Command {
7580 {
76- Name : "kubernetes" ,
81+ Name : "kubernetes" ,
7782 Aliases : []string {"k8s" },
78- Usage : "Push secrets into a Kubernetes cluster" ,
83+ Usage : "Push secrets into a Kubernetes cluster" ,
7984 Flags : []cli.Flag {
8085 & cli.BoolFlag {
81- Name : "auto-approve" ,
86+ Name : "auto-approve" ,
8287 Usage : "apply the changes without prompting for approval" ,
8388 },
8489 },
@@ -88,7 +93,7 @@ func main() {
8893 },
8994 },
9095 {
91- Name : "vault" ,
96+ Name : "vault" ,
9297 Usage : "Push secrets into vault" ,
9398 Action : func (c * cli.Context ) error {
9499 log .Fatal ("Not implemented yet" )
@@ -98,14 +103,14 @@ func main() {
98103 },
99104 },
100105 {
101- Name : "plan" ,
106+ Name : "plan" ,
102107 Aliases : []string {"p" },
103- Usage : "Plan the application of secrets into your infrastructure" ,
108+ Usage : "Plan the application of secrets into your infrastructure" ,
104109 Subcommands : []* cli.Command {
105110 {
106- Name : "kubernetes" ,
111+ Name : "kubernetes" ,
107112 Aliases : []string {"k8s" },
108- Usage : "Plan the application of secrets into a Kubernetes cluster" ,
113+ Usage : "Plan the application of secrets into a Kubernetes cluster" ,
109114
110115 Action : func (c * cli.Context ) error {
111116 initApplication (c )
@@ -115,7 +120,7 @@ func main() {
115120 },
116121 },
117122 {
118- Name : "template" ,
123+ Name : "template" ,
119124 Usage : "Test the templating of secrets" ,
120125 Action : func (c * cli.Context ) error {
121126 initApplication (c )
@@ -125,11 +130,11 @@ func main() {
125130 },
126131 },
127132 {
128- Name : "clusters" ,
133+ Name : "clusters" ,
129134 Usage : "Managing target clusters" ,
130135 Subcommands : []* cli.Command {
131136 {
132- Name : "list" ,
137+ Name : "list" ,
133138 Usage : "List all target clusters" ,
134139 Action : func (c * cli.Context ) error {
135140 initApplication (c )
@@ -145,7 +150,7 @@ func main() {
145150 },
146151 },
147152 {
148- Name : "add" ,
153+ Name : "add" ,
149154 Usage : "Add a target cluster. <name> <configFile>" ,
150155 Action : func (c * cli.Context ) error {
151156 initApplication (c )
@@ -159,7 +164,7 @@ func main() {
159164 log .Fatal ("Usage: gitops clusters add <name> <configFile>" )
160165 }
161166 err := state .GetState ().AddCluster (& state.ClusterState {
162- Name : c .Args ().Get (0 ),
167+ Name : c .Args ().Get (0 ),
163168 ConfigFile : kubeconfig ,
164169 })
165170 if err != nil {
@@ -169,7 +174,7 @@ func main() {
169174 },
170175 },
171176 {
172- Name : "remove" ,
177+ Name : "remove" ,
173178 Usage : "Remove a target cluster" ,
174179 Action : func (c * cli.Context ) error {
175180 initApplication (c )
@@ -184,7 +189,7 @@ func main() {
184189 },
185190 },
186191 {
187- Name : "test" ,
192+ Name : "test" ,
188193 Usage : "Test a target cluster connection" ,
189194 Action : func (c * cli.Context ) error {
190195 initApplication (c )
0 commit comments