Skip to content
Closed
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
4 changes: 2 additions & 2 deletions operator/apis/operator/v1alpha1/eventexporter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ type EventExporterSpec struct {
Version string `json:"version,omitempty"`
// Image is the event exporter Docker image to deploy.
Image string `json:"image,omitempty"`
// Replicas is the number of event exporter pods
// Instances is the number of event exporter pods
// +kubebuilder:validation:Required
Replicas int32 `json:"replicas,omitempty"`
Instances int32 `json:"instances"`
// Config of filters and exporters
// +kubebuilder:validation:Optional
Config string `json:"config,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions operator/apis/operator/v1alpha1/eventexporter_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func (r *EventExporter) Default(_ context.Context, eventexporter *EventExporter)
eventexporter.Spec.Image = fmt.Sprintf("%s:%s", image, eventexporter.Spec.Version)
}

if eventexporter.Spec.Replicas == 0 {
eventexporter.Spec.Replicas = 1
if eventexporter.Spec.Instances == 0 {
eventexporter.Spec.Instances = 1
}

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ spec:
image:
description: Image is the event exporter Docker image to deploy.
type: string
replicas:
description: Replicas is the number of event exporter pods
instances:
description: Instances is the number of event exporter pods
format: int32
type: integer
version:
description: Version of EventExporter.
type: string
required:
- replicas
- instances
- version
type: object
status:
Expand Down
2 changes: 1 addition & 1 deletion operator/config/samples/eventexporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ kind: EventExporter
metadata:
name: eventexporter-sample
spec:
replicas: 1
instances: 1
config: |
filters:
- reason: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
operator.skywalking.apache.org/application: eventexporter
operator.skywalking.apache.org/component: deployment
spec:
replicas: {{ .Spec.Replicas }}
replicas: {{ .Spec.Instances }}
selector:
matchLabels:
operator.skywalking.apache.org/eventexporter-name: {{ .Name }}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/skywalking-components-with-eventexporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ metadata:
name: skywalking-system
namespace: skywalking-system
spec:
replicas: 1
instances: 1
version: latest
config: |
filters:
Expand Down
Loading