Skip to content

Commit

Permalink
logserver - remove CRD and controller
Browse files Browse the repository at this point in the history
There is no required usecase for it. So let's remove some code.

Change-Id: Ib03ac3984c87d6fd7c86dc593d65cf9e0c6c25e2
  • Loading branch information
morucci committed Mar 28, 2024
1 parent df5707a commit 9f72845
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 486 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ All notable changes to this project will be documented in this file.
### Changed
### Deprecated
### Removed

- The LogsServer CRD and controller. As there is no identified need for a proper CRD and Controller.

### Fixed
### Security

Expand Down
70 changes: 0 additions & 70 deletions api/v1/logserver_types.go

This file was deleted.

16 changes: 15 additions & 1 deletion api/v1/softwarefactory_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,20 @@ type SecretRef struct {
SecretKeyRef *Secret `json:"secretKeyRef"`
}

// LogServerSpec defines the desired state of LogServer
type LogServerSpec struct {
// Logs retention time in days. Logs older than this setting in days will be purged by a pruning cronjob. Defaults to 60 days
// +kubebuilder:default:=60
// +kubebuilder:validation:Minimum:=1
RetentionDays int `json:"retentionDays,omitempty"`
// The frequency, in seconds, at which the log pruning cronjob is running. Defaults to 3600s, i.e. logs are checked for pruning every hour
// +kubebuilder:default:=3600
// +kubebuilder:validation:Minimum:=1
LoopDelay int `json:"loopDelay,omitempty"`
// Storage-related settings
Storage StorageSpec `json:"storage,omitempty"`
}

// SoftwareFactorySpec defines the desired state of SoftwareFactory
type SoftwareFactorySpec struct {
// Important: Run "make manifests" to regenerate code after modifying this file
Expand Down Expand Up @@ -518,7 +532,7 @@ type SoftwareFactorySpec struct {
// Logserver service spec
// +kubebuilder:validation:Optional
// +kubebuilder:default={"loopDelay": 3600, retentionDays: 60}
Logserver LogServerSpecSettings `json:"logserver,omitempty"`
Logserver LogServerSpec `json:"logserver,omitempty"`

// MariaDB service spec
MariaDB MariaDBSpec `json:"mariadb,omitempty"`
Expand Down
104 changes: 1 addition & 103 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 0 additions & 26 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- sf.softwarefactory-project.io
resources:
- logservers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- sf.softwarefactory-project.io
resources:
- logservers/finalizers
verbs:
- update
- apiGroups:
- sf.softwarefactory-project.io
resources:
- logservers/status
verbs:
- get
- patch
- update
- apiGroups:
- sf.softwarefactory-project.io
resources:
Expand Down
Loading

0 comments on commit 9f72845

Please sign in to comment.