k8sutil

package
v0.0.0-...-5ef725e Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KubeConfigLocation string
	DefaultConfig      *rest.Config
)

Functions

func CreateCRD

CreateCRD creates the objects in kubernetes

func CreateClusterRole

func CreateClusterRole(schema rbac.ClusterRole, config *rest.Config) (bool, error)

func CreateClusterRoleBinding

func CreateClusterRoleBinding(schema rbac.ClusterRoleBinding, config *rest.Config) (bool, error)

func CreateExternalService

func CreateExternalService(schema corev1.Service, sdsCluster *v1alpha1.SDSCluster, config *rest.Config) (bool, error)

func CreateIngress

func CreateIngress(schema v1beta1.Ingress, sdsCluster *v1alpha1.SDSCluster, config *rest.Config) (bool, error)

func CreateJob

func CreateJob(schema batchv1.Job, namespace string, config *rest.Config) (bool, error)

func CreateNamespace

func CreateNamespace(schema corev1.Namespace, config *rest.Config) (bool, error)

func CreateRole

func CreateRole(schema rbac.Role, namespace string, config *rest.Config) (bool, error)

func CreateRoleBinding

func CreateRoleBinding(schema rbac.RoleBinding, namespace string, config *rest.Config) (bool, error)

func CreateSecret

func CreateSecret(name string, namespace string, sdsCluster *v1alpha1.SDSCluster, dataKeyName string, secretData []byte, config *rest.Config) error

func CreateServiceAccount

func CreateServiceAccount(schema corev1.ServiceAccount, namespace string, config *rest.Config) (bool, error)

func DeleteSecret

func DeleteSecret(name string, namespace string, config *rest.Config) error

func GenerateExternalService

func GenerateExternalService(name string, externalName string) corev1.Service

func GenerateIngress

func GenerateIngress(name string, cluster string, service string) v1beta1.Ingress

func GenerateJob

func GenerateJob(name string, jobSpec batchv1.JobSpec) batchv1.Job

func GenerateKubernetesConfig

func GenerateKubernetesConfig() (*rest.Config, error)

func GenerateNamespace

func GenerateNamespace(name string) corev1.Namespace

func GenerateServiceAccount

func GenerateServiceAccount(name string) corev1.ServiceAccount

func GenerateSingleClusterRolebinding

func GenerateSingleClusterRolebinding(name string, subject string, subjectNamespace string, roleName string) rbac.ClusterRoleBinding

func GenerateSingleRolebinding

func GenerateSingleRolebinding(name string, subject string, subjectNamespace string, roleName string) rbac.RoleBinding

func GetClusterEndpoint

func GetClusterEndpoint(kubeconfig string) (string, error)

func GetSecret

func GetSecret(name string, namespace string, config *rest.Config) (corev1.Secret, error)

func GetTokenNameFromServiceAccount

func GetTokenNameFromServiceAccount(name string, namespace string, config *rest.Config) (string, error)

func IsResourceAlreadyExistsError

func IsResourceAlreadyExistsError(err error) bool

IsResourceAlreadyExistsError determines if error is an already exist type

func IsResourceNotFoundError

func IsResourceNotFoundError(err error) bool

IsResourceNotFoundError determines if error is of type not found

func SetLogger

func SetLogger()

func WaitCRDReady

func WaitCRDReady(clientset apiextensionsclient.Interface, crdName string) error

WaitCRDReady waits until proper condition is obtained.

Types

This section is empty.

Jump to

Keyboard shortcuts

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