Skip to content
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

[proposal] Add support for user-defined podTemplate #179

Closed
andreaTP opened this issue Jul 25, 2022 · 1 comment
Closed

[proposal] Add support for user-defined podTemplate #179

andreaTP opened this issue Jul 25, 2022 · 1 comment

Comments

@andreaTP
Copy link
Member

Problem

The user wants to configure a "Kubernetes-specific" setting or add some "infrastructure" to the Deployment created by this operator to fit their own Kubernetes installation needs.
Common use cases are:

  • add extra labels/annotations
  • specify requests/limits
  • mount extra volumes
  • add a sidecar/init container
  • specify tolerations
  • etc...

Relevant open issues:

Motivation

It's hard to predict which "kubernetes features" will be used by users and it's extremely tedious and time-consuming to add them one by one.

Proposal

This proposal proposes a "catch-all" workaround to enable all of those cases removing the need for code changes and manual integration.
More specifically I'm here proposing to support the entire Kubernetes podTemplate to be merged on top of the Deployment currently generated by this operator.
podTemplate have been demonstrated flexible enough to support most of the users needs without the need for special encodings.

Relevant examples:

PROS:

  • covers all the known use-cases and more

CONS:

  • inexperienced users might accidentally compromise functionalities of the operator
  • hard if not impossible to predict how all the fields will interact with the default options
  • confusion as there are already a few options encoded in the top level of the CRD

Mitigation

A clear documentation regarding this feature and/or a strong advice to use it only after proper testing might help.

Technical implementation notes

Additional challenge

The implementation of podTemplate cannot be easily done automatically as there are a few invariants e.g.:

  • when defining property on the container 0 we need to override container 0 fields
  • when defining extra containers they should be appended
  • when defining commands/args etc. the entire list should be substituted

Experience proves that a careful first implementation of this feature rarely requires complex maintenance.

@andreaTP andreaTP changed the title [proposal] Add support for user-defined podTemplate [proposal] Add support for user-defined podTemplate Jul 25, 2022
@jsenko
Copy link
Member

jsenko commented Jun 12, 2023

Resolved by #212

@jsenko jsenko closed this as completed Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants