enrichment

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetadataTypes = struct {
	Annotation MetadataType
	Label      MetadataType
}{
	"ANNOTATION",
	"LABEL",
}
View Source
var TargetOptions = struct {
	DtCostCostcenter  TargetOption
	DtCostProduct     TargetOption
	DtSecurityContext TargetOption
}{
	"dt.cost.costcenter",
	"dt.cost.product",
	"dt.security_context",
}

Functions

This section is empty.

Types

type MetadataType

type MetadataType string

type Rule

type Rule struct {
	Enabled bool         `json:"enabled"` // This setting is enabled (`true`) or disabled (`false`)
	Source  string       `json:"source"`  // The source must follow the syntax of Kubernetes annotation/label keys as defined in the [Kubernetes documentation](https://dt-url.net/2c02sbn).\n\n`source := (prefix/)?name`\n\n`prefix := [a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*`\n\n`name := ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]`\n\nAdditionally, the name can have at most 63 characters, and the overall length of the source must not exceed 75 characters.
	Target  TargetOption `json:"target"`  // Possible Values: `Dt_cost_costcenter`, `Dt_cost_product`, `Dt_security_context`
	Type    MetadataType `json:"type"`    // Possible Values: `ANNOTATION`, `LABEL`
}

func (*Rule) MarshalHCL

func (me *Rule) MarshalHCL(properties hcl.Properties) error

func (*Rule) Schema

func (me *Rule) Schema() map[string]*schema.Schema

func (*Rule) UnmarshalHCL

func (me *Rule) UnmarshalHCL(decoder hcl.Decoder) error

type Rules

type Rules []*Rule

func (Rules) MarshalHCL

func (me Rules) MarshalHCL(properties hcl.Properties) error

func (*Rules) Schema

func (me *Rules) Schema() map[string]*schema.Schema

func (*Rules) UnmarshalHCL

func (me *Rules) UnmarshalHCL(decoder hcl.Decoder) error

type Settings

type Settings struct {
	Rules Rules   `json:"rules,omitempty"` // Dynatrace allows to use metadata defined on Kubernetes nodes, namespaces, and pods to set security and cost allocation attributes and dimensions for metrics, events, log, spans, and entities associated with the respective Kubernetes resource. \n\n The following annotation keys are considered: \n * `metadata.dynatrace.com/dt.security_context` \n * `metadata.dynatrace.com/dt.cost.product` \n * `metadata.dynatrace.com/dt.cost.costcenter` \n\n Pod annotations determine the attributes of data associated with the pod itself, and containers belonging to the pod. \n\nNamespace annotations determine the attributes of data associated with the namespace itself, workloads, services, and - if not overwritten on pod level - pods, and containers belonging to the namespace. \n\nNode annotations determine the attributes of data associated with only the node. \n\n Depending on your specific use case and environment, you have the following enrichment options: \n\n **Manual annotation:** \n\n Use the aforementioned annotation keys when annotating your namespaces and pods to enrich your Kubernetes data with security and cost allocation attributes.\n\nWith Dynatrace Operator version 1.3.0, the aforementioned namespace annotations are copied down to pods in the namespace, if they are not yet set on the respective pod. \n\n **Rule-based annotation:**\n\nIf you already have labels or annotations defined on your namespaces, and you want to reuse them for enrichment, you can do so with the help of rules definable here. \n\n**Example:**\n\n * Namespace label:\n   * `label/example: test-value`\n\n * Rule: \n   * `Label` \n `label/example --> dt.security_context`\n\n * Pod annotation: \n   * `metadata.dynatrace.com/dt.security_context: test-value`\n\nA maximum of 5 rules can be defined. The first applicable rule will be applied. Preexisting annotations will not be overwritten. For a detailed description of this feature, have a look at our [documentation](https://dt-url.net/pn22sye).
	Scope *string `json:"-" scope:"scope"` // The scope of this setting (KUBERNETES_CLUSTER). Omit this property if you want to cover the whole environment.
}

func (*Settings) MarshalHCL

func (me *Settings) MarshalHCL(properties hcl.Properties) error

func (*Settings) Name

func (me *Settings) Name() string

func (*Settings) Schema

func (me *Settings) Schema() map[string]*schema.Schema

func (*Settings) UnmarshalHCL

func (me *Settings) UnmarshalHCL(decoder hcl.Decoder) error

type TargetOption

type TargetOption string

Jump to

Keyboard shortcuts

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