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

[brainstorm] v1beta1 API ideas #828

Closed
2 tasks done
kron4eg opened this issue Mar 16, 2020 · 8 comments
Closed
2 tasks done

[brainstorm] v1beta1 API ideas #828

kron4eg opened this issue Mar 16, 2020 · 8 comments
Assignees
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/design Categorizes issue or PR as related to design.
Milestone

Comments

@kron4eg
Copy link
Member

kron4eg commented Mar 16, 2020

This issue will serve as a collection of ideas to gather for new API version. Later good ideas will be included into the proposal and eventually implemented.

EDIT
Things TODO:

@kron4eg kron4eg added kind/feature Categorizes issue or PR as related to a new feature. team/lifecycle kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/design Categorizes issue or PR as related to design. labels Mar 16, 2020
@kron4eg kron4eg changed the title v1beta1 API ideas [discussion] v1beta1 API ideas Mar 16, 2020
@kron4eg
Copy link
Member Author

kron4eg commented Mar 16, 2020

Every cloud provider has own settings, defined in corresponding struct.

diff --git pkg/apis/kubeone/types.go pkg/apis/kubeone/types.go
index c58555f..d8fd8f6 100644
--- pkg/apis/kubeone/types.go
+++ pkg/apis/kubeone/types.go
@@ -104,9 +104,17 @@ const (
 
 // CloudProviderSpec describes the cloud provider that is running the machines
 type CloudProviderSpec struct {
-	Name        CloudProviderName `json:"name"`
-	External    bool              `json:"external"`
-	CloudConfig string            `json:"cloudConfig"`
+	External     bool              `json:"external"`
+	CloudConfig  string            `json:"cloudConfig"`
+	AWS          *AWSSpec          `json:"aws"`
+	Azure        *AzureSpec        `json:"azure"`
+	Openstack    *OpenstackSpec    `json:"openstack"`
+	Hetzner      *HetznerSpec      `json:"hetzner"`
+	Digitalocean *DigitaloceanSpec `json:"digitalocean"`
+	Packet       *PacketSpec       `json:"packet"`
+	Vsphere      *VsphereSpec      `json:"vsphere"`
+	Gce          *GceSpec          `json:"gce"`
+	None         *NoneSpec         `json:"none"`
 }
 
 // VersionConfig describes the versions of components that are installed on the machines

@kron4eg
Copy link
Member Author

kron4eg commented Mar 16, 2020

Machine controller takes as cloud provider whatever is configured at CloudProviderSpec

diff --git pkg/apis/kubeone/types.go pkg/apis/kubeone/types.go
index c58555f..8ece034 100644
--- pkg/apis/kubeone/types.go
+++ pkg/apis/kubeone/types.go
@@ -201,9 +201,6 @@ type NetworkConfig struct {
 // MachineControllerConfig configures kubermatic machine-controller deployment
 type MachineControllerConfig struct {
 	Deploy bool `json:"deploy"`
-	// Provider is provider to be used for machine-controller
-	// Defaults and must be same as chosen cloud provider, unless cloud provider is set to None
-	Provider CloudProviderName `json:"provider"`
 }
 
 // Features controls what features will be enabled on the cluster

@kron4eg
Copy link
Member Author

kron4eg commented Mar 16, 2020

CNI provider configs are defined in own spec structures.

diff --git pkg/apis/kubeone/types.go pkg/apis/kubeone/types.go
index c58555f..5b7c7d1 100644
--- pkg/apis/kubeone/types.go
+++ pkg/apis/kubeone/types.go
@@ -150,10 +150,9 @@ const (
 
 // CNI config
 type CNI struct {
-	// Provider choice
-	Provider CNIProvider `json:"provider"`
-	// Encrypted enables encryption for supported CNI plugins
-	Encrypted bool `json:"encrypted"`
+	Canal    *CanalSpec    `json:"canal"`
+	Calico   *CalicoSpec   `json:"calico"`
+	WeaveNet *WeaveNetSpec `json:"weaveNet"`
 }
 
 // ProxyConfig configures proxy for the Docker daemon and is used by KubeOne scripts

@kron4eg kron4eg changed the title [discussion] v1beta1 API ideas [brainstorm] v1beta1 API ideas Mar 16, 2020
@kron4eg kron4eg removed the kind/feature Categorizes issue or PR as related to a new feature. label Mar 16, 2020
@kron4eg
Copy link
Member Author

kron4eg commented Mar 16, 2020

Taints == nil should be distinguished from len(Taints) == 0

diff --git pkg/apis/kubeone/types.go pkg/apis/kubeone/types.go
index c58555f..278f4be 100644
--- pkg/apis/kubeone/types.go
+++ pkg/apis/kubeone/types.go
@@ -71,7 +71,13 @@ type HostConfig struct {
 	BastionUser       string `json:"bastionUser"`
 	Hostname          string `json:"hostname"`
 	IsLeader          bool   `json:"isLeader"`
-	Untaint           bool   `json:"untaint"`
+
+	// If not provided (i.e. nil) defaults to TaintEffectNoSchedule, with key
+	// node-role.kubernetes.io/master.
+	// Explicitly empty (i.e. []corev1.Taint{}) means no taints.
+	//
+	// Taints == nil should be distinguished from len(Taints) == 0
+	Taints []corev1.Taint `json:"taints,omitempty"`
 
 	// Information populated at the runtime
 	OperatingSystem string `json:"-"`

@kron4eg
Copy link
Member Author

kron4eg commented Apr 24, 2020

Add operating system ENUM

@xmudrii
Copy link
Member

xmudrii commented Apr 27, 2020

#882 (comment)

@xmudrii
Copy link
Member

xmudrii commented Jun 9, 2020

All relevant tasks are done.
/close

@kubermatic-bot
Copy link
Contributor

@xmudrii: Closing this issue.

In response to this:

All relevant tasks are done.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/design Categorizes issue or PR as related to design.
Projects
None yet
Development

No branches or pull requests

3 participants