-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ability to customize pod labels in helm chart
- Loading branch information
Showing
9 changed files
with
221 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 53 additions & 53 deletions
106
chart/helm3/sops-secrets-operator/tests/monitor_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
suite: operator prometheus monitor tests | ||
templates: | ||
- monitor.yaml | ||
- monitor.yaml | ||
|
||
tests: | ||
|
||
- it: should not render any ServiceMonitor documents | ||
release: | ||
name: sops | ||
namespace: sops | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
- it: should not render any ServiceMonitor documents | ||
release: | ||
name: sops | ||
namespace: sops | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
|
||
- it: should set correct kind and apiVersion, one document and selector | ||
release: | ||
name: sops | ||
namespace: sops | ||
set: | ||
metrics: | ||
enabled: true | ||
asserts: | ||
- isKind: | ||
of: ServiceMonitor | ||
- isAPIVersion: | ||
of: monitoring.coreos.com/v1 | ||
- hasDocuments: | ||
count: 1 | ||
- equal: | ||
path: spec.selector.matchLabels | ||
value: | ||
app.kubernetes.io/instance: sops | ||
app.kubernetes.io/name: sops-secrets-operator | ||
- it: should set correct kind and apiVersion, one document and selector | ||
release: | ||
name: sops | ||
namespace: sops | ||
set: | ||
metrics: | ||
enabled: true | ||
asserts: | ||
- isKind: | ||
of: ServiceMonitor | ||
- isAPIVersion: | ||
of: monitoring.coreos.com/v1 | ||
- hasDocuments: | ||
count: 1 | ||
- equal: | ||
path: spec.selector.matchLabels | ||
value: | ||
app.kubernetes.io/instance: sops | ||
app.kubernetes.io/name: sops-secrets-operator | ||
|
||
- it: should include additional labels when set | ||
release: | ||
name: sops | ||
namespace: sops | ||
set: | ||
metrics: | ||
enabled: true | ||
additionalLabels: | ||
custom-label: custom-value | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: ServiceMonitor | ||
- isAPIVersion: | ||
of: monitoring.coreos.com/v1 | ||
- equal: | ||
path: metadata.labels | ||
# UPDATE_HERE | ||
value: | ||
app.kubernetes.io/instance: sops | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: sops-secrets-operator | ||
app.kubernetes.io/version: "0.14.1" | ||
helm.sh/chart: sops-secrets-operator-0.20.1 | ||
custom-label: custom-value | ||
- it: should include additional labels when set | ||
release: | ||
name: sops | ||
namespace: sops | ||
set: | ||
metrics: | ||
enabled: true | ||
additionalLabels: | ||
custom-label: custom-value | ||
asserts: | ||
- hasDocuments: | ||
count: 1 | ||
- isKind: | ||
of: ServiceMonitor | ||
- isAPIVersion: | ||
of: monitoring.coreos.com/v1 | ||
- equal: | ||
path: metadata.labels | ||
# UPDATE_HERE | ||
value: | ||
app.kubernetes.io/instance: sops | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: sops-secrets-operator | ||
app.kubernetes.io/version: "0.14.1" | ||
helm.sh/chart: sops-secrets-operator-0.20.2 | ||
custom-label: custom-value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.