helper

package
v0.0.0-...-bc4e445 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexEventInvolvedObjectUidField = ".involvedObject.uid"
	IndexWorkspaceOwnerField         = ".metadata.controller"
	IndexWorkspaceKindField          = ".spec.kind"
)

Variables

This section is empty.

Functions

func CopyServiceFields

func CopyServiceFields(desired *corev1.Service, target *corev1.Service) bool

CopyServiceFields updates a target Service with the fields from a desired Service, returning true if an update is required.

func CopyStatefulSetFields

func CopyStatefulSetFields(desired *appsv1.StatefulSet, target *appsv1.StatefulSet) bool

CopyStatefulSetFields updates a target StatefulSet with the fields from a desired StatefulSet, returning true if an update is required.

func DetectGraphCycle

func DetectGraphCycle(startNode string, checkedNodes map[string]bool, edgeMap map[string]string) []string

DetectGraphCycle checks if there is a cycle involving a given node in directed graph

Assumptions:

  • all nodes have AT MOST one OUTGOING edge

Parameters:

  • startNode: the node to start the cycle detection from
  • checkedNodes: a map of nodes which have already been checked for cycles (updated in-place if no cycle is detected)
  • edgeMap: a map representing the edges in the graph

Returns:

  • returns nil, if no cycle is detected
  • returns a slice of nodes representing the cycle, if a cycle is detected

func NormalizePodConfigSpec

func NormalizePodConfigSpec(spec kubefloworgv1beta1.PodConfigSpec) error

NormalizePodConfigSpec normalizes a PodConfigSpec so that it can be compared with reflect.DeepEqual

func RenderExtraEnvValueTemplate

func RenderExtraEnvValueTemplate(rawValue string, httpPathPrefixFunc func(string) string) (string, error)

RenderExtraEnvValueTemplate renders a single WorkspaceKind `spec.podTemplate.extraEnv[].value` string template

func SetupManagerFieldIndexers

func SetupManagerFieldIndexers(mgr ctrl.Manager) error

SetupManagerFieldIndexers sets up field indexes on a controller-runtime manager

Types

This section is empty.

Jump to

Keyboard shortcuts

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