kube

package
v0.2.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package kube implements important interfaces like the Kube.

Index

Constants

View Source
const (
	// DeploymentKind is the Deployment object.
	DeploymentKind = "Deployment"

	// ReplicaSetKind is the ReplicaSet object.
	ReplicaSetKind = "ReplicaSet"

	// StatefulSetKind is the StatefulSet object.
	StatefulSetKind = "StatefulSet"

	// DaemonSetKind is the DaemonSet object.
	DaemonSetKind = "DaemonSet"

	// IngressKind is the Ingress object.
	IngressKind = "Ingress"

	// JobKind is the Job object.
	JobKind = "Job"

	// PodKind is the Pod object.
	PodKind = "Pod"

	// ObjectLabelKeyOwned is the label for objects.
	ObjectLabelKeyOwned = "clusterstack.x-k8s.io/instance"

	// ObjectLabelValueOwned is the object owned.
	ObjectLabelValueOwned = "owned"
)

Variables

This section is empty.

Functions

func GetDynamicResourceInterface

func GetDynamicResourceInterface(namespace string, restConfig *rest.Config, group schema.GroupVersionKind) (dynamic.ResourceInterface, error)

GetDynamicResourceInterface returns a dynamic.ResourceInterface based on the groupVersionKind and namespace.

func GetResourcesFromHelmTemplate

func GetResourcesFromHelmTemplate(template []byte) ([]*csov1alpha1.Resource, error)

GetResourcesFromHelmTemplate returns a slice of resources based on the outcome of a slice of bytes from helm template.

Types

type Client

type Client interface {
	Apply(ctx context.Context, template []byte, oldResources []*csov1alpha1.Resource) (newResources []*csov1alpha1.Resource, shouldRequeue bool, err error)
	Delete(ctx context.Context, template []byte, oldResources []*csov1alpha1.Resource) (newResources []*csov1alpha1.Resource, shouldRequeue bool, err error)

	ApplyNewClusterStack(ctx context.Context, oldTemplate, newTemplate []byte) (newResources []*csov1alpha1.Resource, shouldRequeue bool, err error)
	DeleteNewClusterStack(ctx context.Context, template []byte) (newResources []*csov1alpha1.Resource, shouldRequeue bool, err error)
}

Client has all the meathod for helm chart kube operation.

type Factory

type Factory interface {
	NewClient(namespace string, resCfg *rest.Config) Client
}

Factory creates new fake kube client factories.

func NewFactory

func NewFactory() Factory

NewFactory has method to create a new factory for kube clients.

Directories

Path Synopsis
Package fake implements important interface like kube client.
Package fake implements important interface like kube client.
Package mocks implement important mocking interface of kube.
Package mocks implement important mocking interface of kube.

Jump to

Keyboard shortcuts

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