-
Notifications
You must be signed in to change notification settings - Fork 234
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
Migrate to the KubeOneCluster API #390
Conversation
b4dc950
to
4e523ed
Compare
@kron4eg Removed the hack and committed the appropriate fix. ServiceDomainName is now usable as well. |
/hold cancel |
/test pull-kubeone-build |
Signed-off-by: Marko Mudrinić <[email protected]>
The Terraform integration in the new API will be disabled until the migration is finished Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
185d321
to
53f7278
Compare
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
/retest |
One DNS flake and one DO API flake. |
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
/approve
LGTM label has been added. Git tree hash: f6e7aa01f1b20bb2fa626e1d315cf33c0de46bc7
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kron4eg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Migrate to the KubeOneCluster API implemented in #353 and proposed in the following proposal.
This PR brings breaking changes as some fields are removed or renamed. The new API is a Kubernetes-style API and supports API versioning, which allows us to make changes to the API without affecting the end users and breaking the backwards compatibility.
The new API is called
KubeOneCluster
, the API group iskubeone.io
and the initial version isv1alpha1
.Once this PR is merged it will not be possible to create KubeOne clusters using the old configuration file and API. The following changes must be made in order to migrate to the new API:
apiVersion
andkind
must be added at the top of the configuration file:apiserver
->apiEndpoints
provider
->cloudProvider
network
->clusterNetwork
machine_controller
->machineController
hosts
fields must be changed to the camel case:public_address
->publicAddress
private_address
->privateAddress
ssh_port
->sshPort
ssh_username
->sshUsername
ssh_private_key_file
->sshPrivateKeyFile
ssh_agent_socket
->sshAgentSocket
apiserver
structure is replaced with theapiEndpoint
structure which contains the following fields:host
- address or hostname of the API endpoint (by default load balancer DNS)port
- port of the API (by default6443
)cloudProvider
(prev.provider
) fields must be changed to the camel case:cloud_config
->cloudConfig
network
structure is renamed toclusterNetwork
, all existing fields are renamed to follow the camel case and a new field is added:pod_subnet
->podSubnet
service_subnet
->serviceSubnet
node_port_range
->nodePortRange
serviceDomainName
-> isn't used currentlyhttp_proxy
andhttps_proxy
fields in theproxy
structure are renamed to drop the_proxy
suffix andno_proxy
is renamed to follow the camel case:http_proxy
->http
https_proxy
->https
no_proxy
->noProxy
credentials
field frommachineController
structure (prev.machine_controller
) is moved to the root level.features
structure are renamed to follow the camel case:pod_security_policy
->podSecurityPolicy
dynamic_audit_log
->dynamicAuditLog
metrics_server
->metricsServer
openid_connect
->openidConnect
openidConnect
fields are renamed to follow the camel case.workers.Config
is renamed toworkers.providerSpec
.Changes affecting using KubeOne as a Go library:
WorkerConfig.Config.CloudProviderSpec
andWorkerConfig.Config.OperatingSystemSpec
are takingjson.RawMessage
instead ofmap[string]interface{}
,Features
structure are now pointers. All fields for enabling the feature are calledEnable
and are type of bool (prev. pointer on bool),MachineController
is now a pointer ofMachineControllerConfig
(prev. non-pointerMachineControllerConfig
),MachineController.Deploy
is now bool instead of pointer on bool.The following changes should be considered before merging the PR:
serviceDomainName
working.Support more than one API endpoint (a follow-up).openidConnect
a correct JSON tag or should it beopenIdConnect
?Fix a typo inapiEndpoint
(should beapiEndpoints
).Remove the old API (pkg/config
) (a follow-up).Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):xref #259
The issue will be closed once the old API is removed.
Documentation:
Documentation is up to be updated.
Release note:
/assign @kron4eg
cc @scheeles
/hold
until we don't agree on the final API structure