Skip to content
Open
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
6 changes: 6 additions & 0 deletions api/v1alpha1/pipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ type ServicePort struct {
// +kubebuilder:default=TCP
// +kubebuilder:validation:Enum=TCP;UDP
Protocol corev1.Protocol `json:"protocol,omitempty"`

// type defines the Kubernetes Service type to create for this port. Defaults to ClusterIP. Use LoadBalancer to expose the Service outside the cluster (note: cluster operators may restrict external types via ResourceQuota).
// +optional
// +kubebuilder:default=ClusterIP
// +kubebuilder:validation:Enum=ClusterIP;LoadBalancer;NodePort
Type corev1.ServiceType `json:"type,omitempty"`
}

// Filter defines a containerized processing step in the pipeline
Expand Down
11 changes: 11 additions & 0 deletions config/crd/bases/filter.plainsight.ai_pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,17 @@ spec:
maximum: 65535
minimum: 1
type: integer
type:
default: ClusterIP
description: 'type defines the Kubernetes Service type to create
for this port. Defaults to ClusterIP. Use LoadBalancer to
expose the Service outside the cluster (note: cluster operators
may restrict external types via ResourceQuota).'
enum:
- ClusterIP
- LoadBalancer
- NodePort
type: string
required:
- name
- port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,17 @@ spec:
maximum: 65535
minimum: 1
type: integer
type:
default: ClusterIP
description: 'type defines the Kubernetes Service type to create
for this port. Defaults to ClusterIP. Use LoadBalancer to
expose the Service outside the cluster (note: cluster operators
may restrict external types via ResourceQuota).'
enum:
- ClusterIP
- LoadBalancer
- NodePort
type: string
required:
- name
- port
Expand Down
8 changes: 7 additions & 1 deletion internal/controller/pipelineinstance_controller_streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,12 @@ func (r *PipelineInstanceReconciler) ensureFilterServices(ctx context.Context, p
protocol = svcPort.Protocol
}

// Apply ClusterIP as the default service type if not specified
serviceType := svcPort.Type
if serviceType == "" {
serviceType = corev1.ServiceTypeClusterIP
}

desiredService := &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: serviceName,
Expand All @@ -638,7 +644,7 @@ func (r *PipelineInstanceReconciler) ensureFilterServices(ctx context.Context, p
Protocol: protocol,
},
},
Type: corev1.ServiceTypeClusterIP,
Type: serviceType,
},
}

Expand Down
Loading
Loading