豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

fix(helm): Include option to use Redis with SSL#26663

Merged
craig-rueda merged 19 commits intoapache:masterfrom
shakeelansari63:master
Feb 9, 2024
Merged

fix(helm): Include option to use Redis with SSL#26663
craig-rueda merged 19 commits intoapache:masterfrom
shakeelansari63:master

Conversation

@shakeelansari63
Copy link
Copy Markdown
Contributor

@shakeelansari63 shakeelansari63 commented Jan 18, 2024

SUMMARY

Updated Helm Chart to allow connection to Redis Server which enforce SSL connection. For example, Azure managed Redis Cache enforce connection through ssl only.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

Comment thread helm/superset/templates/_helpers.tpl Outdated
@shakeelansari63
Copy link
Copy Markdown
Contributor Author

I have user CACHE_REDIS_URL instead of CACHE_REDIS_HOST

Here are some sample examples of rendered templates..

1. No Password and No SSL

values.yaml
image

Rendered Template
1 no-password_no-ssl

2. With Password and No SSL

values.yaml
image

Rendered Template
2 password_no-ssl

3. No Password and With SSL (ssl_cert_reqs = CERT_NONE)

values.yaml
image

Rendered Template
3 no-password_ssl_cert-none

4. With Password and With SSL (ssl_cert_reqs = CERT_NONE)

values.yaml
image

Rendered Template
4 password_ssl_cert-none

5. With Password and With SSL (ssl_cert_reqs = CERT_OPTIONAL)

values.yaml
image

Rendered Template
5 password_ssl_cert-optional

Comment thread helm/superset/templates/_helpers.tpl Outdated
@dpgaspar
Copy link
Copy Markdown
Member

can you please rebase if bump the chart version again to fix the conflict

@shakeelansari63
Copy link
Copy Markdown
Contributor Author

can you please rebase if bump the chart version again to fix the conflict

Sure, will do it shortly

@shakeelansari63
Copy link
Copy Markdown
Contributor Author

shakeelansari63 commented Jan 22, 2024

@dpgaspar , Rebased and bumped the chart version to 0.12.1

Comment thread helm/superset/templates/_helpers.tpl Outdated
@shakeelansari63
Copy link
Copy Markdown
Contributor Author

So I have added 2 new Parameters in Values which will translate to 2 new Environment variables.
Also bumped up the chart version.

With Default Config

values.yaml
image

Generated secret-env.yaml
image

Generated secret-superset-config.yaml
Screenshot_20240126_155331

With modified config

values.yaml
image

Generated secret-env.yaml
image

Generated secret-superset-config.yaml
image

@shakeelansari63 shakeelansari63 changed the title Fix(Helm): Include option to use Redis with SSL fix(Helm): Include option to use Redis with SSL Jan 26, 2024
@shakeelansari63 shakeelansari63 changed the title fix(Helm): Include option to use Redis with SSL fix(helm): Include option to use Redis with SSL Jan 26, 2024
Comment thread helm/superset/templates/secret-env.yaml Outdated
@shakeelansari63
Copy link
Copy Markdown
Contributor Author

Default Config without Redis SSL and Redis Password

values.yaml
image

Rendered secret-env.yaml
image

Rendered superset-config.py under secret-superset-config.yaml
image

Updated Config with Redis SSL and Redis Password

values.yaml
image

Rendered secret-env.yaml
image

Rendered superset-config.py under secret-superset-config.yaml
image

@shakeelansari63
Copy link
Copy Markdown
Contributor Author

Hey guys, can you please review the code and tell me if you feel anything else should be changed...

Comment thread helm/superset/templates/_helpers.tpl Outdated
Copy link
Copy Markdown
Member

@craig-rueda craig-rueda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. I just left one more comment and I think @dpgaspar has one as well

Comment thread helm/superset/templates/_helpers.tpl Outdated
@shakeelansari63
Copy link
Copy Markdown
Contributor Author

Hey guys, can you please suggest if any further change is needed?

@rusackas
Copy link
Copy Markdown
Member

rusackas commented Feb 8, 2024

Re-running CI, while @craig-rueda and @dpgaspar review the requested changes. 🤞

