Skip to content

Commit 9f72845

Browse files
committed
logserver - remove CRD and controller
There is no required usecase for it. So let's remove some code. Change-Id: Ib03ac3984c87d6fd7c86dc593d65cf9e0c6c25e2
1 parent df5707a commit 9f72845

File tree

11 files changed

+40
-486
lines changed

11 files changed

+40
-486
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ All notable changes to this project will be documented in this file.
88
### Changed
99
### Deprecated
1010
### Removed
11+
12+
- The LogsServer CRD and controller. As there is no identified need for a proper CRD and Controller.
13+
1114
### Fixed
1215
### Security
1316

api/v1/logserver_types.go

Lines changed: 0 additions & 70 deletions
This file was deleted.

api/v1/softwarefactory_types.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,20 @@ type SecretRef struct {
485485
SecretKeyRef *Secret `json:"secretKeyRef"`
486486
}
487487

488+
// LogServerSpec defines the desired state of LogServer
489+
type LogServerSpec struct {
490+
// Logs retention time in days. Logs older than this setting in days will be purged by a pruning cronjob. Defaults to 60 days
491+
// +kubebuilder:default:=60
492+
// +kubebuilder:validation:Minimum:=1
493+
RetentionDays int `json:"retentionDays,omitempty"`
494+
// The frequency, in seconds, at which the log pruning cronjob is running. Defaults to 3600s, i.e. logs are checked for pruning every hour
495+
// +kubebuilder:default:=3600
496+
// +kubebuilder:validation:Minimum:=1
497+
LoopDelay int `json:"loopDelay,omitempty"`
498+
// Storage-related settings
499+
Storage StorageSpec `json:"storage,omitempty"`
500+
}
501+
488502
// SoftwareFactorySpec defines the desired state of SoftwareFactory
489503
type SoftwareFactorySpec struct {
490504
// Important: Run "make manifests" to regenerate code after modifying this file
@@ -518,7 +532,7 @@ type SoftwareFactorySpec struct {
518532
// Logserver service spec
519533
// +kubebuilder:validation:Optional
520534
// +kubebuilder:default={"loopDelay": 3600, retentionDays: 60}
521-
Logserver LogServerSpecSettings `json:"logserver,omitempty"`
535+
Logserver LogServerSpec `json:"logserver,omitempty"`
522536

523537
// MariaDB service spec
524538
MariaDB MariaDBSpec `json:"mariadb,omitempty"`

api/v1/zz_generated.deepcopy.go

Lines changed: 1 addition & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/rbac/role.yaml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,32 +71,6 @@ rules:
7171
- patch
7272
- update
7373
- watch
74-
- apiGroups:
75-
- sf.softwarefactory-project.io
76-
resources:
77-
- logservers
78-
verbs:
79-
- create
80-
- delete
81-
- get
82-
- list
83-
- patch
84-
- update
85-
- watch
86-
- apiGroups:
87-
- sf.softwarefactory-project.io
88-
resources:
89-
- logservers/finalizers
90-
verbs:
91-
- update
92-
- apiGroups:
93-
- sf.softwarefactory-project.io
94-
resources:
95-
- logservers/status
96-
verbs:
97-
- get
98-
- patch
99-
- update
10074
- apiGroups:
10175
- sf.softwarefactory-project.io
10276
resources:

0 commit comments

Comments
 (0)