package labels

import "github.com/docker/compose-on-kubernetes/api/labels"

Index

Constants

const (
	// ForServiceName is the label for the service name.
	ForServiceName = "com.docker.service.name"
	// ForStackName is the label for the stack name.
	ForStackName = "com.docker.stack.namespace"
	// ForServiceID is the label for the service id.
	ForServiceID = "com.docker.service.id"
)

Functions

func ForService

func ForService(stackName, serviceName string) map[string]string

ForService gives the labels to select a given service in a stack.

func SelectorForStack

func SelectorForStack(stackName string, serviceNames ...string) string

SelectorForStack gives the labelSelector to use for a given stack. Specific service names can be passed to narrow down the selection.

Source Files

labels.go

Version
v0.5.0 (latest)
Published
Jan 28, 2022
Platform
linux/amd64
Imports
2 packages
Last checked
2 months ago

Tools for package owners.