Documentation
¶
Index ¶
- Constants
- func CopyServiceFields(desired *corev1.Service, target *corev1.Service) bool
- func CopyStatefulSetFields(desired *appsv1.StatefulSet, target *appsv1.StatefulSet) bool
- func DetectGraphCycle(startNode string, checkedNodes map[string]bool, edgeMap map[string]string) []string
- func NormalizePodConfigSpec(spec kubefloworgv1beta1.PodConfigSpec) error
- func RenderExtraEnvValueTemplate(rawValue string, httpPathPrefixFunc func(string) string) (string, error)
- func SetupManagerFieldIndexers(mgr ctrl.Manager) error
Constants ¶
const ( IndexEventInvolvedObjectUidField = ".involvedObject.uid" IndexWorkspaceOwnerField = ".metadata.controller" IndexWorkspaceKindField = ".spec.kind" )
Variables ¶
This section is empty.
Functions ¶
func CopyServiceFields ¶
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 ¶
SetupManagerFieldIndexers sets up field indexes on a controller-runtime manager
Types ¶
This section is empty.