configmap

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigMapMatcher

func DefaultConfigMapMatcher(namespaces []string, requirePolicyLabel, enablePolicies, enableData bool) func(*v1.ConfigMap) (bool, bool)

DefaultConfigMapMatcher returns a function that will match configmaps in specified namespaces and/or with a policy or data label. The first bool return value specifies a policy/data match and the second bool indicates if the configmap contains a policy.

Types

type Sync

type Sync struct {
	// contains filtered or unexported fields
}

Sync replicates policies or data stored in the API server as ConfigMaps into OPA.

func New

func New(kubeconfig *rest.Config, opa opa.Client, matcher func(*v1.ConfigMap) (bool, bool)) *Sync

New returns a new Sync that can be started.

func (*Sync) Run

func (s *Sync) Run(namespaces []string) (chan struct{}, error)

Run starts the synchronizer. To stop the synchronizer send a message to the channel.

Jump to

Keyboard shortcuts

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