-
Notifications
You must be signed in to change notification settings - Fork 227
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
Pulsar Manager Initialization and Securing of Admin Secrets #448
Pulsar Manager Initialization and Securing of Admin Secrets #448
Conversation
Please have a look @lhotari, this also addresses some of the issues you mentioned regarding the admin port exposure. |
{{/* create environment */}} | ||
{{- if or (not .Values.tls.enabled) (not .Values.tls.broker.enabled) }} | ||
BROKER_URL="http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Values.broker.ports.http }}" | ||
BOOKIE_URL="http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Values.broker.ports.pulsar }}" |
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 also tried to use .Values.bookie.component with any of the ports under .Values.bookie.ports, but none worked. However, .Values.bookie.component worked with .Values.broker.ports.pulsar ???
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 don't see how it could work with broker's component and port. More comments below.
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.
Please address the review comments.
Thanks for the contribution @Mortom123 ! This will be a great improvement to Apache Pulsar Helm chart! |
3530530
to
3a1dc04
Compare
@lhotari I updated with your feedback and decided to also reduce the complexity of the secret by only use a single username/password for the UI / DB. I don't see much advantage of having separate ones there. I allowed for manual overwrite of secret values, similar to kube-prometheus-stack, but the default (empty password) is a randomly generated password. I removed During this I also wondered why we have such flexibility for the names for of the components. Most of the things are setup using |
I think having a single username/password for both UI & DB is simply a very bad practice. It's better to have separate passwords. It's not that much additional overhead to add it now and follow good practices.
That part looks really good!
Perhaps a simple HTTP request with curl & grep would do the job? That could be added in a similar way as the Pulsar Functions tests: pulsar-helm-chart/.ci/chart_test.sh Lines 77 to 80 in 24b80c1
You would add this to .ci/chart_test.sh and .ci/helm.sh files. In addition there would need to be a test scenario in the GitHub Actions workflow matrix configured in https://github.com/apache/pulsar-helm-chart/blob/master/.github/workflows/pulsar-helm-chart-ci.yaml#L170 with respective values file in .ci/clusters directory.When you run the CI jobs in your own fork (by enabling GitHub Actions) and opening a PR to your own fork, you can debug GitHub Actions by logging in by ssh. ssh access is only for your ssh public keys registered in GH, it's https://github.com/Mortom123.keys for you. There's a step in the build that will print the command for connecting with ssh. example from a build in my fork: Once you have ssh access, you can debug things to see what problems there are in the CI environment.
+1, pulsar-manager integration has been poor so I'm not concerned about the possible breaking change.
I guess this is some of the legacy baggage of the chart. As long as there's a backwards compatible way to improve things gradually, we can do that. |
charts/pulsar/values.yaml
Outdated
user: pulsar | ||
password: pulsar | ||
username: "pulsar" | ||
password: "" # leave empty for random password |
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.
Linting failed on this line: 1337:18 [comments] too few spaces before comment
@lhotari I added both credentials as well as CI tests. But the tests have some problems:
There are now a couple of ways to fix this:
I would prefer to wait for all jobs to complete during install. But what do you or @frankjkelly think? |
Closing and re-opening to trigger a new build |
Closing and re-opening once again to get a fix for the linting job in CI. |
@lhotari i think the build wont work yet. because the job that initializes the manager is not run in timed / waited for, see #448 (comment) |
I guess the reason has been that Another reason for not using |
603e8d3
to
15c0876
Compare
@Mortom123 if you'd like to debug the issue, it's best to create a PR to your own fork since that will activate ssh access to the build VM.
It requires a pull request currently and won't work for manually triggered jobs in your fork. |
I wonder if upgrading the image to v0.4.0 would help? pulsar-helm-chart/charts/pulsar/values.yaml Line 187 in 1f20887
|
Alright. I will try to do so. :) @lhotari |
@Mortom123 have you figured out how to use the ssh access to the build? that makes the feedback loop much faster when you have a shell inside a build VM and you can try out different things and debug issues directly. For example, there's |
02058b7
to
1f20887
Compare
I will try debugging on my Repo for now and submit a clean PR once its done. |
See #438 / #438 (comment) 3.PR
Also the Pulsar-Manager Admin interface is exposed on a different, non outward facing, service because of given concerns.
Motivation
Right now you need to initialize the pulsar-manager manually, this can be done as an init job.
Modifications
Verifying this change
Some things I also noted: