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

Support cluster-level setting for components #1182

Closed
aylei opened this issue Nov 19, 2019 · 1 comment · Fixed by #1193
Closed

Support cluster-level setting for components #1182

aylei opened this issue Nov 19, 2019 · 1 comment · Fixed by #1193
Labels
enhancement New feature or request

Comments

@aylei
Copy link
Contributor

aylei commented Nov 19, 2019

Feature Request

Formerly, we rely on template tools like helm to coordinate fields and eliminate copy-paste redundancy. Now that we are going to migrate the logic of helm to server-side #1121 , TidbCluster should support cluster-level setting for components. Of course, each component could still specify the properties and override the cluster one.

Proposal

Adding the following fields in TidbClusterSpec:

type TidbClusterSpec struct {

+	// Time zone of TiDB cluster Pods
+	Timezone string `json:"timezone,omitempty"`
+	// ImagePullPolicy of TiDB cluster Pods
+	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
+	// Whether Hostnetwork is enabled for TiDB cluster Pods
+	HostNetwork *bool `json:"hostNetwork,omitempty"`
+	// Affinity of TiDB cluster Pods
+	Affinity *corev1.Affinity `json:"affinity,omitempty"`
+	// PriorityClassName of TiDB cluster Pods
+	PriorityClassName string `json:"priorityClassName,omitempty"`
+	// Base node selectors of TiDB cluster Pods, components may add or override selectors upon this respectively
+	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
+	// Base annotations of TiDB cluster Pods, components may add or override selectors upon this respectively
+	Annotations map[string]string `json:"annotations,omitempty"`
+	// Base tolerations of TiDB cluster Pods, components may add more tolreations upon this respectively
+	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}
@aylei
Copy link
Contributor Author

aylei commented Nov 19, 2019

cc @tennix @weekface @cofyc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants