-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove mtp #282
base: remove-loki-datasource-on-capi
Are you sure you want to change the base?
Remove mtp #282
Conversation
f5e44b1
to
b0369fd
Compare
21e2a47
to
f3b778f
Compare
7e0ffc0
to
ec5c003
Compare
e0b2692
to
64ab01f
Compare
ec5c003
to
df4a0a5
Compare
64ab01f
to
2a4df29
Compare
2a4df29
to
b10f59c
Compare
url = nonsensitive(remote.kubernetes.secret.credentials.data["logging-url"]) | ||
max_backoff_period = "{{ .MaxBackoffPeriod }}" | ||
tenant_id = env("{{ .TenantIDEnvVarName }}") | ||
tenant_id = nonsensitive(remote.kubernetes.secret.credentials.data["logging-tenant-id"]) | ||
|
||
basic_auth { | ||
username = env("{{ .BasicAuthUsernameEnvVarName }}") | ||
password = env("{{ .BasicAuthPasswordEnvVarName }}") | ||
username = nonsensitive(remote.kubernetes.secret.credentials.data["logging-username"]) | ||
password = remote.kubernetes.secret.credentials.data["logging-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.
Can we please define the keys in a single place and then pass them around, just that we avoid any mistake or don't forget to update a set of keys in the future.
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 open to ideas on this because I've no clue how to do this
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.
That's a template so we can just inject those names like this
password = remote.kubernetes.secret.credentials.data["{{ .LoggingPasswordKey }}"]
And then passing this new LoggingPasswordKey
as field to the template data.
// listWriteUsers returns a map of users found in a credentialsSecret | ||
func listWriteUsers(credentialsSecret *v1.Secret) []string { | ||
var usersList []string | ||
for myUser := range credentialsSecret.Data { | ||
// bypass read user | ||
if myUser != common.ReadUser { | ||
usersList = append(usersList, myUser) | ||
} | ||
} | ||
|
||
return usersList | ||
} |
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 we are storing all read and write users in the same place how do we know later on what's a reader and what's a writer ?
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 read user is actually just called read
as in, it's his username hence this if myUser != common.ReadUser
part.
Other than that, the rest are write users. The goal of this new code is to only have write users as the read user will only be grafana anyway with the new multi org
Co-authored-by: Théo Brigitte <theo.brigitte@gmail.com>
@TheoBrigitte it should be fine now |
a86145f
to
614f23e
Compare
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.
LGTM
27b0f51
to
6dae2e4
Compare
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
What this PR does / why we need it
Towards giantswarm/roadmap#3726
This PR switches from mtp to loki ingress for authentication
It also changes the way we configure the alloy secrets to be able to change the values when we update them on the clusters as the config reloader does not handle evn variable changes
Checklist