Skip to content
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

[Thanos] Use existing secret for thanos objstore config #979

Conversation

samuel-begin
Copy link
Contributor

@samuel-begin samuel-begin commented Nov 21, 2019

Q A
Bug fix? no
New feature? yes
API breaks? no
Deprecations? no

What's in this PR?

Added new key in objstore section

# Existing secret containing the configuration
objstoreSecretOverride: "my-storage-config"

This setting affect the creation of the secret and their references in bucket, compact and store deployments.

It is empty by default so there are no breaking changes

Why?

In order to use the same secret for thanos and prometheus charts, we must provide a way to get the objstore config form an existing secret. Prometheus is already setup that way, so this PR is a natural extension which completes the set.

Checklist

  • User guide and development docs updated (if needed)
  • Related Helm chart(s) updated (if needed)

samuel-begin and others added 2 commits November 21, 2019 10:35
Co-authored-by: icosamuel <begs1307@gmail.com>
@tarokkk
Copy link
Contributor

tarokkk commented Nov 26, 2019

The intent is great but usually adding some existing resource to a Chart is done by adding overrides.

In this PR I would love to see

objstoreSecretOverride: ""

If it exists we can mount that secret and use the name from the variable and we don't need a bool variable for checking if we want to use it.

{{- if .Values.objstoreSecretOverride }}
  secretName: "{{ .Values.objstoreSecretOverride }}"
{{- else }}

@samuel-begin
Copy link
Contributor Author

Thank you @tarokkk

Coming from the stable helm repo, It's the first time I see an override pattern mentioned. Usually, its all about existing resources (secrets, pvcs, configmaps, etc).

That being said, I fitted the changes to your standards and updated the doc accordingly

Copy link
Contributor

@tarokkk tarokkk left a comment

Choose a reason for hiding this comment

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

Thank you for the change!

Copy link
Contributor

@ahma ahma left a comment

Choose a reason for hiding this comment

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

Thanks @samuel-begin LGTM

@tarokkk tarokkk merged commit 0e65e91 into banzaicloud:master Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants