Skip to content

Commit

Permalink
Add AdditionalFilters field to cindy spec [RHCLOUD-28098]
Browse files Browse the repository at this point in the history
  • Loading branch information
gburges committed Sep 8, 2023
1 parent e1261fb commit 64dc913
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 497 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
3 changes: 2 additions & 1 deletion docs/antora/modules/ROOT/pages/api_reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,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 Expand Up @@ -846,7 +847,7 @@ MetricsConfig configures the Clowder provider controlling the creation of metric
| Field | Description
| *`port`* __integer__ | The port that metrics services inside ClowdApp pods should be served on.
| *`path`* __string__ | A prefix path that pods will be instructed to use when setting up their metrics server.
| *`mode`* __MetricsMode__ | The mode of operation of the Metrics provider. The allowed modes are (*_none_*), which disables metrics service generation, or (*_operator_*) where services and probes are generated. (*_app-interface_*) where services and probes are generated for app-interface.
| *`mode`* __MetricsMode__ | The mode of operation of the Metrics provider. The allowed modes are (*_none_*), which disables metrics service generation, or (*_operator_*) where services and probes are generated. (*_app-interface_*) where services and probes are generated for app-interface.
| *`prometheus`* __xref:{anchor_prefix}-github-com-redhatinsights-clowder-apis-cloud-redhat-com-v1alpha1-prometheusconfig[$$PrometheusConfig$$]__ | Prometheus specific configuration
|===

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/RedHatInsights/clowder
go 1.19

require (
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 64dc913

Please sign in to comment.