Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
### Added
- [[65]](https://github.com/kaasops/vector-operator/pull/65) **Refactor**: merge vp and cvp reconcile funcs
- [[64]](https://github.com/kaasops/vector-operator/pull/64) **Fix** Do not reconсile vector if vp check fail
- [[63]](https://github.com/kaasops/vector-operator/pull/63) **Fix** Fix configcheck gc

### v0.0.7
- [[61]](https://github.com/kaasops/vector-operator/pull/61) **Feature** Filter cache and disable time reconcile
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha1/clustervectorpipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func (vp *ClusterVectorPipeline) SetConfigCheck(value bool) {
vp.Status.ConfigCheckResult = &value
}

func (vp *ClusterVectorPipeline) GetConfigCheckResult() *bool {
return vp.Status.ConfigCheckResult
}

func (vp *ClusterVectorPipeline) SetReason(reason *string) {
vp.Status.Reason = reason
}
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/clustervectorpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:shortName=cvp
//+kubebuilder:resource:scope=Cluster,shortName=cvp
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
//+kubebuilder:printcolumn:name="Valid",type="boolean",JSONPath=".status.configCheckResult"

Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha1/vectorpipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func (vp *VectorPipeline) SetConfigCheck(value bool) {
vp.Status.ConfigCheckResult = &value
}

func (vp *VectorPipeline) GetConfigCheckResult() *bool {
return vp.Status.ConfigCheckResult
}

func (vp *VectorPipeline) SetReason(reason *string) {
vp.Status.Reason = reason
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
shortNames:
- cvp
singular: clustervectorpipeline
scope: Namespaced
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
Expand Down
52 changes: 0 additions & 52 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,6 @@ metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- observability.kaasops.io
resources:
- clustervectorpipelines
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- observability.kaasops.io
resources:
- clustervectorpipelines/finalizers
verbs:
- update
- apiGroups:
- observability.kaasops.io
resources:
- clustervectorpipelines/status
verbs:
- get
- patch
- update
- apiGroups:
- observability.kaasops.io
resources:
- vectorpipelines
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- observability.kaasops.io
resources:
- vectorpipelines/finalizers
verbs:
- update
- apiGroups:
- observability.kaasops.io
resources:
- vectorpipelines/status
verbs:
- get
- patch
- update
- apiGroups:
- observability.kaasops.io
resources:
Expand Down
12 changes: 11 additions & 1 deletion config/samples/observability_v1alpha1_clustervectorpipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ kind: ClusterVectorPipeline
metadata:
name: clustervectorpipeline-sample
spec:
# TODO(user): Add fields here
sources:
test1:
type: "kubernetes_logs"
extra_label_selector: "app!=testdeployment3"
sinks:
test2:
type: "console"
encoding:
codec: "json"
inputs:
- test1
143 changes: 0 additions & 143 deletions controllers/clustervectorpipeline_controller.go

This file was deleted.

5 changes: 4 additions & 1 deletion controllers/factory/config/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ func addPrefix(Namespace, Name, componentName string) string {
}

func generateName(Namespace, Name string) string {
return Namespace + "-" + Name
if Namespace != "" {
return Namespace + "-" + Name
}
return Name
}
1 change: 1 addition & 0 deletions controllers/factory/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type Pipeline interface {
SetReason(*string)
GetLastAppliedPipeline() *uint32
SetLastAppliedPipeline(*uint32)
GetConfigCheckResult() *bool
IsValid() bool
IsDeleted() bool
UpdateStatus(context.Context, client.Client) error
Expand Down
Loading