Skip to content

Commit 2d5584a

Browse files
authored
use server-side so that null field is not overwritten (#778)
1 parent c52c79c commit 2d5584a

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

docs/modules/kafka/examples/getting_started/getting_started.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-zk-server-default
8686

8787
echo "Install KafkaCluster from kafka.yaml"
8888
# tag::install-kafka[]
89-
kubectl apply -f kafka.yaml
89+
kubectl apply --server-side -f kafka.yaml
9090
# end::install-kafka[]
9191

9292
sleep 15
@@ -99,7 +99,7 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-defa
9999
echo "Starting port-forwarding of port 9092"
100100
# shellcheck disable=2069 # we want all output to be blackholed
101101
# tag::port-forwarding[]
102-
kubectl port-forward svc/simple-kafka 9092 2>&1 >/dev/null &
102+
kubectl port-forward svc/simple-kafka-broker-default-bootstrap 9092 2>&1 >/dev/null &
103103
# end::port-forwarding[]
104104
PORT_FORWARD_PID=$!
105105
# shellcheck disable=2064 # we want the PID evaluated now, not at the time the trap is
@@ -114,12 +114,12 @@ echo "some test data" > data
114114

115115
echo "Writing test data"
116116
# tag::kcat-write-data[]
117-
kafkacat -b localhost:9092 -t test-data-topic -P data
117+
kcat -b localhost:9092 -t test-data-topic -P data
118118
# end::kcat-write-data[]
119119

120120
echo "Reading test data"
121121
# tag::kcat-read-data[]
122-
kafkacat -b localhost:9092 -t test-data-topic -C -e > read-data.out
122+
kcat -b localhost:9092 -t test-data-topic -C -e > read-data.out
123123
# end::kcat-read-data[]
124124

125125
echo "Check contents"

docs/modules/kafka/examples/getting_started/getting_started.sh.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-zk-server-default
8686

8787
echo "Install KafkaCluster from kafka.yaml"
8888
# tag::install-kafka[]
89-
kubectl apply -f kafka.yaml
89+
kubectl apply --server-side -f kafka.yaml
9090
# end::install-kafka[]
9191

9292
sleep 15
@@ -99,7 +99,7 @@ kubectl rollout status --watch --timeout=5m statefulset/simple-kafka-broker-defa
9999
echo "Starting port-forwarding of port 9092"
100100
# shellcheck disable=2069 # we want all output to be blackholed
101101
# tag::port-forwarding[]
102-
kubectl port-forward svc/simple-kafka 9092 2>&1 >/dev/null &
102+
kubectl port-forward svc/simple-kafka-broker-default-bootstrap 9092 2>&1 >/dev/null &
103103
# end::port-forwarding[]
104104
PORT_FORWARD_PID=$!
105105
# shellcheck disable=2064 # we want the PID evaluated now, not at the time the trap is
@@ -114,12 +114,12 @@ echo "some test data" > data
114114

115115
echo "Writing test data"
116116
# tag::kcat-write-data[]
117-
kafkacat -b localhost:9092 -t test-data-topic -P data
117+
kcat -b localhost:9092 -t test-data-topic -P data
118118
# end::kcat-write-data[]
119119

120120
echo "Reading test data"
121121
# tag::kcat-read-data[]
122-
kafkacat -b localhost:9092 -t test-data-topic -C -e > read-data.out
122+
kcat -b localhost:9092 -t test-data-topic -C -e > read-data.out
123123
# end::kcat-read-data[]
124124

125125
echo "Check contents"

docs/modules/kafka/examples/getting_started/kafka.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
---
2+
apiVersion: listeners.stackable.tech/v1alpha1
3+
kind: ListenerClass
4+
metadata:
5+
name: external-unstable-ip
6+
spec:
7+
serviceType: NodePort
8+
preferredAddressType: IP
9+
---
210
apiVersion: kafka.stackable.tech/v1alpha1
311
kind: KafkaCluster
412
metadata:
@@ -12,8 +20,8 @@ spec:
1220
zookeeperConfigMapName: simple-kafka-znode
1321
brokers:
1422
config:
15-
bootstrapListenerClass: external-unstable # This exposes your Stacklet outside of Kubernetes. Remove this property if this is not desired
16-
brokerListenerClass: external-unstable # This exposes your Stacklet outside of Kubernetes. Remove this property if this is not desired
23+
bootstrapListenerClass: external-unstable-ip # This exposes your Stacklet outside of Kubernetes. Remove this property if this is not desired
24+
brokerListenerClass: external-unstable-ip # This exposes your Stacklet outside of Kubernetes. Remove this property if this is not desired
1725
roleGroups:
1826
default:
1927
replicas: 3

0 commit comments

Comments
 (0)