k8sutil

package
v0.0.0-...-53eff13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateIngress

func CalculateIngress(n *jupyterv1.Notebook) *extensionsv1beta1.Ingress

CalculateIngress creates a new k8s ingress struct configured for the given notebook.

func CalculateSecret

func CalculateSecret(n *jupyterv1.Notebook, caCert *x509.Certificate, caKey *rsa.PrivateKey) *corev1.Secret

CalculateSecret creates a new k8s secret struct configured for the given notebook.

func CalculateService

func CalculateService(n *jupyterv1.Notebook) *corev1.Service

CalculateService creates a new k8s service struct configured for the given notebook.

func CalculateStatefulSet

func CalculateStatefulSet(n *jupyterv1.Notebook) *appsv1.StatefulSet

CalculateStatefulSet creates a new k8s StatefulSet struct configured for the given notebook.

func CreateOrUpdateIngress

CreateOrUpdateIngress will update the given ingress, if it already exists, or create it if it doesn't. This function will adopt matching resources that are managed by the operator.

func CreateOrUpdateSecret

func CreateOrUpdateSecret(c v1client.SecretInterface, l v1listers.SecretLister, caCert *x509.Certificate, logger logrus.StdLogger, secret *corev1.Secret) error

CreateOrUpdateSecret will update the given secret, if it already exists, or create it if it doesn't. This function will adopt matching resources that are managed by the operator.

func CreateOrUpdateService

func CreateOrUpdateService(c v1client.ServiceInterface, l v1listers.ServiceLister, svc *corev1.Service) error

CreateOrUpdateService will update the given service, if it already exists, or create it if it doesn't. This function will adopt matching resources that are managed by the operator.

func CreateOrUpdateStatefulSet

func CreateOrUpdateStatefulSet(c v1client.StatefulSetInterface, l v1listers.StatefulSetLister, logger logrus.StdLogger, sts *appsv1.StatefulSet) error

CreateOrUpdateStatefulSet will update the given StatefulSet, if it already exists, or create it if it doesn't. This function will adopt matching resources that are managed by the operator.

func DeleteIngress

DeleteIngress will delete the ingress that corresponds to the given notebook.

func DeleteSecret

func DeleteSecret(c v1client.SecretInterface, n *jupyterv1.Notebook) error

DeleteSecret will delete the secret that corresponds to the given notebook.

func DeleteService

func DeleteService(c v1client.ServiceInterface, n *jupyterv1.Notebook) error

DeleteService will delete the service that corresponds to the given notebook.

func DeleteStatefulSet

func DeleteStatefulSet(c v1client.StatefulSetInterface, n *jupyterv1.Notebook) error

DeleteStatefulSet will delete the StatefulSet that corresponds to the given notebook.

func ShouldHaveCerts

func ShouldHaveCerts(n *jupyterv1.Notebook) bool

ShouldHaveCerts determines whether a notebook secret should contain certificates.

func WaitForIngressTLSSecret

func WaitForIngressTLSSecret(l v1listers.SecretLister, logger logrus.StdLogger, n *jupyterv1.Notebook) error

WaitForIngressTLSSecret will wait for the given notebook's TLS secret to be ready and return an error if it is not ready before the timeout.

func WaitForStatefulSet

func WaitForStatefulSet(l v1listers.StatefulSetLister, logger logrus.StdLogger, sts *appsv1.StatefulSet) error

WaitForStatefulSet will wait for the given StatefulSet to be ready and return an error if it is not ready before the timeout.

func WaitForStatefulSetDeleted

func WaitForStatefulSetDeleted(l v1listers.StatefulSetLister, logger logrus.StdLogger, sts *appsv1.StatefulSet) error

WaitForStatefulSetDeleted will wait for the given StatefulSet to be deleted return an error if it is not deleted before the timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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