controllers

package
v0.0.0-...-0c70d8f Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronJobController

type CronJobController struct {
	GenericController
	K8SResource kubeAPIBatchV1beta1.CronJob
}

CronJobController is an implementation of controller for deployments

func (CronJobController) GetKind

GetKind returns the supportedcontroller enum type

func (CronJobController) GetObjectMeta

func (c CronJobController) GetObjectMeta() kubeAPIMetaV1.ObjectMeta

GetObjectMeta returns the metadata

func (CronJobController) GetPodSpec

func (c CronJobController) GetPodSpec() *kubeAPICoreV1.PodSpec

GetPodSpec returns the original kubernetes template pod spec

func (CronJobController) GetPodTemplate

func (c CronJobController) GetPodTemplate() *kubeAPICoreV1.PodTemplateSpec

GetPodTemplate returns the original template spec

type DaemonSetController

type DaemonSetController struct {
	GenericController
	K8SResource kubeAPIAppsV1.DaemonSet
}

DaemonSetController is an implementation of controller for deployments

func (DaemonSetController) GetKind

GetKind returns the supportedcontroller enum type

func (DaemonSetController) GetObjectMeta

func (d DaemonSetController) GetObjectMeta() kubeAPIMetaV1.ObjectMeta

GetObjectMeta returns the metadata

func (DaemonSetController) GetPodSpec

func (d DaemonSetController) GetPodSpec() *kubeAPICoreV1.PodSpec

GetPodSpec returns the original kubernetes template pod spec

func (DaemonSetController) GetPodTemplate

GetPodTemplate returns the original template spec

type DeploymentController

type DeploymentController struct {
	GenericController
	K8SResource kubeAPIAppsV1.Deployment
}

DeploymentController is an implementation of controller for deployments

func (DeploymentController) GetKind

GetKind returns the supportedcontroller enum type

func (DeploymentController) GetObjectMeta

func (d DeploymentController) GetObjectMeta() kubeAPIMetaV1.ObjectMeta

GetObjectMeta returns the metadata

func (DeploymentController) GetPodSpec

func (d DeploymentController) GetPodSpec() *kubeAPICoreV1.PodSpec

GetPodSpec returns the original kubernetes template pod spec

func (DeploymentController) GetPodTemplate

GetPodTemplate returns the original template spec

type GenericController

type GenericController struct {
	Name      string
	Namespace string
}

GenericController is a base implementation with some free methods for inherited structs

func (GenericController) GetName

func (g GenericController) GetName() string

GetName is inherited by all controllers using generic controller to get the name of the controller

func (GenericController) GetNamespace

func (g GenericController) GetNamespace() string

GetNamespace is inherited by all controllers using generic controller to get the namespace of the controller

type Interface

type Interface interface {
	GetName() string
	GetNamespace() string
	GetPodTemplate() *kubeAPICoreV1.PodTemplateSpec
	GetPodSpec() *kubeAPICoreV1.PodSpec
	GetKind() config.SupportedController
	GetObjectMeta() kubeAPIMetaV1.ObjectMeta
}

Interface is an interface for k8s controllers (e.g. Deployments and StatefulSets)

func LoadControllersByKind

func LoadControllersByKind(controllerKind config.SupportedController, kubeResources *kube.ResourceProvider) ([]Interface, error)

LoadControllersByKind loads a list of controllers from the kubeResources by detecting their type

func NewCronJobController

func NewCronJobController(originalDeploymentResource kubeAPIBatchV1beta1.CronJob) Interface

NewCronJobController builds a new controller interface for Deployments

func NewDaemonSetController

func NewDaemonSetController(originalResource kubeAPIAppsV1.DaemonSet) Interface

NewDaemonSetController builds a new controller interface for Deployments

func NewDeploymentController

func NewDeploymentController(originalDeploymentResource kubeAPIAppsV1.Deployment) Interface

NewDeploymentController builds a new controller interface for Deployments

func NewJobController

func NewJobController(originalResource kubeAPIBatchV1.Job) Interface

NewJobController builds a new controller interface for Deployments

func NewNakedPodController

func NewNakedPodController(originalNakedPodResource kubeAPICoreV1.Pod) Interface

NewNakedPodController builds a new controller interface for NakedPods

func NewReplicationControllerController

func NewReplicationControllerController(originalResource kubeAPICoreV1.ReplicationController) Interface

NewReplicationControllerController builds a new controller interface for Deployments

func NewStatefulSetController

func NewStatefulSetController(originalResource kubeAPIAppsV1.StatefulSet) Interface

NewStatefulSetController builds a statefulset controller

type JobController

type JobController struct {
	GenericController
	K8SResource kubeAPIBatchV1.Job
}

JobController is an implementation of controller for deployments

func (JobController) GetKind

GetKind returns the supportedcontroller enum type

func (JobController) GetObjectMeta

func (j JobController) GetObjectMeta() kubeAPIMetaV1.ObjectMeta

GetObjectMeta returns the metadata

func (JobController) GetPodSpec

func (j JobController) GetPodSpec() *kubeAPICoreV1.PodSpec

GetPodSpec returns the original kubernetes template pod spec

func (JobController) GetPodTemplate

func (j JobController) GetPodTemplate() *kubeAPICoreV1.PodTemplateSpec

GetPodTemplate returns the original template spec

type NakedPodController

type NakedPodController struct {
	GenericController
	K8SResource kubeAPICoreV1.Pod
}

NakedPodController is an implementation of controller for deployments

func (NakedPodController) GetKind

GetKind returns the supportedcontroller enum type

func (NakedPodController) GetObjectMeta

func (n NakedPodController) GetObjectMeta() kubeAPIMetaV1.ObjectMeta

GetObjectMeta returns the metadata

func (NakedPodController) GetPodSpec

func (n NakedPodController) GetPodSpec() *kubeAPICoreV1.PodSpec

GetPodSpec returns the original kubernetes template pod spec

func (NakedPodController) GetPodTemplate

func (n NakedPodController) GetPodTemplate() *kubeAPICoreV1.PodTemplateSpec

GetPodTemplate returns the original template spec

type ReplicationControllerController

type ReplicationControllerController struct {
	GenericController
	K8SResource kubeAPICoreV1.ReplicationController
}

ReplicationControllerController is an implementation of controller for deployments

func (ReplicationControllerController) GetKind

GetKind returns the supportedcontroller enum type

func (ReplicationControllerController) GetObjectMeta

GetObjectMeta returns the metadata

func (ReplicationControllerController) GetPodSpec

GetPodSpec returns the original kubernetes template pod spec

func (ReplicationControllerController) GetPodTemplate

GetPodTemplate returns the original template spec

type StatefulSetController

type StatefulSetController struct {
	GenericController
	K8SResource kubeAPIAppsV1.StatefulSet
}

StatefulSetController is an implementation of controller for deployments

func (StatefulSetController) GetKind

GetKind returns the supportedcontroller enum type

func (StatefulSetController) GetObjectMeta

GetObjectMeta returns the metadata

func (StatefulSetController) GetPodSpec

GetPodSpec returns the podspec from the original kubernetes resource

func (StatefulSetController) GetPodTemplate

GetPodTemplate returns the kubernetes template spec

Jump to

Keyboard shortcuts

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