-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refactoring S3 config #51
Conversation
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.
see comments
submit_cmd.push(format!("--conf spark.hadoop.fs.s3a.endpoint={}", endpoint)); | ||
if self.spec.s3.is_some() { | ||
submit_cmd.push( | ||
"--conf spark.hadoop.fs.s3a.endpoint=http://${BUCKET_HOST}:${BUCKET_PORT}/" |
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.
http://
as a hard-coded protocol doesn't look right. Have you tried s3a://
instead ?
Also, since we are adding this, why not add all other s3a related properties as documented here https://spark.apache.org/docs/latest/running-on-kubernetes.html#dependency-management
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.
it works with http, but I'll try with s3a.
why not add the other properties?
That wasn't really in the scope of the ticket ;) But we could add more. This was mostly about making things more unified among operators.
@@ -365,6 +382,21 @@ fn env_var_from_secret(var_name: &str, secret: &str, secret_key: &str) -> EnvVar | |||
} | |||
} | |||
|
|||
fn env_var_from_config_map(var_name: &str, config_map: &str, config_map_key: &str) -> EnvVar { |
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.
Another candidate for the operator-rs
:)
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.
We already added something like this recently: stackabletech/operator-rs#370
But it's a function on the ContainerBuilder. And in the end I decided against using the functions like this because it would make the code worse. And Sebastian and I didn't want two ways to do the same thing to keep the operators more "the same". In the end I decided to use the function here with the thought "this operator is different from all the others"
Hi ho, I'm not that into the whole S3 refactoring going on here. I'm just dropping some ideas with no requirement to fulfill them ;)
The |
I think we can close this without merging |
Description
fixes #49
Review Checklist
Once the review is done, comment
bors r+
(orbors merge
) to merge. Further information