Skip to content

Commit 0f60bc5

Browse files
committed
cleanup code and gofmt
Signed-off-by: lan.tian <[email protected]>
1 parent 7b1488e commit 0f60bc5

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

pkg/operator/periodicbackupcontroller/periodicbackupcontroller.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ import (
3030
"k8s.io/klog/v2"
3131
)
3232

33-
const (
34-
backupJobLabel = "backup-name"
35-
defaultBackupCRName = "default"
36-
etcdBackupServerContainerName = "etcd-backup-server"
37-
)
33+
const backupJobLabel = "backup-name"
3834

3935
type PeriodicBackupController struct {
4036
operatorClient v1helpers.OperatorClient

pkg/operator/targetconfigcontroller/targetconfigcontroller_test.go

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,21 +177,19 @@ func TestTargetConfigController(t *testing.T) {
177177
})
178178

179179
expectedEnv := map[string][]corev1.EnvVar{
180-
"etcdctl": envWithRevision,
181-
"etcd": envWithRevision,
182-
"etcd-metrics": envWithRevision,
183-
"etcd-readyz": envWithoutRevision,
184-
"etcd-rev": envWithoutRevision,
185-
"etcd-backup-server": envWithoutRevision,
180+
"etcdctl": envWithRevision,
181+
"etcd": envWithRevision,
182+
"etcd-metrics": envWithRevision,
183+
"etcd-readyz": envWithoutRevision,
184+
"etcd-rev": envWithoutRevision,
186185
}
187186

188187
expectedImage := map[string]string{
189-
"etcdctl": etcdPullSpec,
190-
"etcd": etcdPullSpec,
191-
"etcd-metrics": etcdPullSpec,
192-
"etcd-readyz": operatorPullSpec,
193-
"etcd-rev": operatorPullSpec,
194-
"etcd-backup-server": operatorPullSpec,
188+
"etcdctl": etcdPullSpec,
189+
"etcd": etcdPullSpec,
190+
"etcd-metrics": etcdPullSpec,
191+
"etcd-readyz": operatorPullSpec,
192+
"etcd-rev": operatorPullSpec,
195193
}
196194

197195
etcdContainerFound := false

0 commit comments

Comments
 (0)