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
Finish proposal for Dynamic Instances #224
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
kep-number: 2 | ||
title: Dynamic Instances | ||
authors: | ||
- "@gerred" | ||
owners: | ||
- "@gerred" | ||
editor: TBD | ||
creation-date: 2019-02-14 | ||
last-updated: 2019-05-10 | ||
status: implementable | ||
--- | ||
|
||
# Framework-specific Dynamic Custom Resource Definitions | ||
|
||
## Table of Contents | ||
|
||
- [Framework-specific Dynamic Custom Resource Definitions](#framework-specific-dynamic-custom-resource-definitions) | ||
- [Table of Contents](#table-of-contents) | ||
- [Summary](#summary) | ||
- [Motivation](#motivation) | ||
- [Goals](#goals) | ||
- [Non-Goals](#non-goals) | ||
- [Proposal](#proposal) | ||
- [Risks and Mitigations](#risks-and-mitigations) | ||
- [Implementation History](#implementation-history) | ||
|
||
## Summary | ||
|
||
This KEP aims to make the end user experience for operators more specific to the business domain they represent. By implementing dynamic CRDs, operators will be able to represent their components in a declarative way, specific to their framework. Additionally, it enables framework developers to provide day 2 operations tasks as CRDs, complete with their own plans and tasks. | ||
|
||
## Motivation | ||
|
||
Currently, the interface for using operators in KUDO is very generic. Users create an `Instance` CRD with specs. Operator developers and users expect to be able to use contextual business objects for their operators instead of generic objects. This enables a more focused experience for users of KEP. | ||
|
||
The goal of this KEP is to improve the end user UX through dynamic CRDs. Other than the ability to specfiy CRDs, and adjusting existing framework development CRDs to accomodate this change, it is not the goal of this KEP to change the framework development UX. | ||
|
||
### Goals | ||
|
||
- Create a mechanism for framework developers to specify a CRD | ||
- Enable management for custom resources based on dynamic CRDs. Deploying a framework specific custom resource should deploy a plan as `Instance` was able to before. | ||
|
||
### Non-Goals | ||
|
||
- Change the framework developer UX for templates, parameters, tasks, and plans. | ||
|
||
## Proposal | ||
|
||
Currently, there are issues with CRD storage in Kubernetes that lead to watches not cancelling when a CRD is uninstalled. The related fix for this in Kubernetes will be part of https://github.com/kubernetes/kubernetes/issues/68508. Implementing this KEP will be divided into 5 steps, based on the state of [Kubernetes CRDs achieving General Availability status](https://github.com/kubernetes/kubernetes/issues/58682) and https://github.com/kubernetes/kubernetes/issues/68508: | ||
|
||
1. Continue using Instance CRD | ||
|
||
2. Change the Instance CRD to a struct that does not change when migrating between Instance and CRD. This struct would be similar to: | ||
|
||
```go | ||
type Instance struct{ | ||
metadata metav1.ObjectMeta | ||
apiVersion string | ||
spec struct{ | ||
Framework *string | ||
Version string | ||
Arguments map[string]string | ||
} | ||
} | ||
|
||
``` | ||
|
||
3. Add a package for the CLI to use that abstracts the details of generating out the CRD on install. The CLI will use this package. | ||
|
||
After the Kubernetes changes land: | ||
|
||
4. Write an Instance to Dynamic Instance migrator. This will statically convert Instance templates to their corresponding Dynamic Instance CRD for use by operators. | ||
5. Add a Mutating Admission Controller that converts Instance CRDs to their corresponding Dynamic Instance. This enables GitOps users to continue operating as they do today without breaking their pipelines. | ||
|
||
### Risks and Mitigations | ||
|
||
The primary risk of this is that a fix for graceful deletion of CRDs never lands, or takes too long to land. In that instance, we would consider building a KUDO api-server as an aggregated or standalone API. | ||
|
||
## Implementation History | ||
|
||
- `Summary`, `Motivation`, and `Goals` being merged. | ||
- Add Proposal and Risks |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
"implementing dynamic CRDs" -> did you mean "Instances"?
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.
yep. find and replace fail.