labels

package
v0.0.0-...-ce68545 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package labels provides utility methods for retrieving Istio-specific labels from Kubernetes resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalService

func CanonicalService(labels map[string]string, workloadName string) (string, string)

CanonicalService returns the values of the following labels from the supplied map: - service.istio.io/canonical-name - service.istio.io/canonical-revision

If the labels are not in the map, a set of fallbacks are checked. For canonical name, `app.kubernetes.io/name` is checked, then `app`, evenutually falling back to the supplied `workloadName`. For canonical revision, `app.kubernetes.io/version` is checked, followed by `version` and finally defaulting to the literal value of `"latest"`.

func HasCanonicalServiceName

func HasCanonicalServiceName(labels map[string]string) bool

func HasCanonicalServiceRevision

func HasCanonicalServiceRevision(labels map[string]string) bool

func WorkloadNameFromWorkloadEntry

func WorkloadNameFromWorkloadEntry(name string, annos map[string]string, labels map[string]string) string

WorkloadNameFromWorkloadEntry derives the workload name from a WorkloadEntry

Types

This section is empty.

Jump to

Keyboard shortcuts

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