utils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const LabelPodSpecable = "workload.oam.dev/podspecable"

LabelPodSpecable defines whether a workload has podSpec or not.

Variables

This section is empty.

Functions

func CheckDisabledCapabilities added in v0.2.0

func CheckDisabledCapabilities(disableCaps string) error

CheckDisabledCapabilities checks whether the disabled capability controllers are valid

func DiscoveryFromPodSpec

func DiscoveryFromPodSpec(w *unstructured.Unstructured, fieldPath string) ([]intstr.IntOrString, error)

DiscoveryFromPodSpec will discover pods from podSpec

func DiscoveryFromPodTemplate

func DiscoveryFromPodTemplate(w *unstructured.Unstructured, fields ...string) ([]intstr.IntOrString, map[string]string, error)

DiscoveryFromPodTemplate not only discovery port, will also use labels in podTemplate

func GetPodSpecPath

func GetPodSpecPath(workloadDef *v1alpha2.WorkloadDefinition) (string, bool)

GetPodSpecPath get podSpec field and label

func SelectOAMAppLabelsWithoutRevision

func SelectOAMAppLabelsWithoutRevision(labels map[string]string) map[string]string

SelectOAMAppLabelsWithoutRevision will filter and return OAM app labels only, if no labels, return the original one.

func StoreInSet added in v0.2.0

func StoreInSet(disableCaps string) mapset.Set

StoreInSet stores items in Set

Types

This section is empty.

Jump to

Keyboard shortcuts

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