Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator v1: create internal kafka api port #205

Merged
merged 2 commits into from
Sep 2, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,11 @@ func collectClusterPorts(
port := redpandaCluster.Spec.Configuration.SchemaRegistry.Port
clusterPorts = append(clusterPorts, resources.NamedServicePort{Name: resources.SchemaRegistryPortName, Port: port})
}
if redpandaPorts.KafkaAPI.Internal != nil {
port := redpandaPorts.KafkaAPI.Internal.Port
clusterPorts = append(clusterPorts, resources.NamedServicePort{Name: resources.InternalListenerName, Port: port})
}

return clusterPorts
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: redpanda.vectorized.io/v1alpha1
kind: Cluster
metadata:
name: kafka-api-cluster-service-internal
status:
replicas: 1
restarting: false
conditions:
- type: ClusterConfigured
status: "True"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: kafka-api-cluster-service-internal
status:
readyReplicas: 1
---
apiVersion: v1
kind: Service
metadata:
name: kafka-api-cluster-service-internal-cluster
spec:
ports:
- name: kafka
port: 9092
protocol: TCP
targetPort: 9092
type: ClusterIP
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
collectors:
- command: ../../../hack/get-redpanda-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: redpanda.vectorized.io/v1alpha1
kind: Cluster
metadata:
name: kafka-api-cluster-service-internal
spec:
image: "localhost/redpanda"
version: "dev"
replicas: 1
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 1
memory: 1Gi
configuration:
rpcServer:
port: 33145
kafkaApi:
- port: 9092
tls:
enabled: false
adminApi:
- port: 9644
developerMode: true
additionalCommandlineArguments:
dump-memory-diagnostics-on-alloc-failure-kind: all
abort-on-seastar-bad-alloc: ''
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
collectors:
- command: ../../../hack/get-redpanda-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: redpanda.vectorized.io/v1alpha1
kind: Cluster
name: kafka-api-cluster-service-internal
namespace: redpanda-system
- apiVersion: v1
kind: PersistentVolumeClaim
name: datadir-kafka-api-cluster-service-internal-0
namespace: redpanda-system