submariner-io / subctl

CLI tool that provides helper commands to install, inspect, and troubleshoot a Submariner deployment.
Apache License 2.0
18 stars 23 forks source link

Broker components for `subctl deploy-broker` should be a set #141

Open mkolesnik opened 2 years ago

mkolesnik commented 2 years ago

Came across this when mucking about with make deploy using=globalnet,lighthouse in the operator repo.

What happened: The broker has components listed twice:

kubectl --context=cluster1 describe brokers -n submariner-k8s-broker
Name:         submariner-broker
Namespace:    submariner-k8s-broker
Labels:       <none>
Annotations:  <none>
API Version:  submariner.io/v1alpha1
Kind:         Broker
Metadata:
  Creation Timestamp:  2022-06-30T08:00:01Z
  Generation:          1
  Managed Fields:
    API Version:  submariner.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:spec:
        .:
        f:components:
        f:defaultGlobalnetClusterSize:
        f:globalnetCIDRRange:
        f:globalnetEnabled:
    Manager:         subctl
    Operation:       Update
    Time:            2022-06-30T08:00:01Z
  Resource Version:  990
  UID:               3f101c0d-8f9c-4388-adc9-025151f2cbea
Spec:
  Components:
    service-discovery
    connectivity
    service-discovery
    connectivity
  Default Globalnet Cluster Size:  65536
  Globalnet CIDR Range:            242.0.0.0/8
  Globalnet Enabled:               true
Events:                            <none>

This is due to it being specified twice (which is its own bug):

[07:59:33.917] [output]$ [cluster1] subctl deploy-broker --kubeconfig /go/src/github.com/submariner-io/submariner-operator/output/kubeconfigs/kind-config-cluster1 --repository localhost:5000 --version local --globalnet --components service-discovery,connectivity --components service-discovery,connectivity

What you expected to happen: The components sent in the spec should be a set not an list.

Anything else we need to know?: Not sure if this is can be enforced on the server side, but if it is we'll need a bug on the operator repo.

Environment:

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had activity for 60 days. It will be closed if no further activity occurs. Please make a comment if this issue/pr is still valid. Thank you for your contributions.