util

package
v0.5.0-b26f5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeNamespace         = "kube-system"
	ApiGatewayNamespace   = "api-gateway-system"
	IngressNginxNamespace = "ingress-nginx"
	ArgoNamespace         = "argocd"
)
View Source
const (
	ProviderAws     = "AWS"

	ProviderVsphere     = "VSPHERE"

	ProviderUnknown = "Unknown"
)
View Source
const (
	ClmSecretTypeKubeconfig = "kubeconfig"
	ClmSecretTypeArgo       = "argocd"
)
View Source
const (
	ArgoApiGroup           = "argocd.argoproj.io"
	ArgoServiceAccount     = "argocd-manager"
	ArgoClusterRole        = "argocd-manager-role"
	ArgoClusterRoleBinding = "argocd-manager-role-binding"
	ArgoSecretTypeCluster  = "cluster"
	ArgoSecretTypeGit      = "repo"
)
View Source
const (
	AnnotationKeyOwner   = "owner"
	AnnotationKeyCreator = "creator"

	AnnotationKeyArgoClusterSecret = "argocd.argoproj.io/cluster.secret"
	AnnotationKeyArgoManagedBy     = "managed-by"

	AnnotationKeyTraefikServerTransport = "traefik.ingress.kubernetes.io/service.serverstransport"
	AnnotationKeyTraefikEntrypoints     = "traefik.ingress.kubernetes.io/router.entrypoints"
	AnnotationKeyTraefikMiddlewares     = "traefik.ingress.kubernetes.io/router.middlewares"
	AnnotationKeyTraefikServerScheme    = "traefik.ingress.kubernetes.io/service.serversscheme"
)
View Source
const (
	LabelKeyHypercloudIngress = "ingress.tmaxcloud.org/name"

	LabelKeyClmSecretType = "cluster.tmax.io/clm-secret-type"

	LabelKeyArgoSecretType = "argocd.argoproj.io/secret-type"
)
View Source
const (
	// defunct
	// MultiApiServerServiceSelectorKey   = "hypercloud4"
	// MultiApiServerServiceSelectorValue = "multi-api-server"
	IngressNginxName = "ingress-nginx-controller"
)
View Source
const (
	KubeconfigSuffix = "-kubeconfig"
)

Variables

This section is empty.

Functions

func CreateSuffixString

func CreateSuffixString() string

func Delete

func Delete(namespace, cluster string) error

func GetK8sClient

func GetK8sClient() (*kubernetes.Clientset, error)

func GetProviderName

func GetProviderName(provider string) (string, error)

func GetRemoteK8sClient

func GetRemoteK8sClient(secret *corev1.Secret) (*kubernetes.Clientset, error)

func GetRemoteK8sClientByKubeConfig

func GetRemoteK8sClientByKubeConfig(kubeConfig []byte) (*kubernetes.Clientset, error)

func Insert

func Insert(clusterManager *clusterv1alpha1.ClusterManager) error

func IsIpAddress

func IsIpAddress(endPoint string) bool

func LowestNonZeroResult

func LowestNonZeroResult(i, j ctrl.Result) ctrl.Result

LowestNonZeroResult compares two reconciliation results and returns the one with lowest requeue time.

func MergeJson

func MergeJson(dest []byte, source []byte) []byte

func URIToSecretName

func URIToSecretName(uriType, uri string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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