Documentation ¶
Overview ¶
Package namespaces handles interaction with Consul namespaces needed across commands.
Index ¶
- Constants
- func ConsulNamespace(kubeNS string, enableConsulNamespaces bool, consulDestNS string, ...) string
- func EnsureDeleted(client *capi.Client, ns string) error
- func EnsureExists(client *capi.Client, ns string, crossNSAClPolicy string) (bool, error)
- func NonDefaultConsulNamespace(consulNS string) string
Constants ¶
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 EnsureDeleted ¶
EnsureDeleted ensures a Consul namespace with name ns is deleted. If it is already not found the call to delete will be skipped.
func EnsureExists ¶
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.
func NonDefaultConsulNamespace ¶
NonDefaultConsulNamespace returns the given Consul namespace if it is not default or empty. Otherwise, it returns the empty string.
Types ¶
This section is empty.