Skip to content

Commit

Permalink
Merge pull request tigera#2668 from asincu/fix_windows
Browse files Browse the repository at this point in the history
Fix! Windows needs c: prefix for the token path
  • Loading branch information
marvin-tigera committed May 26, 2023
2 parents d4486b0 + 83fe021 commit 5f88b85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/render/fluentd.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ func (c *fluentdComponent) envvars() []corev1.EnvVar {
{Name: "DNS_LOG_FILE", Value: c.path("/var/log/calico/dnslogs/dns.log")},
{Name: "FLUENTD_ES_SECURE", Value: "true"},
{Name: "NODENAME", ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{FieldPath: "spec.nodeName"}}},
{Name: "LINSEED_TOKEN", Value: GetLinseedTokenPath(c.cfg.ManagedCluster)},
{Name: "LINSEED_TOKEN", Value: c.path(GetLinseedTokenPath(c.cfg.ManagedCluster))},
}

if c.cfg.LogCollector.Spec.AdditionalStores != nil {
Expand Down
2 changes: 2 additions & 0 deletions pkg/render/fluentd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ var _ = Describe("Tigera Secure Fluentd rendering tests", func() {
FieldRef: &corev1.ObjectFieldSelector{FieldPath: "spec.nodeName"},
},
},
corev1.EnvVar{Name: "LINSEED_TOKEN", Value: "/var/run/secrets/kubernetes.io/serviceaccount/token"},
))

container := ds.Spec.Template.Spec.Containers[0]
Expand Down Expand Up @@ -272,6 +273,7 @@ var _ = Describe("Tigera Secure Fluentd rendering tests", func() {
FieldRef: &corev1.ObjectFieldSelector{FieldPath: "spec.nodeName"},
},
},
{Name: "LINSEED_TOKEN", Value: "c:/var/run/secrets/kubernetes.io/serviceaccount/token"},
}
for _, expected := range expectedEnvs {
Expect(envs).To(ContainElement(expected))
Expand Down

0 comments on commit 5f88b85

Please sign in to comment.