-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for namespace annotations
- Loading branch information
1 parent
129e1ce
commit 7742c04
Showing
12 changed files
with
170 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
feat: add support for namespace annotations to set sourceCategory, sourceCategoryPrefix, sourceCategoryReplaceDash, sourceHost, sourceName |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//go:build onlylatest | ||
// +build onlylatest | ||
|
||
package integration | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func Test_Helm_Namespace_Annotations(t *testing.T) { | ||
installChecks := []featureCheck{ | ||
CheckOtelcolMetadataLogsInstall, | ||
} | ||
|
||
featInstall := GetInstallFeature(installChecks) | ||
|
||
featAnnotationsTest := GetNamespaceAnnotationsFeature() | ||
|
||
testenv.Test(t, featInstall, featAnnotationsTest) | ||
} |
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
7 changes: 7 additions & 0 deletions
7
tests/integration/values/values_helm_namespace_annotations.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
sumologic: | ||
events: | ||
enabled: false | ||
metrics: | ||
enabled: false | ||
traces: | ||
enabled: false |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
annotations: | ||
sumologic.com/include: "true" | ||
sumologic.com/sourceCategory: "namespaceSourceCategory" | ||
sumologic.com/sourceCategoryPrefix: "namespace-Source-Category-Prefix" | ||
sumologic.com/sourceCategoryReplaceDash: "#" | ||
sumologic.com/sourceHost: "namespaceSourceHost" | ||
sumologic.com/sourceName: "namespaceSourceName" | ||
name: namespace-annotations-test | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-a | ||
namespace: namespace-annotations-test | ||
spec: | ||
containers: | ||
- name: container1 | ||
image: bash | ||
args: | ||
- /usr/local/bin/bash | ||
- -c | ||
- > | ||
i=0; for i in {1..50}; do | ||
echo "example0: $i $(date)" | ||
echo "example1: $i $(date)" | ||
echo "example2: $i $(date)" | ||
sleep 1; | ||
done; while true; do | ||
sleep 1; | ||
done; | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-b | ||
namespace: namespace-annotations-test | ||
annotations: | ||
sumologic.com/sourceCategory: "podSourceCategory" | ||
sumologic.com/sourceCategoryPrefix: "podSource-Category-Prefix" | ||
sumologic.com/sourceCategoryReplaceDash: "!" | ||
sumologic.com/sourceHost: "podSourceHost" | ||
sumologic.com/sourceName: "podSourceName" | ||
spec: | ||
containers: | ||
- name: container1 | ||
image: bash | ||
args: | ||
- /usr/local/bin/bash | ||
- -c | ||
- > | ||
i=0; for i in {1..50}; do | ||
echo "example0: $i $(date)" | ||
echo "example1: $i $(date)" | ||
echo "example2: $i $(date)" | ||
sleep 1; | ||
done; while true; do | ||
sleep 1; | ||
done; |