Skip to content

Commit

Permalink
revert api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Jun 3, 2024
1 parent 2d807fe commit 6b32d40
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions src/k8s/api/v1/cluster_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func (c IngressConfig) GetDefaultTLSSecret() string { return getField(c.Default
func (c IngressConfig) GetEnableProxyProtocol() bool { return getField(c.EnableProxyProtocol) }

type LoadBalancerConfig struct {
Driver *string `json:"driver,omitempty" yaml:"driver,omitempty"`
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
CIDRs *[]string `json:"cidrs,omitempty" yaml:"cidrs,omitempty"`
L2Mode *bool `json:"l2-mode,omitempty" yaml:"l2-mode,omitempty"`
Expand All @@ -91,7 +90,6 @@ type LoadBalancerConfig struct {
BGPPeerPort *int `json:"bgp-peer-port,omitempty" yaml:"bgp-peer-port,omitempty"`
}

func (c LoadBalancerConfig) GetDriver() string { return getField(c.Driver) }
func (c LoadBalancerConfig) GetEnabled() bool { return getField(c.Enabled) }
func (c LoadBalancerConfig) GetCIDRs() []string { return getField(c.CIDRs) }
func (c LoadBalancerConfig) GetL2Mode() bool { return getField(c.L2Mode) }
Expand Down
3 changes: 0 additions & 3 deletions src/k8s/pkg/k8sd/types/cluster_config_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ func (c *ClusterConfig) SetDefaults() {
c.LocalStorage.Default = utils.Pointer(true)
}
// load balancer
if c.LoadBalancer.Driver == nil {
c.LoadBalancer.Driver = utils.Pointer("cilium")
}
if c.LoadBalancer.Enabled == nil {
c.LoadBalancer.Enabled = utils.Pointer(false)
}
Expand Down
4 changes: 1 addition & 3 deletions src/k8s/pkg/k8sd/types/cluster_config_defaults_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package types_test

import (
"testing"

"github.com/canonical/k8s/pkg/utils"
"testing"

"github.com/canonical/k8s/pkg/k8sd/types"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -42,7 +41,6 @@ func TestSetDefaults(t *testing.T) {
Default: utils.Pointer(true),
},
LoadBalancer: types.LoadBalancer{
Driver: utils.Pointer("cilium"),
Enabled: utils.Pointer(false),
CIDRs: utils.Pointer([]string{}),
L2Mode: utils.Pointer(false),
Expand Down
1 change: 0 additions & 1 deletion src/k8s/pkg/k8sd/types/cluster_config_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type Ingress struct {
}

type LoadBalancer struct {
Driver *string `json:"driver,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
CIDRs *[]string `json:"cidrs,omitempty"`
IPRanges *[]LoadBalancer_IPRange `json:"ranges,omitempty"`
Expand Down

0 comments on commit 6b32d40

Please sign in to comment.