-
Notifications
You must be signed in to change notification settings - Fork 38
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
Issue 280: Read InfluxDB credentials from a secret #563
Conversation
Signed-off-by: anishakj <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #563 +/- ##
==========================================
+ Coverage 73.29% 74.56% +1.26%
==========================================
Files 15 15
Lines 4093 4144 +51
==========================================
+ Hits 3000 3090 +90
+ Misses 967 932 -35
+ Partials 126 122 -4
Continue to review full report at Codecov.
|
Signed-off-by: anishakj <[email protected]>
pkg/apis/pravega/v1beta1/pravega.go
Outdated
@@ -228,6 +228,9 @@ type PravegaSpec struct { | |||
|
|||
// Details of authplugin to be copied into pravega controller | |||
AuthImplementations *AuthImplementationSpec `json:"authImplementations,omitempty"` | |||
|
|||
// Name of Secret containing Password based Authentication Parameters like username, 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.
description should specify that this secret is specific to the influxdb credentials
@@ -276,6 +277,20 @@ func configureControllerAuthSecrets(podSpec *corev1.PodSpec, p *api.PravegaClust | |||
} | |||
} | |||
|
|||
func configureControllerInfluxDBSecrets(podSpec *corev1.PodSpec, p *api.PravegaCluster) { | |||
if p.Spec.Pravega.InfluxDBSecret != "" { | |||
addSecretVolumeWithMount(podSpec, p, influxDBSecretVolumeName, p.Spec.Pravega.InfluxDBSecret, |
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.
could we consider accepting the mount path as a property from the user instead of hardcoding its value in a constant?
Signed-off-by: anishakj <[email protected]>
Signed-off-by: anishakj <[email protected]>
Signed-off-by: anishakj <[email protected]>
…into issue-influxdb-secret
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
Signed-off-by: anishakj [email protected]
Change log description
Added a new field
InfluxDBSecret
in Pravega spec, so that users can mention the secret names rather than passing username/password as plain text.Purpose of the change
Fixes #280
What the code does
It will read the secret from the user, and if it is mentioned secret is mounted in controller and segment store pods at
/etc/influxdb-secret-volume/
How to verify it
Verified that secret is mounted at controller and segment store pods.