Skip to content

Commit

Permalink
Add AdditionalFilters field to cindy spec [RHCLOUD-28098] (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
gburges authored Oct 10, 2023
1 parent 93c78fb commit 2d7cd0c
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 131 deletions.
3 changes: 3 additions & 0 deletions apis/cloud.redhat.com/v1alpha1/clowdapp_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@ type CyndiSpec struct {
// +kubebuilder:validation:Pattern:="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
AppName string `json:"appName,omitempty"`

// AdditionalFilters
AdditionalFilters []map[string]string `json:"additionalFilters,omitempty"`

// Desired host syndication type (all or Insights hosts only) - defaults to false (All hosts)
InsightsOnly bool `json:"insightsOnly,omitempty"`
}
Expand Down
15 changes: 14 additions & 1 deletion apis/cloud.redhat.com/v1alpha1/zz_generated.deepcopy.go

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

7 changes: 7 additions & 0 deletions config/crd/bases/cloud.redhat.com_clowdapps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ spec:
kafka-connect namespace. For all other kafka provider modes, this
configuration option has no effect.
properties:
additionalFilters:
description: AdditionalFilters
items:
additionalProperties:
type: string
type: object
type: array
appName:
description: Application name - if empty will default to Clowdapp's
name
Expand Down
1 change: 1 addition & 0 deletions controllers/cloud.redhat.com/providers/kafka/cyndi.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func createCyndiPipeline(
pipeline.Spec.DbSecret = &appDbSecret
pipeline.Spec.ConnectCluster = &connectClusterName
pipeline.Spec.InsightsOnly = app.Spec.Cyndi.InsightsOnly
pipeline.Spec.AdditionalFilters = app.Spec.Cyndi.AdditionalFilters

// it would be best for the ClowdApp to own this, but since cross-namespace OwnerReferences
// are not permitted, make this owned by the ClowdEnvironment
Expand Down
7 changes: 7 additions & 0 deletions deploy-mutate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ objects:
in the environment's kafka-connect namespace. For all other kafka
provider modes, this configuration option has no effect.
properties:
additionalFilters:
description: AdditionalFilters
items:
additionalProperties:
type: string
type: object
type: array
appName:
description: Application name - if empty will default to Clowdapp's
name
Expand Down
7 changes: 7 additions & 0 deletions deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ objects:
in the environment's kafka-connect namespace. For all other kafka
provider modes, this configuration option has no effect.
properties:
additionalFilters:
description: AdditionalFilters
items:
additionalProperties:
type: string
type: object
type: array
appName:
description: Application name - if empty will default to Clowdapp's
name
Expand Down
1 change: 1 addition & 0 deletions docs/antora/modules/ROOT/pages/api_reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ CyndiSpec is used to indicate whether a ClowdApp needs database syndication conf
| Field | Description
| *`enabled`* __boolean__ | Enables or Disables the Cyndi pipeline for the Clowdapp
| *`appName`* __string__ | Application name - if empty will default to Clowdapp's name
| *`additionalFilters`* __object array__ | AdditionalFilters
| *`insightsOnly`* __boolean__ | Desired host syndication type (all or Insights hosts only) - defaults to false (All hosts)
|===

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.19

require (
github.com/RedHatInsights/crc-caddy-plugin v0.2.1
github.com/RedHatInsights/cyndi-operator v0.1.9
github.com/RedHatInsights/cyndi-operator v0.1.12
github.com/RedHatInsights/go-difflib v1.0.0
github.com/RedHatInsights/rhc-osdk-utils v0.10.0
github.com/RedHatInsights/strimzi-client-go v0.34.2
Expand Down
Loading

0 comments on commit 2d7cd0c

Please sign in to comment.