utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApproveCSR

func ApproveCSR(client *kubernetes.Clientset, csrName string) (*certsv1beta1.CertificateSigningRequest, error)

ApproveCSR approves the CSR with the given name

func CreateCSR

CreateCSR creates a Kubernetes CSR from the input given If the CSR already exists it will update it

func CreateSecret

func CreateSecret(client *kubernetes.Clientset, secret *v1.Secret) (*v1.Secret, error)

CreateSecret will create the secret if it does not exist If the secert does exist, it will update the secret

func GetCSR

GetCSR retrieves the named CSR from Kubernetes

func GetCertificate

func GetCertificate(client *kubernetes.Clientset, csrName string) ([]byte, error)

GetCertificate returns the Base64 encoded certificate from the CSR

func GetConfigMap

func GetConfigMap(client *kubernetes.Clientset, namespace string, name string) (*v1.ConfigMap, error)

GetConfigMap gets the named configmap from kubernetes

func GetMutatingWebhookConfiguration

func GetMutatingWebhookConfiguration(client *kubernetes.Clientset, name string) (*arv1beta1.MutatingWebhookConfiguration, error)

GetMutatingWebhookConfiguration gets the names mutating webhook configuration from kubernetes

func GetSecret

func GetSecret(client *kubernetes.Clientset, namespace string, name string) (*v1.Secret, error)

GetSecret gets the named secret from kubernetes If the names secret does not exist, it will generate an empty secret

func GetValidatingWebhookConfiguration

func GetValidatingWebhookConfiguration(client *kubernetes.Clientset, name string) (*arv1beta1.ValidatingWebhookConfiguration, error)

GetValidatingWebhookConfiguration gets the names mutating webhook configuration from kubernetes

func IsCSRApproved

func IsCSRApproved(csr *certsv1beta1.CertificateSigningRequest) bool

IsCSRApproved determines whether the CSR has been approved or not

func NewClientset

func NewClientset(inCluster bool, kubeconfig string) (*kubernetes.Clientset, error)

NewClientset creates a kubernetes clientset. Will load config from Pod environment if running in cluster.

func UpdateMutatingWebhookConfiguration

func UpdateMutatingWebhookConfiguration(client *kubernetes.Clientset, mwc *arv1beta1.MutatingWebhookConfiguration) (*arv1beta1.MutatingWebhookConfiguration, error)

UpdateMutatingWebhookConfiguration updates the mutating webhook configuration given

func UpdateValidatingWebhookConfiguration

func UpdateValidatingWebhookConfiguration(client *kubernetes.Clientset, mwc *arv1beta1.ValidatingWebhookConfiguration) (*arv1beta1.ValidatingWebhookConfiguration, error)

UpdateValidatingWebhookConfiguration updates the mutating webhook configuration given

Types

This section is empty.

Jump to

Keyboard shortcuts

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