Copy link
Copy Markdown
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there!

you need to update the README.md

 | supersetNode.connections.db_pass | string | `"superset"` |  |
 | supersetNode.connections.db_port | string | `"5432"` |  |
 | supersetNode.connections.db_user | string | `"superset"` |  |
+| supersetNode.connections.redis_cache_db | string | `"1"` |  |
+| supersetNode.connections.redis_celery_db | string | `"0"` |  |
 | supersetNode.connections.redis_host | string | `"{{ .Release.Name }}-redis-headless"` | Change in case of bringing your own redis and then also set redis.enabled:false |
 | supersetNode.connections.redis_port | string | `"6379"` |  |
+| supersetNode.connections.redis_ssl.enabled | bool | `false` |  |
+| supersetNode.connections.redis_ssl.ssl_cert_reqs | string | `"CERT_NONE"` |  |
+| supersetNode.connections.redis_user | string | `""` |  |
 | supersetNode.containerSecurityContext | object | `{}` |  |
 | supersetNode.deploymentAnnotations | object | `{}` | Annotations to be added to supersetNode deployment |
 | supersetNode.deploymentLabels | object | `{}` | Labels to be added to supersetNode deployment |

@shakeelansari63
Copy link
Copy Markdown
Contributor Author

Almost there!

you need to update the README.md

 | supersetNode.connections.db_pass | string | `"superset"` |  |
 | supersetNode.connections.db_port | string | `"5432"` |  |
 | supersetNode.connections.db_user | string | `"superset"` |  |
+| supersetNode.connections.redis_cache_db | string | `"1"` |  |
+| supersetNode.connections.redis_celery_db | string | `"0"` |  |
 | supersetNode.connections.redis_host | string | `"{{ .Release.Name }}-redis-headless"` | Change in case of bringing your own redis and then also set redis.enabled:false |
 | supersetNode.connections.redis_port | string | `"6379"` |  |
+| supersetNode.connections.redis_ssl.enabled | bool | `false` |  |
+| supersetNode.connections.redis_ssl.ssl_cert_reqs | string | `"CERT_NONE"` |  |
+| supersetNode.connections.redis_user | string | `""` |  |
 | supersetNode.containerSecurityContext | object | `{}` |  |
 | supersetNode.deploymentAnnotations | object | `{}` | Annotations to be added to supersetNode deployment |
 | supersetNode.deploymentLabels | object | `{}` | Labels to be added to supersetNode deployment |

Yes, Just saw the failed CI task and updated this.

@rusackas
Copy link
Copy Markdown
Member

rusackas commented Feb 8, 2024

Thanks for the quick turnaround. Go, CI, go!!!

@pull-request-size pull-request-size bot added size/XL and removed size/M labels Feb 8, 2024
@shakeelansari63
Copy link
Copy Markdown
Contributor Author

@rusackas , please trigger ci again , I had missed to update helm version in readme

@pull-request-size pull-request-size bot added size/M and removed size/XL labels Feb 8, 2024
@shakeelansari63
Copy link
Copy Markdown
Contributor Author

Yay .. All CI Checks finally completed 🥳

Copy link
Copy Markdown
Member

@craig-rueda craig-rueda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@craig-rueda craig-rueda merged commit f59498f into apache:master Feb 9, 2024
REDIS_PASSWORD: {{ .Values.supersetNode.connections.redis_password | quote }}
{{- end }}
REDIS_PORT: {{ .Values.supersetNode.connections.redis_port | quote }}
REDIS_PROTO: {{ if .Values.supersetNode.connections.redis_ssl.enabled }}"rediss"{{ else }}"redis"{{ end }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has broken those w/o generating the default secret, which is a very common use case to manage secrets separately (rather than relying on the Helm chart).

This kind of backward compatibility should have been implemented somewhere else, and it's not a good practice not to even document/mention this feature/behavior change at all.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution was to add the new REDIS_PROTO in the managed secret. However, it was a hassle to root cause it, due to lacking of documentation.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.0.0 First shipped in 4.0.0 labels Apr 17, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 4.0.0 First shipped in 4.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants