Skip to content

Commit 3757ee3

Browse files
Use POD_NAME as the name for filebeat sidecar container (#817)
* Use POD_NAME as the name for filebeat sidecar container * Upgrade go to 1.24.6 * Fix style
1 parent e5dd86b commit 3757ee3

File tree

19 files changed

+31
-31
lines changed

19 files changed

+31
-31
lines changed

.github/workflows/bundle-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ jobs:
4949
username: ${{ secrets.DOCKER_USER }}
5050
password: ${{ secrets.DOCKER_PASSWORD }}
5151

52-
- name: Set up GO 1.24.4
52+
- name: Set up GO 1.24.6
5353
uses: actions/setup-go@v1
5454
with:
55-
go-version: 1.24.4
55+
go-version: 1.24.6
5656
id: go
5757

5858
- name: InstallKubebuilder
@@ -180,10 +180,10 @@ jobs:
180180
username: ${{ secrets.DOCKER_USER }}
181181
password: ${{ secrets.DOCKER_PASSWORD }}
182182

183-
- name: Set up GO 1.24.4
183+
- name: Set up GO 1.24.6
184184
uses: actions/setup-go@v1
185185
with:
186-
go-version: 1.24.4
186+
go-version: 1.24.6
187187
id: go
188188

189189
- name: InstallKubebuilder

.github/workflows/olm-verify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
- name: checkout
3535
uses: actions/checkout@v2
3636

37-
- name: Set up GO 1.24.4
37+
- name: Set up GO 1.24.6
3838
uses: actions/setup-go@v1
3939
with:
40-
go-version: 1.24.4
40+
go-version: 1.24.6
4141
id: go
4242

4343
- name: InstallKubebuilder

.github/workflows/project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
go-version: [1.22.12, 1.24.4]
21+
go-version: [1.22.12, 1.24.6]
2222
steps:
2323
- name: Free Disk Space (Ubuntu)
2424
uses: jlumbroso/[email protected]

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ jobs:
3737
username: ${{ secrets.DOCKER_USER }}
3838
password: ${{ secrets.DOCKER_PASSWORD }}
3939

40-
- name: Set up GO 1.24.4
40+
- name: Set up GO 1.24.6
4141
uses: actions/setup-go@v1
4242
with:
43-
go-version: 1.24.4
43+
go-version: 1.24.6
4444
id: go
4545

4646
- name: InstallKubebuilder

.github/workflows/test-helm-charts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ jobs:
8383
run: hack/kind-cluster-build.sh --name chart-testing -c 1 -v 10 --k8sVersion v1.23.17
8484
if: steps.list-changed.outputs.changed == 'true'
8585

86-
- name: Set up GO 1.24.4
86+
- name: Set up GO 1.24.6
8787
if: steps.list-changed.outputs.changed == 'true'
8888
uses: actions/setup-go@v1
8989
with:
90-
go-version: 1.24.4
90+
go-version: 1.24.6
9191
id: go
9292

9393
- name: setup kubebuilder 3.6.0

.github/workflows/trivy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
repository: ${{github.event.pull_request.head.repo.full_name}}
3535
ref: ${{ github.event.pull_request.head.sha }}
3636

37-
- name: Set up GO 1.24.4
37+
- name: Set up GO 1.24.6
3838
uses: actions/setup-go@v1
3939
with:
40-
go-version: 1.24.4
40+
go-version: 1.24.6
4141
id: go
4242

4343
- name: InstallKubebuilder

.github/workflows/trivy_scheduled_master.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ jobs:
4545
repository: ${{github.event.pull_request.head.repo.full_name}}
4646
ref: ${{ github.event.pull_request.head.sha }}
4747

48-
- name: Set up GO 1.24.4
48+
- name: Set up GO 1.24.6
4949
uses: actions/setup-go@v1
5050
with:
51-
go-version: 1.24.4
51+
go-version: 1.24.6
5252
id: go
5353

5454
- name: InstallKubebuilder

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.24.4-bullseye as builder
2+
FROM golang:1.24.6-bullseye as builder
33

44
WORKDIR /workspace/api
55
COPY api/ .

api/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/streamnative/function-mesh/api
22

3-
go 1.24.4
3+
go 1.24.6
44

55
require (
66
k8s.io/api v0.30.9

controllers/spec/common.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ func MakeHeadlessServiceName(serviceName string) string {
218218
func MakeStatefulSet(objectMeta *metav1.ObjectMeta, replicas *int32, downloaderImage string, container *corev1.Container,
219219
volumes []corev1.Volume, labels map[string]string, policy v1alpha1.PodPolicy, authConfig *v1alpha1.AuthConfig,
220220
tlsConfig TLSConfig, pulsarConfig, authSecret, tlsSecret string, javaRuntime *v1alpha1.JavaRuntime,
221-
pythonRuntime *v1alpha1.PythonRuntime, goRuntime *v1alpha1.GoRuntime, env []corev1.EnvVar, name, logTopic, filebeatImage string,
221+
pythonRuntime *v1alpha1.PythonRuntime, goRuntime *v1alpha1.GoRuntime, env []corev1.EnvVar, logTopic, filebeatImage string,
222222
logTopicAgent v1alpha1.LogTopicAgent, definedVolumeMounts []corev1.VolumeMount, volumeClaimTemplates []corev1.PersistentVolumeClaim,
223223
persistentVolumeClaimRetentionPolicy *appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy) *appsv1.StatefulSet {
224224

225-
filebeatContainer := makeFilebeatContainer(definedVolumeMounts, env, name, logTopic, logTopicAgent, tlsConfig, authConfig, pulsarConfig, tlsSecret, authSecret, filebeatImage)
225+
filebeatContainer := makeFilebeatContainer(definedVolumeMounts, env, logTopic, logTopicAgent, tlsConfig, authConfig, pulsarConfig, tlsSecret, authSecret, filebeatImage)
226226

227227
volumeMounts := generateDownloaderVolumeMountsForDownloader(javaRuntime, pythonRuntime, goRuntime)
228228
var downloaderContainer *corev1.Container
@@ -2387,7 +2387,7 @@ func getSubscriptionNameOrDefault(subscription, tenant, namespace, name string)
23872387
return subscription
23882388
}
23892389

2390-
func makeFilebeatContainer(volumeMounts []corev1.VolumeMount, envVar []corev1.EnvVar, name string, logTopic string,
2390+
func makeFilebeatContainer(volumeMounts []corev1.VolumeMount, envVar []corev1.EnvVar, logTopic string,
23912391
agent v1alpha1.LogTopicAgent, tlsConfig TLSConfig, authConfig *v1alpha1.AuthConfig,
23922392
pulsarConfig string, authSecret string, tlsSecret string, image string) *corev1.Container {
23932393
if logTopic == "" || agent != v1alpha1.SIDECAR {
@@ -2407,8 +2407,8 @@ func makeFilebeatContainer(volumeMounts []corev1.VolumeMount, envVar []corev1.En
24072407
Name: "logTopic",
24082408
Value: logTopic,
24092409
}, corev1.EnvVar{
2410-
Name: "logName",
2411-
Value: name,
2410+
Name: "POD_NAME",
2411+
ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.name"}},
24122412
})
24132413

24142414
if authConfig != nil {

0 commit comments

Comments
 (0)