|
| 1 | +--- |
| 2 | +title: Proposal Template |
| 3 | +authors: |
| 4 | + - "@enxebre" |
| 5 | + - "@joelspeed" |
| 6 | + - "@alexander-demichev" |
| 7 | +reviewers: |
| 8 | + - "@vincepri" |
| 9 | + - "@randomvariable" |
| 10 | + - "@CecileRobertMichon" |
| 11 | + - "@yastij" |
| 12 | + |
| 13 | +creation-date: 2021-02-03 |
| 14 | +last-updated: 2021-02-03 |
| 15 | +status: implementable |
| 16 | +see-also: |
| 17 | +replaces: |
| 18 | +superseded-by: |
| 19 | +--- |
| 20 | + |
| 21 | +# Unmanaged infrastucture |
| 22 | + |
| 23 | +## Table of Contents |
| 24 | + |
| 25 | +A table of contents is helpful for quickly jumping to sections of a proposal and for highlighting |
| 26 | +any additional information provided beyond the standard proposal template. |
| 27 | +[Tools for generating](https://github.com/ekalinin/github-markdown-toc) a table of contents from markdown are available. |
| 28 | + |
| 29 | +- [Title](#title) |
| 30 | + - [Table of Contents](#table-of-contents) |
| 31 | + - [Glossary](#glossary) |
| 32 | + - [Summary](#summary) |
| 33 | + - [Motivation](#motivation) |
| 34 | + - [Goals](#goals) |
| 35 | + - [Non-Goals/Future Work](#non-goalsfuture-work) |
| 36 | + - [Proposal](#proposal) |
| 37 | + - [User Stories](#user-stories) |
| 38 | + - [Story 1](#story-1) |
| 39 | + - [Story 2](#story-2) |
| 40 | + - [Requirements (Optional)](#requirements-optional) |
| 41 | + - [Functional Requirements](#functional-requirements) |
| 42 | + - [FR1](#fr1) |
| 43 | + - [FR2](#fr2) |
| 44 | + - [Non-Functional Requirements](#non-functional-requirements) |
| 45 | + - [NFR1](#nfr1) |
| 46 | + - [NFR2](#nfr2) |
| 47 | + - [Implementation Details/Notes/Constraints](#implementation-detailsnotesconstraints) |
| 48 | + - [Security Model](#security-model) |
| 49 | + - [Risks and Mitigations](#risks-and-mitigations) |
| 50 | + - [Alternatives](#alternatives) |
| 51 | + - [Upgrade Strategy](#upgrade-strategy) |
| 52 | + - [Additional Details](#additional-details) |
| 53 | + - [Test Plan [optional]](#test-plan-optional) |
| 54 | + - [Graduation Criteria [optional]](#graduation-criteria-optional) |
| 55 | + - [Version Skew Strategy [optional]](#version-skew-strategy-optional) |
| 56 | + - [Implementation History](#implementation-history) |
| 57 | + |
| 58 | +## Glossary |
| 59 | + |
| 60 | +Refer to the [Cluster API Book Glossary](https://cluster-api.sigs.k8s.io/reference/glossary.html). |
| 61 | + |
| 62 | +If this proposal adds new terms, or defines some, make the changes to the book's glossary when in PR stage. |
| 63 | + |
| 64 | +## Summary |
| 65 | + |
| 66 | +This proposal introduces first class support for "unmanaged" infrastructure for CAPI poviders to consolidate the boundaries between managed and unmanaged cluster infrastructure. |
| 67 | + |
| 68 | +## Motivation |
| 69 | + |
| 70 | +Currently CAPI providers support an opinionated happy path to create and manage cluster infrastructure lifecycle. The fundamental use case we want to support is bring your own infrastructure. An "unmanaged" CAPI infraCluster won't reconcile or manage the lifecycle of the cluster infrastructure, but CAPI will be able to create compute nodes within it. |
| 71 | + |
| 72 | +This will ease adoption of CAPI in heterogenous real world environments with restricted privileges and where the provider infastructure for the cluster needs to be managed out of band. |
| 73 | + |
| 74 | +### Goals |
| 75 | + |
| 76 | +- Introduce support for "unmanaged" infrastructure consistently across CAPI providers. |
| 77 | +- The machine controller must be able to operate and create machines when the infastructure is "unmanaged". |
| 78 | + |
| 79 | +### Non-Goals/Future Work |
| 80 | + |
| 81 | +- Modify existing managed behaviour. |
| 82 | + |
| 83 | + |
| 84 | +## Proposal |
| 85 | + |
| 86 | +Providers will add a `ManagementPolicy=Managed|Unmanaged` field to the provider infraCluster spec. |
| 87 | + |
| 88 | +**Managed** |
| 89 | +- It will be default and will preserve existing behaviour. |
| 90 | + |
| 91 | +**Unmanaged** |
| 92 | + |
| 93 | +- The provider infraCluster controller will skip any infrastructure reconciliation. |
| 94 | + |
| 95 | +- The provider infraCluster will set readiness to true. |
| 96 | + |
| 97 | +- The provider infraCluster will set a condition unamangedReady to true. |
| 98 | + |
| 99 | +- CAPI will proceed with further reconciliation as usual. |
| 100 | + |
| 101 | +The machine controller must be able to operate without hard dependencies regardless of the cluster infrastructure being managed or unmanaged. |
| 102 | + |
| 103 | + |
| 104 | +### User Stories |
| 105 | + |
| 106 | +#### As a cluster provider I want to use CAPI in my service offering to orchestrate kubernetes bootstraping while letting customers own their infrastructure lifecycle for the data plane. |
| 107 | + |
| 108 | +#### As a user I want to use CAPI to orchestrate kubernetes bootstraping while restricting the privileges I need to grant for my cloud provider |
| 109 | + |
| 110 | +#### As a user I want to use CAPI to orchestate kubenetes bootstraping while reusing my existing infrastructure. |
| 111 | + |
| 112 | +#### As a user I want to use CAPI to orchestate kubernetes bootstraping while managing infrastructure lifecycle out of band with other tooling. |
| 113 | + |
| 114 | + |
| 115 | +### Implementation Details/Notes/Constraints |
| 116 | + |
| 117 | +As in [Proposal](#proposal). |
| 118 | + |
| 119 | +### Security Model |
| 120 | + |
| 121 | +When unmanaged no additional privileges for a cloud provider need to be given to CAPI other than the required to manage machines. |
| 122 | + |
| 123 | +### Risks and Mitigations |
| 124 | + |
| 125 | + |
| 126 | +## Alternatives |
| 127 | + |
| 128 | +We could have and adhoc CRD https://github.com/kubernetes-sigs/cluster-api/issues/4095 |
| 129 | + |
| 130 | +This would introudce complexity for the CAPI ecosystem with yet an additional CRD and it woudn't scale well across providers as it would need to contain provider specific information. |
| 131 | + |
| 132 | +## Upgrade Strategy |
| 133 | + |
| 134 | +Support is introduced by adding a new field for the provider infraCluster. |
| 135 | + |
| 136 | +This makes any transition backward compatible and leave the current managed behaviour untouched. |
| 137 | + |
| 138 | +## Additional Details |
| 139 | + |
| 140 | +## Implementation History |
| 141 | + |
| 142 | +- [ ] MM/DD/YYYY: Proposed idea in an issue or [community meeting] |
| 143 | +- [ ] MM/DD/YYYY: Compile a Google Doc following the CAEP template (link here) |
| 144 | +- [ ] MM/DD/YYYY: First round of feedback from community |
| 145 | +- [ ] MM/DD/YYYY: Present proposal at a [community meeting] |
| 146 | +- [ ] MM/DD/YYYY: Open proposal PR |
| 147 | + |
| 148 | +<!-- Links --> |
| 149 | +[community meeting]: https://docs.google.com/document/d/1Ys-DOR5UsgbMEeciuG0HOgDQc8kZsaWIWJeKJ1-UfbY |
0 commit comments