Skip to content

Commit

Permalink
Merge pull request #622 from RafalKorepta/rk/change-schame-registry-t…
Browse files Browse the repository at this point in the history
…est-logic
  • Loading branch information
RafalKorepta authored Jul 29, 2023
2 parents 0a0a2dc + 888dd0c commit fc58f97
Showing 1 changed file with 53 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,60 @@ spec:
schemaCurl https://{{ include "redpanda.internal.domain" . }}:{{ .Values.listeners.schemaRegistry.port }}/subjects
schemaCurl -X DELETE \
https://{{ include "redpanda.internal.domain" . }}:{{ .Values.listeners.schemaRegistry.port }}/subjects/sensor-value/versions/1
max_iteration=10
schemaCurl -X DELETE \
https://{{ include "redpanda.internal.domain" . }}:{{ .Values.listeners.schemaRegistry.port }}/subjects/sensor-value/versions/1?permanent=true
for i in $(seq 1 $max_iteration)
do
curl -vv -X DELETE \
{{- if or (include "sasl-enabled" .|fromJson).bool .Values.listeners.schemaRegistry.authenticationMethod }}
-u $USERNAME:$PASSWORD \
{{- end }}
{{- if $cert.caEnabled }}
--cacert /etc/tls/certs/{{ $service.tls.cert }}/ca.crt \
{{- end }}
https://{{ include "redpanda.internal.domain" . }}:{{ .Values.listeners.schemaRegistry.port }}/subjects/sensor-value/versions/1
result=$?
if [[ $result -eq 0 ]]
then
echo "Result successful"
break
else
echo "Result unsuccessful"
sleep 1
fi
done
if [[ $result -ne 0 ]]
then
echo "All of the trials failed to delete schema!!!"
fi
for i in $(seq 1 $max_iteration)
do
curl -vv -X DELETE \
{{- if or (include "sasl-enabled" .|fromJson).bool .Values.listeners.schemaRegistry.authenticationMethod }}
-u $USERNAME:$PASSWORD \
{{- end }}
{{- if $cert.caEnabled }}
--cacert /etc/tls/certs/{{ $service.tls.cert }}/ca.crt \
{{- end }}
https://{{ include "redpanda.internal.domain" . }}:{{ .Values.listeners.schemaRegistry.port }}/subjects/sensor-value/versions/1?permanent=true
result=$?
if [[ $result -eq 0 ]]
then
echo "Result successful"
break
else
echo "Result unsuccessful"
sleep 1
fi
done
if [[ $result -ne 0 ]]
then
echo "All of the trials failed to permanently delete schema!!!"
exit 1
fi
volumeMounts:
{{- range $name, $cert := .Values.tls.certs }}
- name: redpanda-{{ $name }}-cert
Expand Down

0 comments on commit fc58f97

Please sign in to comment.