Skip to content

Commit

Permalink
k8s: Change SASL configuration in pp e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafal Korepta committed Oct 26, 2022
1 parent 0d26718 commit 8a29f1a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ spec:
port: 33145
kafkaApi:
- port: 9092
authenticationMethod: sasl
adminApi:
- port: 9644
pandaproxyApi:
- port: 8082
authenticationMethod: http_basic
developerMode: true
enableSasl: true
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SCRAM_USERNAME
valueFrom:
secretKeyRef:
name: cluster-proxy-sasl
key: username
- name: SCRAM_PASSWORD
valueFrom:
secretKeyRef:
name: cluster-proxy-sasl
key: password
command:
- /bin/bash
- -c
Expand All @@ -21,8 +31,9 @@ spec:
- |
curl -v -s \
-X POST "http://cluster-proxy-0.cluster-proxy.$POD_NAMESPACE.svc.cluster.local:8082/topics/test" \
-u "$SCRAM_USERNAME:$SCRAM_PASSWORD" \
-H "Content-Type: application/vnd.kafka.json.v2+json" \
-d '{"records":[{"value":"Vectorized"},{"value":"Pandaproxy"},{"value":"JSON Demo"}]}' \
-d '{"records":[{"value":"Vectorized"},{"value":"Pandaproxy"},{"value":"JSON Demo"}]}'
restartPolicy: Never
backoffLimit: 6
parallelism: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SCRAM_USERNAME
valueFrom:
secretKeyRef:
name: cluster-proxy-sasl
key: username
- name: SCRAM_PASSWORD
valueFrom:
secretKeyRef:
name: cluster-proxy-sasl
key: password
command:
- /bin/bash
- -c
Expand All @@ -21,7 +31,7 @@ spec:
- |
curl -v -s \
http://cluster-proxy-0.cluster-proxy.$POD_NAMESPACE.svc.cluster.local:8082/topics/test/partitions/0/records?offset=0\&timeout=1000\&max_bytes=100000 \
-H "Accept: application/vnd.kafka.json.v2+json"
-u "$SCRAM_USERNAME:$SCRAM_PASSWORD" -H "Accept: application/vnd.kafka.json.v2+json"
restartPolicy: Never
backoffLimit: 6
parallelism: 1
Expand Down

0 comments on commit 8a29f1a

Please sign in to comment.