namespaces

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package namespaces handles interaction with Consul namespaces needed across commands.

Index

Constants

View Source
const (
	WildcardNamespace = "*"
	DefaultNamespace  = "default"
)

Variables

This section is empty.

Functions

func ConsulNamespace

func ConsulNamespace(kubeNS string, enableConsulNamespaces bool, consulDestNS string, enableMirroring bool, mirroringPrefix string) string

ConsulNamespace returns the consul namespace that a service should be registered in based on the namespace options. It returns an empty string if namespaces aren't enabled.

func EnsureExists

func EnsureExists(client *capi.Client, ns string, crossNSAClPolicy string) (bool, error)

EnsureExists ensures a Consul namespace with name ns exists. If it doesn't, it will create it and set crossNSACLPolicy as a policy default. Boolean return value indicates if the namespace was created by this call.

Types

This section is empty.

Jump to

Keyboard shortcuts

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