Skip to content

Commit db9b8db

Browse files
Microzuul CIGerrit Code Review
authored andcommitted
Merge "logserver: mount the logs in the same location for purgelogs"
2 parents 55e14df + a341caf commit db9b8db

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

controllers/logserver.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ package controllers
88
import (
99
_ "embed"
1010
"encoding/base64"
11-
"k8s.io/utils/ptr"
1211
"strconv"
1312

13+
"k8s.io/utils/ptr"
14+
1415
"golang.org/x/exp/maps"
1516
apiv1 "k8s.io/api/core/v1"
1617
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -41,7 +42,7 @@ const sshdPortName = "logserver-sshd"
4142
var logserverRun string
4243

4344
const purgelogIdent = "purgelogs"
44-
const purgelogsLogsDir = "/home/logs"
45+
const logsDir = "/var/www/html/logs"
4546

4647
//go:embed static/logserver/logserver.conf
4748
var logserverConf string
@@ -149,7 +150,7 @@ func (r *SFController) DeployLogserver() bool {
149150
},
150151
{
151152
Name: logserverIdent,
152-
MountPath: "/var/www/html/logs",
153+
MountPath: logsDir,
153154
},
154155
{
155156
Name: logserverIdent + "-config-vol",
@@ -266,12 +267,12 @@ func (r *SFController) DeployLogserver() bool {
266267
strconv.Itoa(retentionDays),
267268
"--loop", strconv.Itoa(loopDelay),
268269
"--log-path-dir",
269-
purgelogsLogsDir,
270+
logsDir,
270271
"--debug"}
271272
purgelogsContainer.VolumeMounts = []apiv1.VolumeMount{
272273
{
273274
Name: logserverIdent,
274-
MountPath: purgelogsLogsDir,
275+
MountPath: logsDir,
275276
},
276277
}
277278

@@ -291,7 +292,7 @@ func (r *SFController) DeployLogserver() bool {
291292
// Increase serial each time you need to enforce a deployment change/pod restart between operator versions
292293
sts.Spec.Template.ObjectMeta.Annotations = map[string]string{
293294
"fqdn": r.cr.Spec.FQDN,
294-
"serial": "6",
295+
"serial": "7",
295296
"httpd-conf": utils.Checksum([]byte(logserverConf)),
296297
"purgeLogConfig": "retentionDays:" + strconv.Itoa(r.cr.Spec.Logserver.RetentionDays) +
297298
" loopDelay:" + strconv.Itoa(r.cr.Spec.Logserver.LoopDelay),

doc/reference/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
1111
### Changed
1212

1313
- The Go version in go.mod is bumped to 1.24.6. Backward compatibility with earlier versions is not guaranteed.
14+
- The purgelogs mount point for the build logs is fixed to use the same location as the logserver.
1415

1516
### Deprecated
1617
### Removed

0 commit comments

Comments
 (0)