Skip to content

Commit f1ac2ab

Browse files
Cr 16741 (#670)
Co-authored-by: roi.kramer <[email protected]>
1 parent e88dc4e commit f1ac2ab

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=v0.1.29
1+
VERSION=v0.1.30
22

33
OUT_DIR=dist
44
YEAR?=$(shell date +"%Y")

cmd/commands/cluster.go

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,17 @@ import (
4141

4242
type (
4343
ClusterAddOptions struct {
44-
runtimeName string
45-
clusterName string
46-
kubeContext string
47-
kubeconfig string
48-
systemNamespace string
49-
annotations map[string]string
50-
labels map[string]string
51-
tag string
52-
dryRun bool
53-
kubeFactory kube.Factory
44+
runtimeName string
45+
clusterName string
46+
kubeContext string
47+
kubeconfig string
48+
systemNamespace string
49+
annotations map[string]string
50+
labels map[string]string
51+
tag string
52+
dryRun bool
53+
skipTLSValidation bool
54+
kubeFactory kube.Factory
5455
}
5556

5657
ClusterRemoveOptions struct {
@@ -142,6 +143,7 @@ func newClusterAddCommand() *cobra.Command {
142143
cmd.Flags().StringToStringVar(&opts.annotations, "annotations", nil, "Set metadata annotations (e.g. --annotation key=value)")
143144
cmd.Flags().StringToStringVar(&opts.labels, "labels", nil, "Set metadata labels (e.g. --label key=value)")
144145
cmd.Flags().BoolVar(&opts.dryRun, "dry-run", false, "")
146+
cmd.Flags().BoolVar(&opts.skipTLSValidation, "skip-tls-validation", false, "Set true to skip TLS validation for cluster domain")
145147
cmd.Flags().StringVar(&opts.tag, "tag", "", "[dev only] - use a specific tag of the csdp-add-cluster image")
146148

147149
util.Die(cmd.Flags().MarkHidden("tag"))
@@ -325,6 +327,7 @@ func createAddClusterManifests(opts *ClusterAddOptions, ingressUrl, server, csdp
325327
fmt.Sprintf("ingressUrl=" + ingressUrl),
326328
fmt.Sprintf("contextName=" + opts.clusterName),
327329
fmt.Sprintf("server=" + server),
330+
fmt.Sprintf("skipTLSValidation=%v", opts.skipTLSValidation),
328331
},
329332
},
330333
},

docs/commands/cli-v2_cluster_add.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ cli-v2 cluster add my-runtime --context my-context
2323
--labels stringToString Set metadata labels (e.g. --label key=value) (default [])
2424
--name string Name of the cluster. If omitted, will use the context name
2525
-n, --namespace string If present, the namespace scope for this CLI request
26+
--skip-tls-validation Set true to skip TLS validation for cluster domain
2627
--system-namespace string Use different system namespace (default "kube-system") (default "kube-system")
2728
```
2829

0 commit comments

Comments
 (0)