mapper

package
v0.15.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpdatedViaDynakubeAnnotation = "dynatrace.com/updated-via-operator"
	ErrorConflictingNamespace    = "namespace matches two or more DynaKubes which is unsupported. " +
		"refine the labels on your namespace metadata or DynaKube/CodeModules specification"
)

Variables

This section is empty.

Functions

func GetNamespacesForDynakube

func GetNamespacesForDynakube(ctx context.Context, clt client.Reader, dkName string) ([]corev1.Namespace, error)

Types

type ConflictChecker

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

type DynakubeMapper

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

DynakubeMapper manages the mapping creation from the dynakube's side

func NewDynakubeMapper

func NewDynakubeMapper(ctx context.Context, clt client.Client, apiReader client.Reader, operatorNs string, dk *dynatracev1beta1.DynaKube) DynakubeMapper

func (DynakubeMapper) MapFromDynakube

func (dm DynakubeMapper) MapFromDynakube() error

MapFromDynakube checks all the namespaces to all the dynakubes updates the labels on the namespaces if necessary, finds conflicting dynakubes (2 dynakube with codeModules on the same namespace)

func (DynakubeMapper) MatchingNamespaces

func (dm DynakubeMapper) MatchingNamespaces() ([]*corev1.Namespace, error)

func (DynakubeMapper) UnmapFromDynaKube

func (dm DynakubeMapper) UnmapFromDynaKube() error

type NamespaceMapper

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

NamespaceMapper manages the mapping creation from the namespace's side

func NewNamespaceMapper

func NewNamespaceMapper(ctx context.Context, clt client.Client, apiReader client.Reader, operatorNs string, targetNs *corev1.Namespace) NamespaceMapper

func (NamespaceMapper) MapFromNamespace

func (nm NamespaceMapper) MapFromNamespace() (bool, error)

MapFromNamespace adds the labels to the targetNs if there is a matching Dynakube

Jump to

Keyboard shortcuts

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