Skip to content

Commit

Permalink
Merge pull request #15676 from johngmyers/topology
Browse files Browse the repository at this point in the history
v1alpha3: Remove no-longer-used topology fields
  • Loading branch information
k8s-ci-robot committed Jul 19, 2023
2 parents d9efa71 + d57df6d commit 59ced8c
Show file tree
Hide file tree
Showing 282 changed files with 18 additions and 753 deletions.
2 changes: 0 additions & 2 deletions docs/getting_started/gce.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ spec:
topology:
dns:
type: Public
masters: public
nodes: public
```

Similarly, you can also see your InstanceGroups using:
Expand Down
2 changes: 0 additions & 2 deletions docs/manifests_and_customizing_via_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ spec:
bastionPublicName: bastion.k8s.example.com
dns:
type: Public
masters: private
nodes: private

---

Expand Down
2 changes: 0 additions & 2 deletions docs/tutorial/upgrading-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ spec:
topology:
dns:
type: Public
masters: public
nodes: public
```

Edit `kubernetesVersion`, changing it to `1.17.7` for example.
Expand Down
6 changes: 0 additions & 6 deletions examples/kops-api-example/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ func up(vfsContext *vfs.VFSContext, ctx context.Context) error {
AWS: &api.AWSSpec{},
},
ConfigBase: registryBase.Join(cluster.ObjectMeta.Name).Path(),
Networking: api.NetworkingSpec{
Topology: &api.TopologySpec{
ControlPlane: api.TopologyPublic,
Nodes: api.TopologyPublic,
},
},
}

for _, z := range nodeZones {
Expand Down
6 changes: 2 additions & 4 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5721,12 +5721,10 @@ spec:
type: string
type: object
masters:
description: The environment to launch the Kubernetes masters
in public|private
description: ControlPlane is not used.
type: string
nodes:
description: The environment to launch the Kubernetes nodes in
public|private
description: Nodes is not used.
type: string
type: object
updatePolicy:
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/containerdbuilder/flatcar/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/containerdbuilder/simple/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/dockerbuilder/healthcheck/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/dockerbuilder/logflags/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/dockerbuilder/skipinstall/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/golden/audit/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/golden/awsiam/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/golden/hooks-docker-exec/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/golden/minimal/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/golden/oidc/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/golden/side-loading/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/kubelet/featuregates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/kubelet/warmpool/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
3 changes: 0 additions & 3 deletions nodeup/pkg/model/tests/protokube/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ spec:
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
topology:
masters: public
nodes: public
subnets:
- cidr: 172.20.32.0/19
name: us-test-1a
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kops/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ func (t *TerraformSpec) IsEmpty() bool {
func (c *Cluster) FillDefaults() error {
// Topology support
if c.Spec.Networking.Topology == nil {
c.Spec.Networking.Topology = &TopologySpec{ControlPlane: TopologyPublic, Nodes: TopologyPublic, DNS: DNSTypePublic}
c.Spec.Networking.Topology = &TopologySpec{DNS: DNSTypePublic}
}

if c.Spec.Channel == "" {
Expand Down
6 changes: 0 additions & 6 deletions pkg/apis/kops/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ var SupportedDnsTypes = []DNSType{
}

type TopologySpec struct {
// ControlPlane specifies the environment for launching the control plane nodes. (public, private)
ControlPlane string `json:"controlPlane,omitempty"`

// Nodes specifies the environment for launching the worker nodes. (public, private)
Nodes string `json:"nodes,omitempty"`

// Bastion provide an external facing point of entry into a network
// containing private network instances. This host can provide a single
// point of fortification or audit and can be started and stopped to enable
Expand Down
4 changes: 0 additions & 4 deletions pkg/apis/kops/v1alpha2/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ func SetDefaults_ClusterSpec(obj *ClusterSpec) {
obj.Topology = &TopologySpec{}
}

rebindIfEmpty(&obj.Topology.ControlPlane, TopologyPublic)

rebindIfEmpty(&obj.Topology.Nodes, TopologyPublic)

if obj.Topology.LegacyDNS == nil {
obj.Topology.LegacyDNS = &DNSSpec{}
}
Expand Down
6 changes: 4 additions & 2 deletions pkg/apis/kops/v1alpha2/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ const (
)

type TopologySpec struct {
// The environment to launch the Kubernetes masters in public|private
// ControlPlane is not used.
// +k8s:conversion-gen=false
ControlPlane string `json:"masters,omitempty"`

// The environment to launch the Kubernetes nodes in public|private
// Nodes is not used.
// +k8s:conversion-gen=false
Nodes string `json:"nodes,omitempty"`

// Bastion provide an external facing point of entry into a network
Expand Down
6 changes: 2 additions & 4 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

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

4 changes: 0 additions & 4 deletions pkg/apis/kops/v1alpha3/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ func SetDefaults_ClusterSpec(obj *ClusterSpec) {
obj.Networking.Topology = &TopologySpec{}
}

rebindIfEmpty(&obj.Networking.Topology.ControlPlane, TopologyPublic)

rebindIfEmpty(&obj.Networking.Topology.Nodes, TopologyPublic)

if obj.Networking.Topology.DNS == "" {
obj.Networking.Topology.DNS = DNSTypePublic
}
Expand Down
6 changes: 0 additions & 6 deletions pkg/apis/kops/v1alpha3/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ const (
)

type TopologySpec struct {
// ControlPlane specifies the environment for launching the control plane nodes. (public, private)
ControlPlane string `json:"controlPlane,omitempty"`

// Nodes specifies the environment for launching the worker nodes. (public, private)
Nodes string `json:"nodes,omitempty"`

// Bastion provide an external facing point of entry into a network
// containing private network instances. This host can provide a single
// point of fortification or audit and can be started and stopped to enable
Expand Down
4 changes: 0 additions & 4 deletions pkg/apis/kops/v1alpha3/zz_generated.conversion.go

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

Loading

0 comments on commit 59ced8c

Please sign in to comment.