util

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	KubeconfigSecretDataKey = "kubeconfig"
)

Variables

This section is empty.

Functions

func CreateKubeconfigSecret

func CreateKubeconfigSecret(secretToolSet SecretToolSetInterface, kubeconfig *clientcmdapi.Config, namespace, name, federationName, clusterName string, dryRun bool) (*api.Secret, error)

func DeleteKubeconfigSecret

func DeleteKubeconfigSecret(secretToolSet SecretToolSetInterface, namespace string, name string) error

func Write

func Write(config clientcmdapi.Config) ([]byte, error)

Types

type ClusterAnnotation

type ClusterAnnotation struct {
	Annotations       map[string]string
	DeleteAnnotations []string
}

This will be used by Provider APIs in kubeprovider.go to return Annotations that need to be created or deleted. Currently, this is only being used by ScaleKubeClusterUp, ScaleKubeClusterDown and ValidateKubeCluster

func (*ClusterAnnotation) ApplyAnnotation

func (ca *ClusterAnnotation) ApplyAnnotation(annotations map[string]string)

func (*ClusterAnnotation) DeleteAnnotation

func (ca *ClusterAnnotation) DeleteAnnotation(key string)

func (*ClusterAnnotation) SetAnnotation

func (ca *ClusterAnnotation) SetAnnotation(key string, value string)

type SecretToolSet

type SecretToolSet struct {
	// contains filtered or unexported fields
}

func (*SecretToolSet) CreateSecret

func (st *SecretToolSet) CreateSecret(namespace string, secret *api.Secret) (*api.Secret, error)

func (*SecretToolSet) DeleteSecret

func (st *SecretToolSet) DeleteSecret(namespace, name string) error

type SecretToolSetInterface

type SecretToolSetInterface interface {
	CreateSecret(namespace string, secret *api.Secret) (*api.Secret, error)
	DeleteSecret(namespace, name string) error
}

func NewSecretToolSet

func NewSecretToolSet() SecretToolSetInterface

Jump to

Keyboard shortcuts

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