Fix formatting issues

Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: Idb3332e8b387b08b100e18767961541311118588
This commit is contained in:
Sean Eagan 2021-01-26 10:48:54 -06:00
parent 59694518d2
commit 5b2eee07ab
4 changed files with 30 additions and 30 deletions

View File

@ -45,7 +45,7 @@ spec:
type: string type: string
nodeInterfaceId: nodeInterfaceId:
type: string type: string
nodePorts: nodePort:
type: integer type: integer
nodelabels: nodelabels:
additionalProperties: additionalProperties:

View File

@ -39,9 +39,9 @@ func (lb loadBalancer) Deploy() error {
lb.config.Image = DefaultBalancerImage lb.config.Image = DefaultBalancerImage
} }
if lb.config.NodePort < 30000 || lb.config.NodePort > 32767 { 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") lb.logger.Info("Either NodePort is not defined in the CR or NodePort is not in the required range of 30000-32767")
return nil return nil
} }
pod, secret, err := lb.generatePodAndSecret() pod, secret, err := lb.generatePodAndSecret()
if err != nil { if err != nil {
@ -186,11 +186,11 @@ type backend struct {
} }
type loadBalancer struct { type loadBalancer struct {
client client.Client client client.Client
sipName types.NamespacedName sipName types.NamespacedName
logger logr.Logger logger logr.Logger
config airshipv1.InfraConfig config airshipv1.InfraConfig
machines *airshipvms.MachineList machines *airshipvms.MachineList
} }
func newLB(name, namespace string, func newLB(name, namespace string,
@ -211,13 +211,13 @@ func newLB(name, namespace string,
} }
func (lb loadBalancer) Finalize() error { func (lb loadBalancer) Finalize() error {
// implete to delete loadbalancer // implete to delete loadbalancer
return nil return nil
} }
// Type type of the service // Type type of the service
func (lb loadBalancer) Type() airshipv1.InfraService { func (lb loadBalancer) Type() airshipv1.InfraService {
return airshipv1.LoadBalancerService return airshipv1.LoadBalancerService
} }
func generateTemplate(p proxy) ([]byte, error) { func generateTemplate(p proxy) ([]byte, error) {

View File

@ -86,24 +86,24 @@ func (ss ServiceSet) Finalize() error {
return ss.client.Delete(context.TODO(), serviceNamespace) return ss.client.Delete(context.TODO(), serviceNamespace)
} }
func CreateNS (serviceNamespaceName string, c client.Client) error { func CreateNS(serviceNamespaceName string, c client.Client) error {
ns := &corev1.Namespace{} ns := &corev1.Namespace{}
key := client.ObjectKey{Name: serviceNamespaceName} key := client.ObjectKey{Name: serviceNamespaceName}
if err := c.Get(context.Background(), key, ns); err == nil { if err := c.Get(context.Background(), key, ns); err == nil {
// Namespace already exists // Namespace already exists
return nil return nil
} }
serviceNamespace := &corev1.Namespace{ serviceNamespace := &corev1.Namespace{
TypeMeta: metav1.TypeMeta{ TypeMeta: metav1.TypeMeta{
APIVersion: corev1.SchemeGroupVersion.String(), APIVersion: corev1.SchemeGroupVersion.String(),
Kind: "Namespace", Kind: "Namespace",
}, },
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: serviceNamespaceName, Name: serviceNamespaceName,
}, },
} }
return c.Create(context.TODO(), serviceNamespace) return c.Create(context.TODO(), serviceNamespace)
} }
// ServiceList returns all services defined in Set // ServiceList returns all services defined in Set

View File

@ -232,7 +232,7 @@ func CreateSIPCluster(name string, namespace string, masters int, workers int) *
InfraServices: map[airshipv1.InfraService]airshipv1.InfraConfig{ InfraServices: map[airshipv1.InfraService]airshipv1.InfraConfig{
airshipv1.LoadBalancerService: { airshipv1.LoadBalancerService: {
NodeInterface: "eno3", NodeInterface: "eno3",
NodePort: 30000, NodePort: 30000,
}, },
}, },
}, },