k8s

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ManagedByLabelKey is Kubernetes recommended label key, it represents the tool being used to manage the operation of an application
	// For resources managed by SeaweedFS Operator, its value is always seaweedfs-operator
	ManagedByLabelKey string = "app.kubernetes.io/managed-by"
	// ComponentLabelKey is Kubernetes recommended label key, it represents the component within the architecture
	ComponentLabelKey string = "app.kubernetes.io/component"
	// NameLabelKey is Kubernetes recommended label key, it represents the name of the application
	NameLabelKey string = "app.kubernetes.io/name"
	// InstanceLabelKey is Kubernetes recommended label key, it represents a unique name identifying the instance of an application
	// It's set by helm when installing a release
	InstanceLabelKey string = "app.kubernetes.io/instance"
	// VersionLabelKey is Kubernetes recommended label key, it represents the version of the app
	VersionLabelKey    string = "app.kubernetes.io/version"
	VectorExcludeLabel string = "vector.dev/exclude"

	// PodName is to select pod by name
	// https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-selector
	PodName string = "statefulset.kubernetes.io/pod-name"
)

Variables

This section is empty.

Functions

func CreateOrUpdateClusterRole

func CreateOrUpdateClusterRole(secret *rbacv1.ClusterRole, c client.Client) error

func CreateOrUpdateClusterRoleBinding

func CreateOrUpdateClusterRoleBinding(secret *rbacv1.ClusterRoleBinding, c client.Client) error

func CreateOrUpdateDaemonSet

func CreateOrUpdateDaemonSet(daemonSet *appsv1.DaemonSet, c client.Client) error

func CreateOrUpdateSecret

func CreateOrUpdateSecret(secret *corev1.Secret, c client.Client) error

func CreateOrUpdateService

func CreateOrUpdateService(svc *corev1.Service, c client.Client) error

func CreateOrUpdateServiceAccount

func CreateOrUpdateServiceAccount(secret *corev1.ServiceAccount, c client.Client) error

func CreateOrUpdateStatefulSet

func CreateOrUpdateStatefulSet(statefulSet *appsv1.StatefulSet, c client.Client) error

func CreatePod

func CreatePod(pod *corev1.Pod, c client.Client) error

func DeletePod

func DeletePod(pod *corev1.Pod, c client.Client) error

func DeleteSecret

func DeleteSecret(secret *corev1.Secret, c client.Client) error

func GetPod

func GetPod(pod *corev1.Pod, c client.Client) (*corev1.Pod, error)

func GetPodLogs

func GetPodLogs(pod *corev1.Pod, cs *kubernetes.Clientset) (string, error)

func GetSecret

func GetSecret(namespacedName types.NamespacedName, c client.Client) (*corev1.Secret, error)

func NamespaceNameToLabel

func NamespaceNameToLabel(namespace string) string

func UpdateStatus

func UpdateStatus(ctx context.Context, obj client.Object, c client.Client) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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