Skip to content

Commit

Permalink
Revert "feat(platform): support lb (#2091)" (#2111)
Browse files Browse the repository at this point in the history
This reverts commit f0ae6ee.
  • Loading branch information
willzgli committed Oct 14, 2022
1 parent 27734eb commit 85ea2eb
Show file tree
Hide file tree
Showing 11 changed files with 357 additions and 930 deletions.
58 changes: 0 additions & 58 deletions api/openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions api/platform/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,17 +568,10 @@ type HA struct {
}

type TKEHA struct {
VIP string
VRID *int32
DirectorIP string //an inner vip used by tcs-lb components
VIPPool *VIPPool
VIP string
VRID *int32
}

//vippool: vippool is a pool of vips, supported by tcs lb
type VIPPool struct {
Inner []string //private ip pool, svc using a vip in inner pool will not be exposed on Internet
Outer []string //public ip pool, svc using a vip in outer pool will be exposed on Internet
}
type ThirdPartyHA struct {
VIP string
VPort int32
Expand Down
1,024 changes: 355 additions & 669 deletions api/platform/v1/generated.pb.go

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions api/platform/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions api/platform/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,18 +585,6 @@ type HA struct {
type TKEHA struct {
VIP string `json:"vip" protobuf:"bytes,1,name=vip"`
VRID *int32 `json:"vrid,omitempty" protobuf:"bytes,2,name=vrid"`
//DirectorIP: an inner vip used by tcs-lb components
DirectorIP string `json:"directorip,omitempty" protobuf:"bytes,3,name=directorip"`
VIPPool *VIPPool `json:"vippool,omitempty" protobuf:"bytes,4,name=vippool"`
}

//vippool: vippool is a pool of vips, supported by tcs lb
type VIPPool struct {
//Inner: private ip pool, svc using a vip in inner pool will not be exposed on Internet
Inner []string `json:"inner,omitempty" protobuf:"bytes,1,name=inner"`

//Outer: public ip pool, svc using a vip in outer pool will be exposed on Internet
Outer []string `json:"outer,omitempty" protobuf:"bytes,2,name=outer"`
}

type ThirdPartyHA struct {
Expand Down
18 changes: 0 additions & 18 deletions api/platform/v1/types_swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions api/platform/v1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 0 additions & 31 deletions api/platform/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 0 additions & 31 deletions api/platform/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 0 additions & 26 deletions pkg/platform/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,32 +86,6 @@ func (c *Cluster) GetMainIP() string {
return mainIP
}

func (c *Cluster) GetDirectorIP() string {
if c.Spec.Features.HA != nil {
if c.Spec.Features.HA.TKEHA != nil {
return c.Spec.Features.HA.TKEHA.DirectorIP
}
}
return ""
}

func (c *Cluster) GetInnerVIPs() []string {
if c.Spec.Features.HA != nil {
if c.Spec.Features.HA.TKEHA != nil && c.Spec.Features.HA.TKEHA.VIPPool != nil {
return c.Spec.Features.HA.TKEHA.VIPPool.Inner
}
}
return nil
}

func (c *Cluster) GetMasterIPs() []string {
var IPs []string
for _, machine := range c.Spec.Machines {
IPs = append(IPs, machine.IP)
}
return IPs
}

func (c *Cluster) Clientset() (kubernetes.Interface, error) {
config, err := c.RESTConfig()
if err != nil {
Expand Down
26 changes: 0 additions & 26 deletions pkg/platform/types/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,6 @@ func (c *Cluster) GetMainIP() string {
return mainIP
}

func (c *Cluster) GetDirectorIP() string {
if c.Spec.Features.HA != nil {
if c.Spec.Features.HA.TKEHA != nil {
return c.Spec.Features.HA.TKEHA.DirectorIP
}
}
return ""
}

func (c *Cluster) GetInnerVIPs() []string {
if c.Spec.Features.HA != nil {
if c.Spec.Features.HA.TKEHA != nil && c.Spec.Features.HA.TKEHA.VIPPool != nil {
return c.Spec.Features.HA.TKEHA.VIPPool.Inner
}
}
return nil
}

func (c *Cluster) GetMasterIPs() []string {
var IPs []string
for _, machine := range c.Spec.Machines {
IPs = append(IPs, machine.IP)
}
return IPs
}

func (c *Cluster) ClientsetForBootstrap() (kubernetes.Interface, error) {
config, err := c.RESTConfigForBootstrap()
if err != nil {
Expand Down

0 comments on commit 85ea2eb

Please sign in to comment.