61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
# yamllint disable rule:document-start rule:line-length rule:trailing-spaces rule:empty-lines
|
|
suite: Test default values
|
|
templates:
|
|
- configmap.yaml
|
|
tests:
|
|
- it: should render the default configuration
|
|
set:
|
|
deployAsConfigMap: true
|
|
asserts:
|
|
- isKind:
|
|
of: ConfigMap
|
|
- matchSnapshot:
|
|
path: data["module.alloy"]
|
|
- it: should allow overriding the default labelsToKeep
|
|
set:
|
|
deployAsConfigMap: true
|
|
labelsToKeep:
|
|
- k8s_container_name
|
|
- k8s_namespace
|
|
- k8s_pod_name
|
|
- k8s_pod_label_app_kubernetes_io_name
|
|
asserts:
|
|
- isKind:
|
|
of: ConfigMap
|
|
- matchSnapshot:
|
|
path: data["module.alloy"]
|
|
- it: should allow setting structured metadata
|
|
set:
|
|
deployAsConfigMap: true
|
|
structuredMetadata:
|
|
caller: caller
|
|
component: component
|
|
asserts:
|
|
- isKind:
|
|
of: ConfigMap
|
|
- matchSnapshot:
|
|
path: data["module.alloy"]
|
|
- it: should allow setting static labels
|
|
set:
|
|
deployAsConfigMap: true
|
|
staticLabels:
|
|
region: central
|
|
staticLabelsFrom:
|
|
color: sys.env("COLOR")
|
|
asserts:
|
|
- isKind:
|
|
of: ConfigMap
|
|
- matchSnapshot:
|
|
path: data["module.alloy"]
|
|
- it: should allow using the secret filter
|
|
set:
|
|
deployAsConfigMap: true
|
|
secretFilter:
|
|
enabled: true
|
|
partialMask: 3
|
|
asserts:
|
|
- isKind:
|
|
of: ConfigMap
|
|
- matchSnapshot:
|
|
path: data["module.alloy"]
|