Skip to content

Commit

Permalink
Merge branch 'master' into issue-2208
Browse files Browse the repository at this point in the history
  • Loading branch information
kaaaaaaang authored Jun 13, 2023
2 parents d457097 + ea3af77 commit 43f601b
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions components/dm/spec/topology_dm.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func AllDMComponentNames() (roles []string) {
// MasterSpec represents the Master topology specification in topology.yaml
type MasterSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down Expand Up @@ -205,7 +205,7 @@ func (s *MasterSpec) GetAdvertisePeerURL(enableTLS bool) string {
// WorkerSpec represents the Master topology specification in topology.yaml
type WorkerSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/alertmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
// AlertmanagerSpec represents the AlertManager topology specification in topology.yaml
type AlertmanagerSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
// CDCSpec represents the CDC topology specification in topology.yaml
type CDCSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
// DashboardSpec represents the Dashboard topology specification in topology.yaml
type DashboardSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Version string `yaml:"version,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/drainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
// DrainerSpec represents the Drainer topology specification in topology.yaml
type DrainerSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/grafana.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
// GrafanaSpec represents the Grafana topology specification in topology.yaml
type GrafanaSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
// PrometheusSpec represents the Prometheus Server topology specification in topology.yaml
type PrometheusSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
// PDSpec represents the PD topology specification in topology.yaml
type PDSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
ListenHost string `yaml:"listen_host,omitempty"`
AdvertiseClientAddr string `yaml:"advertise_client_addr,omitempty"`
AdvertisePeerAddr string `yaml:"advertise_peer_addr,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/pump.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
// PumpSpec represents the Pump topology specification in topology.yaml
type PumpSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/tidb.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
// TiDBSpec represents the TiDB topology specification in topology.yaml
type TiDBSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
ListenHost string `yaml:"listen_host,omitempty"`
AdvertiseAddr string `yaml:"advertise_address,omitempty"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/tiflash.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
// TiFlashSpec represents the TiFlash topology specification in topology.yaml
type TiFlashSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/tikv.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const (
// TiKVSpec represents the TiKV topology specification in topology.yaml
type TiKVSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
ListenHost string `yaml:"listen_host,omitempty"`
AdvertiseAddr string `yaml:"advertise_addr,omitempty"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/tikv_cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
// TiKVCDCSpec represents the TiKVCDC topology specification in topology.yaml
type TiKVCDCSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Patched bool `yaml:"patched,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/spec/tispark.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
// TiSparkMasterSpec is the topology specification for TiSpark master node
type TiSparkMasterSpec struct {
Host string `yaml:"host"`
ManageHost string `yaml:"manage_host,omitempty"`
ManageHost string `yaml:"manage_host,omitempty" validate:"manage_host:editable"`
ListenHost string `yaml:"listen_host,omitempty"`
SSHPort int `yaml:"ssh_port,omitempty" validate:"ssh_port:editable"`
Imported bool `yaml:"imported,omitempty"`
Expand Down

0 comments on commit 43f601b

Please sign in to comment.