Skip to content

Commit

Permalink
Allow empty backend w/o defaulting
Browse files Browse the repository at this point in the history
  • Loading branch information
muralov committed Nov 28, 2023
1 parent 692195c commit 8d19027
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 49 deletions.
3 changes: 1 addition & 2 deletions api/operator/v1alpha1/eventing_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ type EventingStatus struct {
// EventingSpec defines the desired state of Eventing
type EventingSpec struct {
// Backend defines the active backend used by Eventing.
// +kubebuilder:default:={type:"NATS", config:{natsStreamStorageType:"File", natsStreamReplicas:3, natsStreamMaxSize:"700Mi", natsMaxMsgsPerTopic:1000000}}
// +kubebuilder:validation:XValidation:rule=" (self.type != 'EventMesh') || ((self.type == 'EventMesh') && (self.config.eventMeshSecret != ''))", message="secret cannot be empty if EventMesh backend is used"
Backend Backend `json:"backend"`
Backend Backend `json:"backend,omitempty"`

// Publisher defines the configurations for eventing-publisher-proxy.
// +kubebuilder:default:={replicas:{min:2,max:2}, resources:{limits:{cpu:"500m",memory:"512Mi"}, requests:{cpu:"40m",memory:"256Mi"}}}
Expand Down
9 changes: 0 additions & 9 deletions config/crd/bases/operator.kyma-project.io_eventings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ spec:
description: Annotations allows to add annotations to resources.
type: object
backend:
default:
config:
natsMaxMsgsPerTopic: 1000000
natsStreamMaxSize: 700Mi
natsStreamReplicas: 3
natsStreamStorageType: File
type: NATS
description: Backend defines the active backend used by Eventing.
properties:
config:
Expand Down Expand Up @@ -261,8 +254,6 @@ spec:
type: object
type: object
type: object
required:
- backend
type: object
status:
description: EventingStatus defines the observed state of Eventing
Expand Down
Loading

0 comments on commit 8d19027

Please sign in to comment.