kube

package
v0.0.0-...-60f4931 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerNameCopyVCP                   = "copy-vcp"
	ContainerNameInitializeVolumeFromImage = "vcp"
	ContainerNameWaitDependsOn             = "wait-depends-on"
	ContainerNameWaitInitialSync           = "wait-sync"
	ContainerNameWaitInitializedVolumes    = "wait-initialized-volumes"

	BlimpNamespace      = "blimp-system"
	PreviewCLINamespace = "blimp-cli"

	ExposeAnnotation            = "blimp.exposed"
	NodePublicAddressAnnotation = "blimp.public-address"

	PodNameSyncthing = "syncthing"
	PodNameBuildkitd = "buildkitd"
)

Variables

This section is empty.

Functions

func DeletePod

func DeletePod(kubeClient kubernetes.Interface, namespace, name string) error

func DeployClusterRole

func DeployClusterRole(kubeClient kubernetes.Interface, role rbacv1.ClusterRole) error

func DeployClusterRoleBinding

func DeployClusterRoleBinding(kubeClient kubernetes.Interface, binding rbacv1.ClusterRoleBinding) error

func DeployClusterServiceAccount

func DeployClusterServiceAccount(kubeClient kubernetes.Interface, sa corev1.ServiceAccount,
	roles ...rbacv1.ClusterRole) error

func DeployConfigMap

func DeployConfigMap(kubeClient kubernetes.Interface, configMap corev1.ConfigMap) error

func DeployPod

func DeployPod(kubeClient kubernetes.Interface, pod corev1.Pod, opts DeployPodOptions) error

func DeployRole

func DeployRole(kubeClient kubernetes.Interface, role rbacv1.Role) error

func DeployRoleBinding

func DeployRoleBinding(kubeClient kubernetes.Interface, binding rbacv1.RoleBinding) error

func DeployServiceAccount

func DeployServiceAccount(kubeClient kubernetes.Interface, sa corev1.ServiceAccount, roles ...rbacv1.Role) error

func GetClient

func GetClient() (kubernetes.Interface, *rest.Config, error)

GetClient gets a Kubernetes client connected to the cluster defined in the local kubeconfig.

func SanitizeIgnoreInitContainerImages

func SanitizeIgnoreInitContainerImages(desired, curr *corev1.Pod) *corev1.Pod

func SanitizeIgnoreNodeAffinity

func SanitizeIgnoreNodeAffinity(desired, curr *corev1.Pod) *corev1.Pod

Types

type DeployPodOptions

type DeployPodOptions struct {
	ForceRestart bool
	Sanitizers   []Sanitizer
}

type Key

type Key struct {
	Namespace, Name string
}

Key is used to filter what changes the subscriber is interested in.

func (Key) ShouldNotify

func (key Key) ShouldNotify(namespace, name string) bool

ShouldNotify returns whether the given object is relevant to the given key. If a value isn't set in the key, then the field is ignored during the comparison. This is useful for watching multiple objects at once. For example, to watch for changes to all pods in a namespace, you can just leave the `Name` field empty.

type Sanitizer

type Sanitizer func(desired, curr *corev1.Pod) *corev1.Pod

type Watcher

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

Watcher wraps an informer so that clients can easily subscribe to changes in the informer.

func NewWatcher

func NewWatcher(informer cache.SharedIndexInformer) *Watcher

func (*Watcher) Watch

func (w *Watcher) Watch(ctx context.Context, notifyFor Key) chan struct{}

Jump to

Keyboard shortcuts

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