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

feat(generic controller): expose methods to support custom resources that like to define the attachments #140

Open
AmitKumarDas opened this issue Apr 29, 2020 · 1 comment
Labels
config design How Metac works enhancement New feature or request gctl Generic Controller

Comments

@AmitKumarDas
Copy link
Owner

AmitKumarDas commented Apr 29, 2020

ProblemStatement: GenericController serves the purpose of being used as a config file to define the watch & attachments required to implement the reconciliation logic for any CustomResource. However, for certain use cases, it seems better to delegate definition of attachments to specific CustomResource specs instead of being defined in GenericController specs. GenericController is thus left with the watch definition only.

The use cases that will need this feature are the ones where the attachment kinds are dynamic & can be defined as well as removed by users of the CustomResource.

This also means individual CustomResource's hooks need to be more involved in the reconciliation process. In other words, these hooks will take up the additional responsibility of managing the desired state themselves instead of the current way of metac handling the desired state.

This issue tracks the possibility of exposing methods in metac that allows these hooks to invoke this desired state handling logic.

@AmitKumarDas AmitKumarDas added design How Metac works enhancement New feature or request gctl Generic Controller labels Apr 29, 2020
@AmitKumarDas AmitKumarDas changed the title feat(generic controller): expose methods to support custom resources that define the attachments feat(generic controller): expose methods to support custom resources that like to define the attachments Apr 29, 2020
@AmitKumarDas
Copy link
Owner Author

Thinking more on this, GenericController configs can be loaded dynamically from kubernetes ConfigMap instead of the solution proposed above.

Proposed Solution

Metac will be run on local mode. In this mode, metac reads the generic controller config files mounted at specified location. As an enhancement, metac can additionally read these config files from kubernetes config map. This lets end users make use of config map for cases where generic controller spec needs to be set depending on custom controller's desired state needs. This also avoids the need to manage the desired state logic in controller's hook logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config design How Metac works enhancement New feature or request gctl Generic Controller
Projects
None yet
Development

No branches or pull requests

1 participant