Fix formatting issues
Signed-off-by: Sean Eagan <seaneagan1@gmail.com> Change-Id: Idb3332e8b387b08b100e18767961541311118588
This commit is contained in:
parent
59694518d2
commit
5b2eee07ab
@ -45,7 +45,7 @@ spec:
|
||||
type: string
|
||||
nodeInterfaceId:
|
||||
type: string
|
||||
nodePorts:
|
||||
nodePort:
|
||||
type: integer
|
||||
nodelabels:
|
||||
additionalProperties:
|
||||
|
@ -39,9 +39,9 @@ func (lb loadBalancer) Deploy() error {
|
||||
lb.config.Image = DefaultBalancerImage
|
||||
}
|
||||
if lb.config.NodePort < 30000 || lb.config.NodePort > 32767 {
|
||||
lb.logger.Info("Either NodePort is not defined in the CR or NodePort is not in the required range of 30000-32767")
|
||||
return nil
|
||||
}
|
||||
lb.logger.Info("Either NodePort is not defined in the CR or NodePort is not in the required range of 30000-32767")
|
||||
return nil
|
||||
}
|
||||
|
||||
pod, secret, err := lb.generatePodAndSecret()
|
||||
if err != nil {
|
||||
@ -186,11 +186,11 @@ type backend struct {
|
||||
}
|
||||
|
||||
type loadBalancer struct {
|
||||
client client.Client
|
||||
sipName types.NamespacedName
|
||||
logger logr.Logger
|
||||
config airshipv1.InfraConfig
|
||||
machines *airshipvms.MachineList
|
||||
client client.Client
|
||||
sipName types.NamespacedName
|
||||
logger logr.Logger
|
||||
config airshipv1.InfraConfig
|
||||
machines *airshipvms.MachineList
|
||||
}
|
||||
|
||||
func newLB(name, namespace string,
|
||||
@ -211,13 +211,13 @@ func newLB(name, namespace string,
|
||||
}
|
||||
|
||||
func (lb loadBalancer) Finalize() error {
|
||||
// implete to delete loadbalancer
|
||||
return nil
|
||||
// implete to delete loadbalancer
|
||||
return nil
|
||||
}
|
||||
|
||||
// Type type of the service
|
||||
func (lb loadBalancer) Type() airshipv1.InfraService {
|
||||
return airshipv1.LoadBalancerService
|
||||
return airshipv1.LoadBalancerService
|
||||
}
|
||||
|
||||
func generateTemplate(p proxy) ([]byte, error) {
|
||||
|
@ -86,24 +86,24 @@ func (ss ServiceSet) Finalize() error {
|
||||
return ss.client.Delete(context.TODO(), serviceNamespace)
|
||||
}
|
||||
|
||||
func CreateNS (serviceNamespaceName string, c client.Client) error {
|
||||
ns := &corev1.Namespace{}
|
||||
key := client.ObjectKey{Name: serviceNamespaceName}
|
||||
if err := c.Get(context.Background(), key, ns); err == nil {
|
||||
// Namespace already exists
|
||||
return nil
|
||||
}
|
||||
func CreateNS(serviceNamespaceName string, c client.Client) error {
|
||||
ns := &corev1.Namespace{}
|
||||
key := client.ObjectKey{Name: serviceNamespaceName}
|
||||
if err := c.Get(context.Background(), key, ns); err == nil {
|
||||
// Namespace already exists
|
||||
return nil
|
||||
}
|
||||
|
||||
serviceNamespace := &corev1.Namespace{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: corev1.SchemeGroupVersion.String(),
|
||||
Kind: "Namespace",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: serviceNamespaceName,
|
||||
},
|
||||
}
|
||||
return c.Create(context.TODO(), serviceNamespace)
|
||||
serviceNamespace := &corev1.Namespace{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: corev1.SchemeGroupVersion.String(),
|
||||
Kind: "Namespace",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: serviceNamespaceName,
|
||||
},
|
||||
}
|
||||
return c.Create(context.TODO(), serviceNamespace)
|
||||
}
|
||||
|
||||
// ServiceList returns all services defined in Set
|
||||
|
@ -232,7 +232,7 @@ func CreateSIPCluster(name string, namespace string, masters int, workers int) *
|
||||
InfraServices: map[airshipv1.InfraService]airshipv1.InfraConfig{
|
||||
airshipv1.LoadBalancerService: {
|
||||
NodeInterface: "eno3",
|
||||
NodePort: 30000,
|
||||
NodePort: 30000,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user