diff --git a/config/crd/bases/airship.airshipit.org_sipclusters.yaml b/config/crd/bases/airship.airshipit.org_sipclusters.yaml index 0abd6ab..e253884 100644 --- a/config/crd/bases/airship.airshipit.org_sipclusters.yaml +++ b/config/crd/bases/airship.airshipit.org_sipclusters.yaml @@ -200,8 +200,6 @@ spec: additionalProperties: type: string type: object - nodePort: - type: integer nodePortRange: description: 'TODO: Remove the inherited single NodePort field via refactoring. It is unused for this service since @@ -220,7 +218,6 @@ spec: type: object required: - image - - nodePort - nodePortRange type: object type: array diff --git a/config/samples/airship_v1beta1_sipcluster.yaml b/config/samples/airship_v1beta1_sipcluster.yaml index 0459f5e..b095fc0 100644 --- a/config/samples/airship_v1beta1_sipcluster.yaml +++ b/config/samples/airship_v1beta1_sipcluster.yaml @@ -53,7 +53,6 @@ spec: # NOTE: nodeLabels not yet implemented. # nodeLabels: # kubernetes.io/os - nodePort: 30002 nodePortRange: start: 30002 end: 30011 diff --git a/docs/api/sipcluster.md b/docs/api/sipcluster.md index 872a3a0..4d003df 100644 --- a/docs/api/sipcluster.md +++ b/docs/api/sipcluster.md @@ -78,6 +78,16 @@ SIPClusterService +nodePort
+ +int + + + + + + + bmc
@@ -148,6 +158,16 @@ SIPClusterService

