Documentation ¶
Index ¶
- func Context(kuber kube.Kuber) (*api.Context, error)
- func Name(kuber kube.Kuber) (string, error)
- func ShortClusterName(clusterName string) string
- func ShortName(kuber kube.Kuber) (string, error)
- func ShortNameN(clusterName string, maxLen int) string
- func SimplifiedClusterName(complexClusterName string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Name ¶
Name gets the cluster name from the current context Note that this just reads the ClusterName from the local kube config, which can be renamed (but is unlikely to happen)
func ShortClusterName ¶ added in v1.3.937
ShortClusterName shrinks the cluster name
func ShortName ¶
ShortName returns a short clusters name. Eg, if ClusterName would return tweetypie-jenkinsx-dev, ShortClusterName would return tweetypie. This is needed because GCP has character limits on things like service accounts (6-30 chars) and combining a long cluster name and a long vault name exceeds this limit
func ShortNameN ¶ added in v1.3.937
ShortNameN shrinks the name to a max length
func SimplifiedClusterName ¶
SimplifiedClusterName get the simplified cluster name from the long-winded context cluster name that gets generated GKE cluster names as defined in the kube config are of the form gke_<projectname>_<region>_<clustername> This method will return <clustername> in the above
Types ¶
This section is empty.