labels

package
v0.0.0-...-edf464d Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 1 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

Types

This section is empty.

Jump to

Keyboard shortcuts

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