k8s

package
v0.0.0-...-81a8576 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationIDLabel    = "conure.io/application-id"
	ApplicationNameLabel  = "conure.io/application-name"
	OrganizationIDLabel   = "conure.io/organization-id"
	OrganizationNameLabel = "conure.io/organization-name"
	EnvironmentLabel      = "conure.io/environment"
	CreatedByLabel        = "conure.io/created-by"
	NamespaceLabel        = "conure.io/namespace"
	ComponentIDLabel      = "conure.io/component-id"
	ComponentNameLabel    = "conure.io/component-name"
)

Variables

View Source
var (
	ErrApplicationNotFound = errors.New("application not found")
	ErrServiceNotFound     = errors.New("service not found")
)

Functions

func CreateSecret

func CreateSecret(clientset *GenericClientset, namespace string, secret *corev1.Secret) error

func ExtractMapFromRawExtension

func ExtractMapFromRawExtension(data *runtime.RawExtension) (map[string]interface{}, error)

ExtractMapFromRawExtension extracts a map from a k8s RawExtension

func Generate8DigitHash

func Generate8DigitHash() string

func GetApplicationByLabels

func GetApplicationByLabels(clientset *GenericClientset, namespace string, labels map[string]string) (*vela.Application, error)

func GetDeploymentsByLabels

func GetDeploymentsByLabels(clientset *kubernetes.Clientset, namespace string, labels map[string]string) ([]k8sV1.Deployment, error)

func GetSecret

func GetSecret(clientset *GenericClientset, namespace, name string) (*corev1.Secret, error)

func GetServicesByLabels

func GetServicesByLabels(clientset *GenericClientset, namespace string, labels map[string]string) ([]corev1.Service, error)

func GetStatefulSetByLabels

func GetStatefulSetByLabels(clientset *kubernetes.Clientset, namespace string, labels map[string]string) ([]k8sV1.StatefulSet, error)

Types

type GenericClientset

type GenericClientset struct {
	Conure  *core_conure.Clientset
	K8s     *kubernetes.Clientset
	Dynamic *dynamic.DynamicClient
	Config  *rest.Config
}

func GetClientset

func GetClientset() (*GenericClientset, error)

Jump to

Keyboard shortcuts

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