controllers

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: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// 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"
)

Variables

This section is empty.

Functions

func CompareVirtualService

func CompareVirtualService(oldVirtualService, newVirtualService *istiov1alpha3.VirtualService) bool

CompareVirtualService will determine if two VirtualServices are equal

Types

type SubmarineReconciler

type SubmarineReconciler struct {
	// Fields required by the operator
	client.Client
	Scheme   *runtime.Scheme
	Log      logr.Logger
	Recorder record.EventRecorder
	// Fields required by submarine
	IstioEnable             bool
	SubmarineGateway        string
	SeldonIstioEnable       bool
	SeldonGateway           string
	Namespace               string
	ClusterType             string
	CreatePodSecurityPolicy bool
}

SubmarineReconciler reconciles a Submarine object

func (*SubmarineReconciler) CompareAgentDeployment

func (r *SubmarineReconciler) CompareAgentDeployment(oldDeployment, newDeployment *appsv1.Deployment) bool

CompareAgentDeployment will determine if two Deployments are equal

func (*SubmarineReconciler) CreatePullSecrets

func (r *SubmarineReconciler) CreatePullSecrets(pullSecrets *[]string) []corev1.LocalObjectReference

CreatePullSecrets will convert `submarine.spec.common.image.pullSecrets` to []`corev1.LocalObjectReference`

func (*SubmarineReconciler) Reconcile

func (r *SubmarineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile

func (*SubmarineReconciler) SetupWithManager

func (r *SubmarineReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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