sesame

package
v0.0.0-...-d7ad274 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentSesame

func CurrentSesame(ctx context.Context, cli client.Client, ns, name string) (*operatorv1alpha1.Sesame, error)

CurrentSesame returns the current Sesame for the provided ns/name.

func EnsureFinalizer

func EnsureFinalizer(ctx context.Context, cli client.Client, sesame *operatorv1alpha1.Sesame) error

EnsureFinalizer ensures the finalizer is added to Sesame.

func EnsureFinalizerRemoved

func EnsureFinalizerRemoved(ctx context.Context, cli client.Client, sesame *operatorv1alpha1.Sesame) error

EnsureFinalizerRemoved ensures the finalizer is removed from Sesame.

func MakeNodePorts

func MakeNodePorts(ports map[string]int) []operatorv1alpha1.NodePort

MakeNodePorts returns a nodeport slice using the ports key as the nodeport name and the ports value as the nodeport number.

func New

func New(cfg Config) *operatorv1alpha1.Sesame

New makes a Sesame object using the provided ns/name for the object's namespace/name, pubType for the network publishing type of Envoy, and Envoy container ports 8080/8443.

func OtherSesamesExist

func OtherSesamesExist(ctx context.Context, cli client.Client, Sesame *operatorv1alpha1.Sesame) (bool, *operatorv1alpha1.SesameList, error)

OtherSesamesExist lists Sesame objects in all namespaces, returning the list and true if any exist other than sesame.

func OtherSesamesExistInSpecNs

func OtherSesamesExistInSpecNs(ctx context.Context, cli client.Client, Sesame *operatorv1alpha1.Sesame) (bool, error)

OtherSesamesExistInSpecNs lists Sesame objects in the same spec.namespace.name as sesame, returning true if any exist.

func OwnerLabels

func OwnerLabels(Sesame *operatorv1alpha1.Sesame) map[string]string

OwnerLabels returns owner labels for the provided sesame.

func OwningSelector

func OwningSelector(Sesame *operatorv1alpha1.Sesame) *metav1.LabelSelector

OwningSelector returns a label selector using "sesame.operator.projectsesame.io/owning-sesame-name" and "sesame.operator.projectsesame.io/owning-sesame-namespace" labels.

Types

type Config

type Config struct {
	Name                      string
	Namespace                 string
	SpecNs                    string
	RemoveNs                  bool
	Replicas                  int32
	NetworkType               operatorv1alpha1.NetworkPublishingType
	NodePorts                 []operatorv1alpha1.NodePort
	GatewayControllerName     *string
	EnableExternalNameService *bool
}

Config is the configuration of a Sesame.

Jump to

Keyboard shortcuts

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