Remove nodePort config from loadBalancerWorker service

Closes: #21
Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: I0f24553cfbf5de7ea95a2ef9298c0fe6632df62e
This commit is contained in:
Sean Eagan 2021-05-21 11:04:17 -05:00
parent f9226befbd
commit e49a9eeebe
6 changed files with 30 additions and 30 deletions

View File

@ -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

View File

@ -53,7 +53,6 @@ spec:
# NOTE: nodeLabels not yet implemented.
# nodeLabels:
# kubernetes.io/os
nodePort: 30002
nodePortRange:
start: 30002
end: 30011

View File

@ -78,6 +78,16 @@ SIPClusterService
</tr>
<tr>
<td>
<code>nodePort</code><br>
<em>
int
</em>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>bmc</code><br>
<em>
<a href="#airship.airshipit.org/v1.BMCOpts">
@ -148,6 +158,16 @@ SIPClusterService
</p>
</td>
</tr>
<tr>
<td>
<code>nodePort</code><br>
<em>
int
</em>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</div>
@ -481,16 +501,6 @@ map[string]string
</tr>
<tr>
<td>
<code>nodePort</code><br>
<em>
int
</em>
</td>
<td>
</td>
</tr>
<tr>
<td>
<code>nodeInterfaceId</code><br>
<em>
string

View File

@ -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"`
}

View File

@ -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{

View File

@ -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,