config

package
v3.9.0-0.9.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenShiftConfigPathEnvVar      = "KUBECONFIG"
	OpenShiftConfigFlagName        = "config"
	OpenShiftConfigHomeDir         = ".kube"
	OpenShiftConfigHomeFileName    = "config"
	OpenShiftConfigHomeDirFileName = OpenShiftConfigHomeDir + "/" + OpenShiftConfigHomeFileName
)

Variables

Functions

func CurrentMigrationRules

func CurrentMigrationRules() map[string]string

currentMigrationRules returns a map that holds the history of recommended home directories used in previous versions. Any future changes to RecommendedHomeFile and related are expected to add a migration rule here, in order to make sure existing config files are migrated to their new locations properly.

func GetClusterNicknameFromURL

func GetClusterNicknameFromURL(apiServerLocation string) (string, error)

GetClusterNicknameFromURL returns host:port of the apiServerLocation, with .'s replaced by -'s

func GetContextNickname

func GetContextNickname(namespace, clusterNick, userNick string) string

func GetUserNicknameFromCert

func GetUserNicknameFromCert(clusterNick string, chain ...*x509.Certificate) (string, error)

func NewOpenShiftClientConfigLoadingRules

func NewOpenShiftClientConfigLoadingRules() *clientcmd.ClientConfigLoadingRules

NewOpenShiftClientConfigLoadingRules returns file priority loading rules for OpenShift. 1. --config value 2. if KUBECONFIG env var has a value, use it. Otherwise, ~/.kube/config file

func NormalizeServerURL

func NormalizeServerURL(s string) (string, error)

NormalizeServerURL is opinionated normalization of a string that represents a URL. Returns the URL provided matching the format expected when storing a URL in a config. Sets a scheme and port if not present, removes unnecessary trailing slashes, etc. Can be used to normalize a URL provided by user input.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL