-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Fixes #10234 - Postgres SSL Certificate fix #10300
Conversation
@reddymh have you tested this on your end? |
WORKDIR /home/argo | ||
|
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.
do we really need this? can't we use absolute paths for files in persist/sqldb/sqldb.go
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.
WorkDir is needed to refer to where all the binary and files need to be copied. Can we config the path?
config/config.go
Outdated
SSL bool `json:"ssl,omitempty"` | ||
SSLMode string `json:"sslMode,omitempty"` | ||
CaCertSecret apiv1.SecretKeySelector `json:"caCertSecret,omitempty"` | ||
ServerCertSecret apiv1.SecretKeySelector `json:"serverCertSecret,omitempty"` | ||
ServerKeySecret apiv1.SecretKeySelector `json:"serverKeySecret,omitempty"` |
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 you fix the lint here please https://github.com/argoproj/argo-workflows/actions/runs/3832454101/jobs/6522907398
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.
@rohankmr414 tried in visual studio and not getting any lint error but again I will cross check on lint errors.
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 you run make lint
in the repo directory? That'll fix it
persist/sqldb/sqldb.go
Outdated
@@ -53,9 +54,44 @@ func CreatePostGresDBSession(kubectlConfig kubernetes.Interface, namespace strin | |||
} | |||
|
|||
if cfg.SSL { | |||
if cfg.SSLMode != "" { | |||
if cfg.SSLMode != "" && cfg.SSLMode != "disable" { | |||
pgCertPath := "./pgcerts" |
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 use the absolute path here and get rid of WORKDIR /home/argo
from Dockerfile?
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.
@rohankmr414 we ca use absolute path. I thought argo server already using workdir in Dockerfile so I thought same thing we can use for argo controller.
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 any issues with it as well, it's just an extra change that can be avoided.
cc: @sarabala1979
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 add another element in structs to configure the path and have a default value too?
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.
@sarabala1979 @rohankmr414 then we need to use constructor for this field in the struct.
Do you need this change?
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.
@reddymh yes you can add a field to the spec
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.
@rohankmr414 / @sarabala1979 added field to the spec and default vault if the variable is not configured in configmap or not defined.
Please review and approve the same
can you also sign off your commits for DCO https://github.com/argoproj/argoproj/blob/master/community/CONTRIBUTING.md#legal |
yes . we have tested and running in prod as well |
I have added signoff but still showing DCO - action required |
config/config.go
Outdated
SSL bool `json:"ssl,omitempty"` | ||
SSLMode string `json:"sslMode,omitempty"` | ||
CaCertSecret apiv1.SecretKeySelector `json:"caCertSecret,omitempty"` | ||
ServerCertSecret apiv1.SecretKeySelector `json:"serverCertSecret,omitempty"` |
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.
This field and the next are mapped to the sslcert
and sslkey
options in the PostgreSQL connection options. The PostgreSQL documentation defines them as client certificate and key filename, so naming them server cert and server key is incorrect.
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.
@vladlosev changed the ServerCertSecret and ServerKeySecret as ClientCertSecret and ClientCertSecret and will change respective helm chart as well.
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.
Head branch was pushed to by a user without write access
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.
FWIW
|
0eaaad7
to
b0354e7
Compare
f998315
to
6d4bcb3
Compare
Signed-off-by: Rajshekar Reddy <reddymh@gmail.com>
Signed-off-by: Rajshekar Reddy <reddymh@gmail.com>
Signed-off-by: Rajshekar Reddy <reddymh@gmail.com>
@rohankmr414 @sarabala1979 @vladlosev Can we merge the PR? |
Signed-off-by: Rajshekar Reddy <reddymh@gmail.com>
Signed-off-by: Rajshekar Reddy <reddymh@gmail.com> Signed-off-by: goshado <goshatoo@gmail.com>
Signed-off-by: Rajshekar Reddy reddymh@gmail.com
Fixes #10234
Please do not open a pull request until you have checked ALL of these:
make pre-commit -B
to fix codegen and lint problems.If changes were requested, and you've made them, dismiss the review to get it reviewed again.