Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Windows fluentbit configuration #45

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions charts/amazon-cloudwatch-observability/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,22 @@ containerLogs:
Rotate_Wait 30
Refresh_Interval 10
Read_from_Head ${READ_FROM_HEAD}

[INPUT]
Name winlog
Channels EKS
DB C:\\var\\fluent-bit\\state\\flb_eks_winlog.db
Interval_Sec 60

[FILTER]
Name aws
Match dataplane.*
imds_version v2

[FILTER]
Name aws
Match winlog.*
imds_version v2

[OUTPUT]
Name cloudwatch_logs
Expand All @@ -345,10 +356,19 @@ containerLogs:
log_stream_prefix ${HOST_NAME}-
auto_create_group true
extra_user_agent container-insights

[OUTPUT]
Name cloudwatch_logs
Match winlog.*
region ${AWS_REGION}
log_group_name /aws/containerinsights/${CLUSTER_NAME}/dataplane
log_stream_name ${HOST_NAME}.windows.kubelet.kubeproxy.service
auto_create_group true
extra_user_agent container-insights
host-log.conf: |
[INPUT]
Name winlog
Channels EKS, System
Channels System
DB C:\\var\\fluent-bit\\state\\flb_system_winlog.db
Interval_Sec 60

Expand All @@ -362,7 +382,7 @@ containerLogs:
Match winlog.*
region ${AWS_REGION}
log_group_name /aws/containerinsights/${CLUSTER_NAME}/host
log_stream_prefix ${HOST_NAME}.
log_stream_name ${HOST_NAME}.windows.system.events
auto_create_group true
extra_user_agent container-insights

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
package validator

const (
// Services count for CW agent on Linux and Windows
serviceCountLinux = 6
serviceCountWindows = 3

// DaemonSet count for CW agent on Linux and Windows
daemonsetCountLinux = 4
daemonsetCountWindows = 2

// Pods count for CW agent on Linux and Windows
podCountLinux = 3
podCountWindows = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
package validator

const (
// Services count for CW agent on Linux and Windows
serviceCountLinux = 6
serviceCountWindows = 3

// DaemonSet count for CW agent on Linux and Windows
daemonsetCountLinux = 4
daemonsetCountWindows = 2

// Pods count for CW agent on Linux and Windows
podCountLinux = 3
podCountWindows = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ const (
)

const (
podCount = podCountLinux + podCountWindows
deploymentCount = 1
podCount = podCountLinux + podCountWindows
serviceCount = serviceCountLinux + serviceCountWindows
daemonsetCount = daemonsetCountLinux + daemonsetCountWindows
)

func TestOperatorOnEKs(t *testing.T) {
Expand Down Expand Up @@ -88,7 +91,7 @@ func TestOperatorOnEKs(t *testing.T) {
//Validating the services
services, err := ListServices(nameSpace, clientSet)
assert.NoError(t, err)
assert.Len(t, services.Items, 9)
assert.Len(t, services.Items, serviceCount)
for _, service := range services.Items {
fmt.Println("service name: " + service.Name + " namespace:" + service.Namespace)
// matches
Expand All @@ -112,7 +115,7 @@ func TestOperatorOnEKs(t *testing.T) {
for _, deployment := range deployments.Items {
fmt.Println("deployment name: " + deployment.Name + " namespace:" + deployment.Namespace)
}
assert.Len(t, deployments.Items, 1)
assert.Len(t, deployments.Items, deploymentCount)
// matches
// - amazon-cloudwatch-observability-controller-manager
assert.Equal(t, addOnName+"-controller-manager", deployments.Items[0].Name)
Expand All @@ -124,7 +127,7 @@ func TestOperatorOnEKs(t *testing.T) {
//Validating the Daemon Sets
daemonSets, err := ListDaemonSets(nameSpace, clientSet)
assert.NoError(t, err)
assert.Len(t, daemonSets.Items, 6)
assert.Len(t, daemonSets.Items, daemonsetCount)
for _, daemonSet := range daemonSets.Items {
fmt.Println("daemonSet name: " + daemonSet.Name + " namespace:" + daemonSet.Namespace)
// matches
Expand Down
Loading