+ + +nodePort
+ +int + + + + + @@ -481,16 +501,6 @@ map[string]string -nodePort
- -int - - - - - - - nodeInterfaceId
string diff --git a/pkg/api/v1/sipcluster_types.go b/pkg/api/v1/sipcluster_types.go index 528b3ef..92459b9 100644 --- a/pkg/api/v1/sipcluster_types.go +++ b/pkg/api/v1/sipcluster_types.go @@ -77,6 +77,7 @@ func (s SIPClusterServices) GetAll() []SIPClusterService { // JumpHostService is an infrastructure service type that represents the sub-cluster jump-host service. type JumpHostService struct { SIPClusterService `json:",inline"` + NodePort int `json:"nodePort"` BMC *BMCOpts `json:"bmc,omitempty"` SSHAuthorizedKeys []string `json:"sshAuthorizedKeys,omitempty"` // NodeSSHPrivateKeys holds the name of a Secret in the same namespace as the SIPCluster CR, @@ -91,6 +92,7 @@ LoadBalancerServiceControlPlane is an infrastructure service type that represent */ type LoadBalancerServiceControlPlane struct { SIPClusterService `json:",inline"` + NodePort int `json:"nodePort"` } // LoadBalancerServiceWorker is an infrastructure service type that represents the sub-cluster load balancer service. @@ -165,7 +167,6 @@ type NodeSet struct { type SIPClusterService struct { Image string `json:"image"` NodeLabels map[string]string `json:"nodeLabels,omitempty"` - NodePort int `json:"nodePort"` NodeInterface string `json:"nodeInterfaceId,omitempty"` ClusterIP *string `json:"clusterIP,omitempty"` } diff --git a/pkg/bmh/bmh_test.go b/pkg/bmh/bmh_test.go index fc05f6a..35f962f 100644 --- a/pkg/bmh/bmh_test.go +++ b/pkg/bmh/bmh_test.go @@ -138,9 +138,9 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30001, NodeInterface: "oam-ipv4", }, + NodePort: 30001, }, }, LoadBalancerWorker: []airshipv1.LoadBalancerServiceWorker{ @@ -150,7 +150,6 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30002, NodeInterface: "oam-ipv4", }, NodePortRange: airshipv1.PortRange{ @@ -207,9 +206,9 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30001, NodeInterface: "oam-ipv4", }, + NodePort: 30001, }, }, LoadBalancerWorker: []airshipv1.LoadBalancerServiceWorker{ @@ -219,7 +218,6 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30002, NodeInterface: "oam-ipv4", }, NodePortRange: airshipv1.PortRange{ @@ -274,9 +272,9 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30001, NodeInterface: "oam-ipv4", }, + NodePort: 30001, }, }, LoadBalancerWorker: []airshipv1.LoadBalancerServiceWorker{ @@ -286,7 +284,6 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30002, NodeInterface: "oam-ipv4", }, NodePortRange: airshipv1.PortRange{ @@ -345,9 +342,9 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30001, NodeInterface: "oam-ipv4", }, + NodePort: 30001, }, }, LoadBalancerWorker: []airshipv1.LoadBalancerServiceWorker{ @@ -357,7 +354,6 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30002, NodeInterface: "oam-ip4", }, NodePortRange: airshipv1.PortRange{ @@ -410,9 +406,9 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30001, NodeInterface: "oam-ipv4", }, + NodePort: 30001, }, }, LoadBalancerWorker: []airshipv1.LoadBalancerServiceWorker{ @@ -422,7 +418,6 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30002, NodeInterface: "oam-ipv4", }, NodePortRange: airshipv1.PortRange{ @@ -474,9 +469,9 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30001, NodeInterface: "oam-ipv4", }, + NodePort: 30001, }, }, LoadBalancerWorker: []airshipv1.LoadBalancerServiceWorker{ @@ -486,7 +481,6 @@ var _ = Describe("MachineList", func() { NodeLabels: map[string]string{ "test": "true", }, - NodePort: 30002, NodeInterface: "oam-ipv4", }, NodePortRange: airshipv1.PortRange{ diff --git a/testutil/testutil.go b/testutil/testutil.go index 548ada0..b3dc5c3 100644 --- a/testutil/testutil.go +++ b/testutil/testutil.go @@ -264,9 +264,9 @@ func CreateSIPCluster(name string, namespace string, controlPlanes int, workers { SIPClusterService: airshipv1.SIPClusterService{ Image: "quay.io/airshipit/jump-host", - NodePort: 30000, NodeInterface: "eno3", }, + NodePort: 30000, SSHAuthorizedKeys: []string{ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyaozS8kZRw2a1d0O4YXhxtJlDPThqIZilGCsXLbukIFOyMUmMTwQAtwWp5epwU1+5ponC2uBENB6xCCj3cl5Rd43d2/B6HxyAPQGKo6/zKYGAKW2nzYDxSWMl6NUSsiJAyXUA7ZlNZQe0m8PmaferlkQyLLZo3NJpizz6U6ZCtxvj43vEl7NYWnLUEIzGP9zMqltIGnD4vYrU9keVKKXSsp+DkApnbrDapeigeGATCammy2xRrUQDuOvGHsfnQbXr2j0onpTIh0PiLrXLQAPDg8UJRgVB+ThX+neI3rQ320djzRABckNeE6e4Kkwzn+QdZsmA2SDvM9IU7boK1jVQlgUPp7zF5q3hbb8Rx7AadyTarBayUkCgNlrMqth+tmTMWttMqCPxJRGnhhvesAHIl55a28Kzz/2Oqa3J9zwzbyDIwlEXho0eAq3YXEPeBhl34k+7gOt/5Zdbh+yacFoxDh0LrshQgboAijcVVaXPeN0LsHEiVvYIzugwIvCkoFMPWoPj/kEGzPY6FCkVneDA7VoLTCoG8dlrN08Lf05/BGC7Wllm66pTNZC/cKXP+cjpQn1iEuiuPxnPldlMHx9sx2y/BRoft6oT/GzqkNy1NTY/xI+MfmxXnF5kwSbcTbzZQ9fZ8xjh/vmpPBgDNrxOEAT4N6OG7GQIhb9HEhXQCQ== example-key", //nolint "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwpOyZjZ4gB0OTvmofH3llh6cBCWaEiEmHZWSkDXr8Bih6HcXVOtYMcFi/ZnUVGUBPw3ATNQBZUaVCYKeF+nDfKTJ9hmnlsyHxV2LeMsVg1o15Pb6f+QJuavEqtE6HI7mHyId4Z1quVTJXDWDW8OZEG7M3VktauqAn/e9UJvlL0bGmTFD1XkNcbRsWMRWkQgt2ozqlgrpPtvrg2/+bNucxX++VUjnsn+fGgAT07kbnrZwppGnAfjbYthxhv7GeSD0+Z0Lf1kiKy/bhUqXsZIuexOfF0YrRyUH1KBl8GCX2OLBYvXHyusByqsrOPiROqRdjX5PsK6HSAS0lk0niTt1p example-key-2", // nolint @@ -278,15 +278,14 @@ func CreateSIPCluster(name string, namespace string, controlPlanes int, workers { SIPClusterService: airshipv1.SIPClusterService{ NodeInterface: "eno3", - NodePort: 30001, }, + NodePort: 30001, }, }, LoadBalancerWorker: []airshipv1.LoadBalancerServiceWorker{ { SIPClusterService: airshipv1.SIPClusterService{ NodeInterface: "eno3", - NodePort: 30002, }, NodePortRange: airshipv1.PortRange{ Start: 30002,