-
Notifications
You must be signed in to change notification settings - Fork 500
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
New stability test case for ConfigMap rollout #499
Changes from all commits
2aff5a4
e99c172
53c2c0e
edb5311
2772248
ac86729
040612c
9465dbd
5e819d6
10a263f
ada8c94
a993c4c
67f9772
19eb9b9
a9cffd2
4bbf51c
6ad6358
a93d83f
6d58259
875040a
ba77209
c44a2fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,6 +151,7 @@ type OperatorActions interface { | |
CheckK8sAvailableOrDie(excludeNodes map[string]string, excludePods map[string]*corev1.Pod) | ||
CheckOperatorAvailable(operatorConfig *OperatorConfig) error | ||
CheckTidbClustersAvailable(infos []*TidbClusterConfig) error | ||
CheckTidbClustersAvailableOrDie(infos []*TidbClusterConfig) | ||
CheckOneEtcdDownOrDie(operatorConfig *OperatorConfig, clusters []*TidbClusterConfig, faultNode string) | ||
CheckOneApiserverDownOrDie(operatorConfig *OperatorConfig, clusters []*TidbClusterConfig, faultNode string) | ||
RegisterWebHookAndService(info *OperatorConfig) error | ||
|
@@ -202,6 +203,7 @@ type OperatorConfig struct { | |
WebhookSecretName string | ||
WebhookConfigName string | ||
Context *apimachinery.CertContext | ||
ImagePullPolicy corev1.PullPolicy | ||
} | ||
|
||
type TidbClusterConfig struct { | ||
|
@@ -231,6 +233,10 @@ type TidbClusterConfig struct { | |
TiDBTokenLimit int | ||
PDLogLevel string | ||
|
||
PDPreStartScript string | ||
TiDBPreStartScript string | ||
TiKVPreStartScript string | ||
|
||
BlockWriteConfig blockwriter.Config | ||
GrafanaClient *metrics.Client | ||
} | ||
|
@@ -286,6 +292,9 @@ func (tc *TidbClusterConfig) TidbClusterHelmSetString(m map[string]string) strin | |
"tidb.initSql": tc.InitSQL, | ||
"monitor.create": strconv.FormatBool(tc.Monitor), | ||
"enableConfigMapRollout": strconv.FormatBool(tc.EnableConfigMapRollout), | ||
"pd.preStartScript": tc.PDPreStartScript, | ||
"tikv.preStartScript": tc.TiKVPreStartScript, | ||
"tidb.preStartScript": tc.TiDBPreStartScript, | ||
} | ||
|
||
if tc.PDMaxReplicas > 0 { | ||
|
@@ -327,6 +336,7 @@ func (oi *OperatorConfig) OperatorHelmSetString(m map[string]string) string { | |
"scheduler.logLevel": "2", | ||
"controllerManager.replicas": "2", | ||
"scheduler.replicas": "2", | ||
"imagePullPolicy": string(oi.ImagePullPolicy), | ||
} | ||
if oi.SchedulerTag != "" { | ||
set["scheduler.kubeSchedulerImageTag"] = oi.SchedulerTag | ||
|
@@ -1583,7 +1593,7 @@ func notFound(res string) bool { | |
} | ||
|
||
func (oa *operatorActions) cloneOperatorRepo() error { | ||
cmd := fmt.Sprintf("git clone https://github.com/pingcap/tidb-operator.git %s", oa.cfg.OperatorRepoDir) | ||
cmd := fmt.Sprintf("git clone %s %s", oa.cfg.OperatorRepoUrl, oa.cfg.OperatorRepoDir) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the developers modify the chart in their development branch, they have to configure the git url in order to test the chart modification |
||
glog.Info(cmd) | ||
res, err := exec.Command("/bin/sh", "-c", cmd).CombinedOutput() | ||
if err != nil && !strings.Contains(string(res), "already exists") { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ package main | |
|
||
import ( | ||
"fmt" | ||
"k8s.io/api/core/v1" | ||
_ "net/http/pprof" | ||
"time" | ||
|
||
|
@@ -51,6 +52,7 @@ func main() { | |
WebhookServiceName: "webhook-service", | ||
WebhookSecretName: "webhook-secret", | ||
WebhookConfigName: "webhook-config", | ||
ImagePullPolicy: v1.PullIfNotPresent, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ImagePullPolicy can be omitted. It is set to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I understand correctly, according to the communication in this morning, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
} | ||
|
||
// start a http server in goruntine | ||
|
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.
For fault-injection