Skip to content

Commit

Permalink
add emoji, rename flag
Browse files Browse the repository at this point in the history
  • Loading branch information
qrnvttrl committed Sep 24, 2024
1 parent 6a62b5e commit ce2c45a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func newClusterCmd(c *config) *cobra.Command {
clusterCreateCmd.Flags().StringSlice("kube-apiserver-acl-allowed-cidrs", []string{}, "comma-separated list of external CIDRs allowed to connect to the kube-apiserver (e.g. \"212.34.68.0/24,212.34.89.0/27\")")
clusterCreateCmd.Flags().Bool("enable-kube-apiserver-acl", false, "restricts access from outside to the kube-apiserver to the source ip addresses set by --kube-apiserver-acl-allowed-cidrs [optional].")
clusterCreateCmd.Flags().String("network-isolation", "", "defines restrictions to external network communication for the cluster, can be one of baseline|restricted|isolated. baseline sets no special restrictions to external networks, restricted by default only allows external traffic to explicitly allowed destinations, forbidden disallows communication with external networks except for a limited set of networks. Please consult the documentation for detailed descriptions of the individual modes as these cannot be altered anymore after creation. [optional]")
clusterCreateCmd.Flags().Bool("high-availability", false, "enables a high availability control plane for the cluster, cannot be disabled again")
clusterCreateCmd.Flags().Bool("high-availability-control-plane", false, "enables a high availability control plane for the cluster, cannot be disabled again")

genericcli.Must(clusterCreateCmd.MarkFlagRequired("name"))
genericcli.Must(clusterCreateCmd.MarkFlagRequired("project"))
Expand Down Expand Up @@ -337,7 +337,7 @@ func newClusterCmd(c *config) *cobra.Command {
clusterUpdateCmd.Flags().StringSlice("kube-apiserver-acl-add-to-allowed-cidrs", []string{}, "comma-separated list of external CIDRs to add to the allowed CIDRs to connect to the kube-apiserver (e.g. \"212.34.68.0/24,212.34.89.0/27\")")
clusterUpdateCmd.Flags().StringSlice("kube-apiserver-acl-remove-from-allowed-cidrs", []string{}, "comma-separated list of external CIDRs to be removed from the allowed CIDRs to connect to the kube-apiserver (e.g. \"212.34.68.0/24,212.34.89.0/27\")")
clusterUpdateCmd.Flags().Bool("enable-kube-apiserver-acl", false, "restricts access from outside to the kube-apiserver to the source ip addresses set by --kube-apiserver-acl-* [optional].")
clusterUpdateCmd.Flags().Bool("high-availability", false, "enables a high availability control plane for the cluster, cannot be disabled again")
clusterUpdateCmd.Flags().Bool("high-availability-control-plane", false, "enables a high availability control plane for the cluster, cannot be disabled again")

genericcli.Must(clusterUpdateCmd.RegisterFlagCompletionFunc("version", c.comp.VersionListCompletion))
genericcli.Must(clusterUpdateCmd.RegisterFlagCompletionFunc("workerversion", c.comp.VersionListCompletion))
Expand Down Expand Up @@ -449,7 +449,7 @@ func (c *config) clusterCreate() error {
encryptedStorageClasses := strconv.FormatBool(viper.GetBool("encrypted-storage-classes"))
enableNodeLocalDNS := viper.GetBool("enable-node-local-dns")
disableForwardToUpstreamDNS := viper.GetBool("disable-forwarding-to-upstream-dns")
highAvailability := strconv.FormatBool(viper.GetBool("high-availability"))
highAvailability := strconv.FormatBool(viper.GetBool("high-availability-control-plane"))

var cni string
if viper.IsSet("cni") {
Expand Down Expand Up @@ -676,7 +676,7 @@ WARNING: You are going to create a cluster that has no default internet access w
}
}

if viper.IsSet("high-availability") {
if viper.IsSet("high-availability-control-plane") {
scr.ClusterFeatures.HighAvailability = &highAvailability
}

Expand Down Expand Up @@ -915,7 +915,7 @@ func (c *config) updateCluster(args []string) error {
disableDefaultStorageClass := viper.GetBool("disable-custom-default-storage-class")

encryptedStorageClasses := strconv.FormatBool(viper.GetBool("encrypted-storage-classes"))
highAvailability := strconv.FormatBool(viper.GetBool("high-availability"))
highAvailability := strconv.FormatBool(viper.GetBool("high-availability-control-plane"))

workerlabels, err := helper.LabelsToMap(workerlabelslice)
if err != nil {
Expand Down Expand Up @@ -973,7 +973,7 @@ func (c *config) updateCluster(args []string) error {
if viper.IsSet("logacceptedconns") {
clusterFeatures.LogAcceptedConnections = &logAcceptedConnections
}
if viper.IsSet("high-availabilty") {
if viper.IsSet("high-availability-control-plane") {
clusterFeatures.HighAvailability = &highAvailability
}

Expand Down
3 changes: 3 additions & 0 deletions cmd/output/shootprinter.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ func shootData(shoot *models.V1ClusterResponse, withIssues bool) ([]string, []st
if shoot.KubeAPIServerACL != nil && !*shoot.KubeAPIServerACL.Disabled {
shootStats.apiServer += "🔒"
}
if shoot.ClusterFeatures != nil && shoot.ClusterFeatures.HighAvailability != nil && *shoot.ClusterFeatures.HighAvailability == "true" {
shootStats.apiServer += "🌐"
}
name := *shoot.Name
if shoot.NetworkAccessType != nil {
if *shoot.NetworkAccessType == models.V1ClusterCreateRequestNetworkAccessTypeForbidden {
Expand Down

0 comments on commit ce2c45a

Please sign in to comment.