Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

components/metallb: Add missing autodiscovery labels #990

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

johananl
Copy link
Member

In order to allow users to control all supported BGP parameters by
specifying labels in worker pool config, we need to specify mappings
for them.

Fixes #987.

To test this change, deploy a cluster using a config similar to the following:

cluster "packet" {
  asset_dir        = "./assets"
  cluster_name     = "my-cluster"
  controller_count = 1
  controller_type  = "t1.small.x86"
  dns {
    provider = "route53"
    zone     = "example.com"
  }
  facility    = "ams1"
  project_id = "fake"
  ssh_pubkeys       = ["ssh-rsa ..."]
  management_cidrs  = ["0.0.0.0/0"]
  node_private_cidr = "10.1.1.0/25"

  worker_pool "pool-1" {
    count     = 2
    node_type = "t1.small.x86"
    # Example: configure hold time and peer port by setting autodiscovery labels
    labels    = "metallb.lokomotive.io/hold-time=3s,metallb.lokomotive.io/peer-port=1179"
  }
}

component "metallb" {
  address_pools = {
    default = ["147.1.2.3/32"]
  }
}

In order to allow users to control all supported BGP parameters by
specifying labels in worker pool config, we need to specify mappings
for them.

Fixes #987.
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@iaguis iaguis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@surajssd surajssd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an e2e test to verify these labels are taking effect?

@johananl
Copy link
Member Author

Please add an e2e test to verify these labels are taking effect?

Since we're already verifying the component renders these labels in a unit test, what would be checking by adding an e2e test for this? AFAICT such a test would verify that the API server actually writes the ConfigMap we provide. Do you see value in that?

Copy link
Member

@surajssd surajssd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I didn't realise that the unit test was updated as well. Cool LGTM. Sorry for the noise.

@johananl johananl merged commit 3008e5a into master Sep 22, 2020
@johananl johananl deleted the johananl/autodiscovery-labels branch September 22, 2020 18:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

components/metallb: Add all supported labels to autodiscovery config
4 participants