Skip to content

Commit e29e544

Browse files
add LogRotate spec to PSMDB CR
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
1 parent b30b904 commit e29e544

File tree

7 files changed

+90
-0
lines changed

7 files changed

+90
-0
lines changed

config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,18 @@ spec:
698698
type: string
699699
imagePullPolicy:
700700
type: string
701+
logRotate:
702+
properties:
703+
configuration:
704+
type: string
705+
extraConfigs:
706+
properties:
707+
name:
708+
default: ""
709+
type: string
710+
type: object
711+
x-kubernetes-map-type: atomic
712+
type: object
701713
resources:
702714
properties:
703715
claims:

deploy/bundle.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,18 @@ spec:
15551555
type: string
15561556
imagePullPolicy:
15571557
type: string
1558+
logRotate:
1559+
properties:
1560+
configuration:
1561+
type: string
1562+
extraConfigs:
1563+
properties:
1564+
name:
1565+
default: ""
1566+
type: string
1567+
type: object
1568+
x-kubernetes-map-type: atomic
1569+
type: object
15581570
resources:
15591571
properties:
15601572
claims:

deploy/crd.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,18 @@ spec:
15551555
type: string
15561556
imagePullPolicy:
15571557
type: string
1558+
logRotate:
1559+
properties:
1560+
configuration:
1561+
type: string
1562+
extraConfigs:
1563+
properties:
1564+
name:
1565+
default: ""
1566+
type: string
1567+
type: object
1568+
x-kubernetes-map-type: atomic
1569+
type: object
15581570
resources:
15591571
properties:
15601572
claims:

deploy/cw-bundle.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,18 @@ spec:
15551555
type: string
15561556
imagePullPolicy:
15571557
type: string
1558+
logRotate:
1559+
properties:
1560+
configuration:
1561+
type: string
1562+
extraConfigs:
1563+
properties:
1564+
name:
1565+
default: ""
1566+
type: string
1567+
type: object
1568+
x-kubernetes-map-type: atomic
1569+
type: object
15581570
resources:
15591571
properties:
15601572
claims:

e2e-tests/version-service/conf/crd.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,18 @@ spec:
15551555
type: string
15561556
imagePullPolicy:
15571557
type: string
1558+
logRotate:
1559+
properties:
1560+
configuration:
1561+
type: string
1562+
extraConfigs:
1563+
properties:
1564+
name:
1565+
default: ""
1566+
type: string
1567+
type: object
1568+
x-kubernetes-map-type: atomic
1569+
type: object
15581570
resources:
15591571
properties:
15601572
claims:

pkg/apis/psmdb/v1/psmdb_types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,15 @@ type LogCollectorSpec struct {
15021502
Configuration string `json:"configuration,omitempty"`
15031503
ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"`
15041504
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
1505+
LogRotate *LogRotateSpec `json:"logRotate,omitempty"`
1506+
}
1507+
1508+
type LogRotateSpec struct {
1509+
// Configuration allows overriding the default logrotate configuration.
1510+
Configuration string `json:"configuration,omitempty"`
1511+
// AdditionalConfig allows specifying an additional configuration file for logrotate.
1512+
// This should be a reference to a ConfigMap in the same namespace.
1513+
ExtraConfig corev1.LocalObjectReference `json:"extraConfigs,omitempty"`
15051514
}
15061515

15071516
func (cr *PerconaServerMongoDB) IsLogCollectorEnabled() bool {

pkg/apis/psmdb/v1/zz_generated.deepcopy.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)