-
Notifications
You must be signed in to change notification settings - Fork 98
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
Exclude schema registry and HTTP proxy config from 22.2.X deployment #544
Exclude schema registry and HTTP proxy config from 22.2.X deployment #544
Conversation
3bc4d35
to
c8871b8
Compare
The PR redpanda-data#544 does not pass tests due to bug in Redpanda. The pandaproxy fix will be backported eventually redpanda-data/redpanda#11425, but to unblock the nightly build the test SASL mechanism should be change from `SCRAM-SHA-512` to `SCRAM-SHA-256`.
Tests are blocked by #547 |
cdbfccd
to
aaf206a
Compare
Test 05 was adjusted to use not default settings #550. I hope upgrade tests will pass now. |
@@ -538,6 +538,10 @@ than 1 core. | |||
{{- toJson (dict "bool" (or (not (eq .Values.image.repository "docker.redpanda.com/redpandadata/redpanda")) (include "redpanda.semver" . | semverCompare ">=22.2.10-0,<22.3"))) -}} | |||
{{- end -}} | |||
|
|||
{{- define "redpanda-22-2-x-without-sasl" -}} | |||
{{- toJson (dict "bool" (or (not (or (include "sasl-enabled" . | fromJson).bool .Values.listeners.kafka.authenticationMethod)) (include "redpanda-atleast-22-3-0" . | fromJson).bool)) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is accurate, I'd suggest this. The nested logic is way to hard to parse in my head.
{{- toJson (dict "bool" (or (not (or (include "sasl-enabled" . | fromJson).bool .Values.listeners.kafka.authenticationMethod)) (include "redpanda-atleast-22-3-0" . | fromJson).bool)) -}} | |
{{- $result := (include "redpanda-atleast-22-3-0" . | fromJson).bool -}} | |
{{- if or (include "sasl-enabled" . | fromJson).bool .Values.listeners.kafka.authenticationMethod)) -}} | |
{{- $result := false -}} | |
{{- end -}} | |
{{- toJson (dict "bool" $result -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not that proficient in templating langue. If I could code this in go :)
Comment included into next push
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It IS go! 😁
{{- 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 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is repeated for each command. What do you think about putting it in a function?
schemaCurl () {
{{- 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 }} $1
}
schemaCurl https://{{ include "redpanda.internal.domain" . }}:{{ .Values.listeners.schemaRegistry.port }}/subjects/sensor-value/versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion
curl -svm3 --fail --retry "120" --retry-max-time "120" --retry-all-errors \ | ||
-X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \ | ||
-d '{"schema": "{\"type\":\"record\",\"name\":\"sensor_sample\",\"fields\":[{\"name\":\"timestamp\",\"type\":\"long\",\"logicalType\":\"timestamp-millis\"},{\"name\":\"identifier\",\"type\":\"string\",\"logicalType\":\"uuid\"},{\"name\":\"value\",\"type\":\"long\"}]}"}' \ | ||
{{- if or (include "sasl-enabled" .|fromJson).bool .Values.listeners.schemaRegistry.authenticationMethod }} | ||
-u $USERNAME:$PASSWORD \ | ||
{{- end }} | ||
http://{{ include "redpanda.internal.domain" . }}:{{ .Values.listeners.schemaRegistry.port }}/subjects/sensor-value/versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar to above, could this be made a little more DRY?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only change I'd like to see for sure is the breaking up of the compound logic. The other suggestions are just nice-to-haves.
aaf206a
to
f962c4c
Compare
As version 22.2.X does not provide basic auth configuration option in both schema registry and panda proxy the client configuration for both services needs SASL credentails to be explicitly set in Redpanda configuration. That Redpanda configuration is generated in helm and sotred as config map which should not hold any credentails. Newer version can take HTTP basic auth header to impersonate user and authenticate against Redpanda Kafka listener. Additionally HTTP proxy and schema registry tests now are run when SASL is enabled
f962c4c
to
640adec
Compare
The PR redpanda-data/helm-charts#544 does not pass tests due to bug in Redpanda. The pandaproxy fix will be backported eventually redpanda-data/redpanda#11425, but to unblock the nightly build the test SASL mechanism should be change from `SCRAM-SHA-512` to `SCRAM-SHA-256`.
The PR redpanda-data/helm-charts#544 does not pass tests due to bug in Redpanda. The pandaproxy fix will be backported eventually redpanda-data/redpanda#11425, but to unblock the nightly build the test SASL mechanism should be change from `SCRAM-SHA-512` to `SCRAM-SHA-256`.
…/fix-22-2-x-schema-registry-and-panda-proxy-clients Exclude schema registry and HTTP proxy config from 22.2.X deployment
As version 22.2.X does not provide basic auth configuration option in both schema registry and panda proxy the client configuration for both services needs SASL credentails to be explicitly set in Redpanda configuration. That Redpanda configuration is generated in helm and sotred as config map which should not hold any credentails.
Newer version can take HTTP basic auth header to impersonate user and authenticate against Redpanda Kafka listener.
Additionally HTTP proxy and schema registry tests now are run when SASL is enabled