controller

package
v0.0.0-...-7a1d551 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Overview

Package controller implements the controller for submarine applications

Index

Constants

View Source
const (
	// SuccessSynced is used as part of the Event 'reason' when a Submarine is synced
	SuccessSynced = "Synced"
	// ErrResourceExists is used as part of the Event 'reason' when a Submarine fails
	// to sync due to a Deployment of the same name already existing.
	ErrResourceExists = "ErrResourceExists"

	// MessageResourceExists is the message used for Events when a resource
	// fails to sync due to a Deployment already existing
	MessageResourceExists = "Resource %q already exists and is not managed by Submarine"
	// MessageResourceSynced is the message used for an Event fired when a
	// Submarine is synced successfully
	MessageResourceSynced = "Submarine synced successfully"
)

Variables

This section is empty.

Functions

func ParseConfigMapYaml

func ParseConfigMapYaml(relativePath string) (*v1.ConfigMap, error)

ParseConfigMap parse ConfigMap from yaml file.

func ParseDeploymentYaml

func ParseDeploymentYaml(relativePath string) (*appsv1.Deployment, error)

ParseDeploymentYaml parse Deployment from yaml file.

func ParseIngressRouteYaml

func ParseIngressRouteYaml(relativePath string) (*traefikv1alpha1.IngressRoute, error)

ParseIngressRouteYaml parse IngressRoute from yaml file.

func ParseIngressYaml

func ParseIngressYaml(relativePath string) (*extensionsv1beta1.Ingress, error)

ParseIngressYaml parse Ingress from yaml file.

func ParsePersistentVolumeClaimYaml

func ParsePersistentVolumeClaimYaml(relativePath string) (*v1.PersistentVolumeClaim, error)

ParseIngressYaml parse Ingress from yaml file.

func ParseRoleBindingYaml

func ParseRoleBindingYaml(relativePath string) (*rbacv1.RoleBinding, error)

ParseRoleBindingYaml parse RoleBinding from yaml file.

func ParseRoleYaml

func ParseRoleYaml(relativePath string) (*rbacv1.Role, error)

ParseRoleYaml parse Role from yaml file.

func ParseServiceAccountYaml

func ParseServiceAccountYaml(relativePath string) (*v1.ServiceAccount, error)

ParseServiceAccount parse ServiceAccount from yaml file.

func ParseServiceYaml

func ParseServiceYaml(relativePath string) (*v1.Service, error)

ParseServiceYaml parse Service from yaml file.

func ParseStatefulSetYaml

func ParseStatefulSetYaml(relativePath string) (*appsv1.StatefulSet, error)

ParseStatefulSetYaml parse StatefulSets from yaml file.

func ParseVirtualService

func ParseVirtualService(relativePath string) (*istiov1alpha3.VirtualService, error)

ParseVirtualService parse VirtualService from yaml file.

Types

type BuilderConfig

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

func NewControllerBuilderConfig

func NewControllerBuilderConfig() *BuilderConfig

func (*BuilderConfig) InCluster

func (bc *BuilderConfig) InCluster(
	incluster bool,
) *BuilderConfig

func (*BuilderConfig) WithClusterType

func (bc *BuilderConfig) WithClusterType(
	clusterType string,
) *BuilderConfig

func (*BuilderConfig) WithConfigMapClaimInformer

func (bc *BuilderConfig) WithConfigMapClaimInformer(
	configMapInformer coreinformers.ConfigMapInformer,
) *BuilderConfig

func (*BuilderConfig) WithCreatePodSecurityPolicy

func (bc *BuilderConfig) WithCreatePodSecurityPolicy(
	createPodSecurityPolicy bool,
) *BuilderConfig

func (*BuilderConfig) WithDeploymentInformer

func (bc *BuilderConfig) WithDeploymentInformer(
	deploymentInformer appsinformers.DeploymentInformer,
) *BuilderConfig

func (*BuilderConfig) WithIngressInformer

func (bc *BuilderConfig) WithIngressInformer(
	ingressInformer extinformers.IngressInformer,
) *BuilderConfig

func (*BuilderConfig) WithKubeClientset

func (bc *BuilderConfig) WithKubeClientset(
	kubeclientset kubernetes.Interface,
) *BuilderConfig

func (*BuilderConfig) WithNamespaceInformer

func (bc *BuilderConfig) WithNamespaceInformer(
	namespaceInformer coreinformers.NamespaceInformer,
) *BuilderConfig

func (*BuilderConfig) WithPersistentVolumeClaimInformer

func (bc *BuilderConfig) WithPersistentVolumeClaimInformer(
	persistentvolumeclaimInformer coreinformers.PersistentVolumeClaimInformer,
) *BuilderConfig

func (*BuilderConfig) WithRoleBindingInformer

func (bc *BuilderConfig) WithRoleBindingInformer(
	rolebindingInformer rbacinformers.RoleBindingInformer,
) *BuilderConfig

func (*BuilderConfig) WithRoleInformer

func (bc *BuilderConfig) WithRoleInformer(
	roleInformer rbacinformers.RoleInformer,
) *BuilderConfig

func (*BuilderConfig) WithServiceAccountInformer

func (bc *BuilderConfig) WithServiceAccountInformer(
	serviceaccountInformer coreinformers.ServiceAccountInformer,
) *BuilderConfig

func (*BuilderConfig) WithServiceInformer

func (bc *BuilderConfig) WithServiceInformer(
	serviceInformer coreinformers.ServiceInformer,
) *BuilderConfig

func (*BuilderConfig) WithStatefulSetInformer

func (bc *BuilderConfig) WithStatefulSetInformer(
	statefulsetInformer appsinformers.StatefulSetInformer,
) *BuilderConfig

func (*BuilderConfig) WithSubmarineClientset

func (bc *BuilderConfig) WithSubmarineClientset(
	submarineclientset clientset.Interface,
) *BuilderConfig

func (*BuilderConfig) WithSubmarineInformer

func (bc *BuilderConfig) WithSubmarineInformer(
	submarineInformer informers.SubmarineInformer,
) *BuilderConfig

func (*BuilderConfig) WithVirtualServiceClientset

func (bc *BuilderConfig) WithVirtualServiceClientset(
	istioClientset istio.Interface,
) *BuilderConfig

func (*BuilderConfig) WithVirtualServiceInformer

func (bc *BuilderConfig) WithVirtualServiceInformer(
	virtualServiceInformer istioInformers.VirtualServiceInformer,
) *BuilderConfig

type Controller

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

Controller is the controller implementation for Submarine resources

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

type ControllerBuilder

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

func NewControllerBuilder

func NewControllerBuilder(config *BuilderConfig) *ControllerBuilder

func (*ControllerBuilder) Build

func (cb *ControllerBuilder) Build() *Controller

Jump to

Keyboard shortcuts

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