-
Notifications
You must be signed in to change notification settings - Fork 705
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
Add more helm custom fields #5622
Add more helm custom fields #5622
Conversation
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
✅ Deploy Preview for kubeapps-dev canceled.Built without sensitive environment variables
|
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
|
||
// TODO | ||
ProxyOptions proxy_options = 5; | ||
|
||
// TODO | ||
map<string, string> node_selector = 6; | ||
|
||
// TODO | ||
repeated Toleration tolerations = 7; | ||
|
||
// TODO | ||
PodSecurityContext security_context = 8; |
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.
New options for the Helm plugin (repos API)
[will add the description soon, I just wanted to share my approach with you ASAP]
// Extracted from the K8s API to avoid a dependency on the K8s API | ||
// https://github.com/kubernetes/api/blob/master/core/v1/generated.proto | ||
message PodSecurityContext { | ||
optional int64 run_as_user = 1; | ||
optional int64 run_as_group = 6; | ||
optional bool run_as_non_root = 3; | ||
repeated int64 supplemental_groups = 4; | ||
optional int64 f_s_group = 5; | ||
|
||
// TODO(agamez): more complex fields are not supported yet | ||
// optional SELinuxOptions seLinuxOptions = 1; | ||
// optional WindowsSecurityContextOptions windowsOptions = 8; | ||
// repeated Sysctl sysctls = 7; | ||
// optional string fsGroupChangePolicy = 9; | ||
// optional SeccompProfile seccompProfile = 10; | ||
} |
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.
As I said in the PR description, I only kept the most simple fields. This is preventing us from importing the whole proto document from k8s.
Signed-off-by: Antonio Gamez Diaz <[email protected]> Conflicts: cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm.pb.gw.go
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]> Conflicts: cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm.pb.go cmd/kubeapps-apis/plugins/helm/packages/v1alpha1/repositories.go
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
…8-addMoreHelmFields
Signed-off-by: Antonio Gamez Diaz <[email protected]>
Signed-off-by: Antonio Gamez Diaz <[email protected]>
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, after a rebase/resolve. Thanks Antonio!
cmd/kubeapps-apis/plugins/helm/packages/v1alpha1/repositories.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Antonio Gamez Diaz <[email protected]> Conflicts: chart/kubeapps/README.md cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json
Co-authored-by: Michael Nelson <[email protected]> Signed-off-by: Antonio Gámez, PhD <[email protected]>
I've just merged main again and fixed the conflict. Should be good to land once tests pass. |
Signed-off-by: Michael Nelson <[email protected]>
Description of the change
This PR brings more custom fields to the Helm plugin (repos API). Specifically, I've mimicked the currently customizable values through the
values.yaml
file. That is:tolerations
,nodeSelector
,securityContext
andproxyOptions
.Notwithstanding, users were able to set their custom
PodTemplateSpec
for the sync job in the old fashion way, but there's too much information to be included as a custom value in the repos API. But why?Well, since we are generating code from the grpc messages, if we define a
pod_template_spec
field of typePodTemplateSpec
in the grpc proto file.... we need to have the corresponding type defined.In doing so, there's two alternatives: 1) using an existing definition and importing it using Buf (via BSR) or 2) maintaining ourselves the grpc messages definition.
I've gone with option 2.2, but simplifying the fields we support. Just 1 or 2 objects having simple types like string or bool.
I'm adding some PR review messages to highlight what I mean.
That said, I'm open to any other better ideas you may have.
On the other hand, there's a separate issue: what should we display in the Repos UI?
Well, in this case, I've opted for just showing the proxy options. The rest of the fields are just related to the PodTemplateSpec and I feel they are too complex for even advanced users. If someone really wants to tune them up, they can just go an invoke the API.
Benefits
Users will be able to customize the proxy options (along with a few other options) via the repos API instead of just using the chart
initialRepos
field.Possible drawbacks
Not every custom field is available through the UI, but I don't really think we want to.
Applicable issues
SyncJobTemplate
options to the API #5128Additional information
N/A