Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .jenkins/deploy-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ cluster:
vlan: 612

addresses:
cidr-nodes: 10.1.0.0/24
cidr-nodes: 10.1.0.0/23
cidr-pods: 172.18.0.0/16
cidr-services: 172.28.0.0/16
external-ranges:
- 10.1.1.0/24
service-api: 172.28.0.1
service-dns: 172.28.0.2

Expand Down
4 changes: 3 additions & 1 deletion deploy-chroot/setup.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ cluster:
vlan: 612

addresses:
cidr-nodes: 10.{x}.0.0/24
cidr-nodes: 10.{x}.0.0/23
cidr-pods: 172.18.0.0/16
cidr-services: 172.28.0.0/16
external-ranges:
- 10.{x}.1.0/24
service-api: 172.28.0.1
service-dns: 172.28.0.2

Expand Down
6 changes: 6 additions & 0 deletions docs/cluster-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ Sample section:
cidr-nodes: 18.4.60.0/23
cidr-pods: 172.18.0.0/16
cidr-services: 172.28.0.0/16
external-ranges:
- 18.4.62.0/16
service-api: 172.28.0.1
service-dns: 172.28.0.2

Expand All @@ -121,6 +123,10 @@ Descriptions:
This should be a subnet like `cidr-pods`, but can be smaller, because you will generally have many fewer services
than pods. These are allocated to services across the cluster as needed.

* `external-ranges`: the list of publicly-addressible subnets that IP addresses for LoadBalancer services should be allocated out of.

These may overlap with `cidr-nodes`.

* `service-api`: the service IP address for the Kubernetes apiserver within the cluster.

This must always be within the service subnet, and is usually the first address, but can be anything within the range
Expand Down
4 changes: 4 additions & 0 deletions platform/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ load("//kube-state-metrics:deps.bzl", "kube_state_metrics_dependencies")

kube_state_metrics_dependencies()

load("//metallb:deps.bzl", "metallb_dependencies")

metallb_dependencies()

load("//oci-tools:deps.bzl", "oci_tools_dependencies")

oci_tools_dependencies()
Expand Down
47 changes: 47 additions & 0 deletions platform/metallb/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
load("//bazel:package.bzl", "homeworld_oci")
load("//bazel:substitute.bzl", "substitute")
load("//python:resources.bzl", "py_resources")

# TODO: ldflags:
# -X go.universe.tf/metallb/internal/version.gitCommit={commit}
# -X go.universe.tf/metallb/internal/version.gitBranch={branch}

homeworld_oci(
name = "controller",
bin = {
"@tf_universe_go_metallb//controller": "/usr/bin/controller",
},
exec = ["/usr/bin/controller"],
visibility = ["//visibility:public"],
deps = [
"//debian:debian-micro.tgz",
],
)

homeworld_oci(
name = "speaker",
bin = {
"@tf_universe_go_metallb//speaker": "/usr/bin/speaker",
},
exec = ["/usr/bin/speaker"],
visibility = ["//visibility:public"],
deps = [
"//debian:debian-micro.tgz",
],
)

substitute(
name = "kubernetes.yaml",
kfs = {
"controller_digest": ":controller.ocidigest",
"speaker_digest": ":speaker.ocidigest",
},
template = ":kubernetes.yaml.in",
visibility = ["//visibility:public"],
)

py_resources(
name = "kubelib",
data = [":kubernetes.yaml"],
visibility = ["//visibility:public"],
)
68 changes: 68 additions & 0 deletions platform/metallb/deps.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
load("@bazel_gazelle//:deps.bzl", "go_repository")

def metallb_dependencies():
go_repository(
name = "tf_universe_go_metallb",
commit = "15d9ed5cce53b457a955f894aa58e7f4856f73d5", # v0.8.3
importpath = "go.universe.tf/metallb",
)

go_repository(
name = "com_github_go_kit_kit",
commit = "150a65a7ec6156b4b640c1fd55f26fd3d475d656", # v0.9.0
importpath = "github.com/go-kit/kit",
)

go_repository(
name = "com_github_go_logfmt_logfmt",
commit = "390ab7935ee28ec6b286364bba9b4dd6410cb3d5", # v0.3.0
importpath = "github.com/go-logfmt/logfmt",
)

go_repository(
name = "com_github_golang_groupcache",
commit = "02826c3e79038b59d737d3b1c0a1d937f71a4433",
importpath = "github.com/golang/groupcache",
)

go_repository(
name = "com_github_hashicorp_golang_lru",
commit = "20f1fb78b0740ba8c3cb143a61e86ba5c8669768", # v0.5.0
importpath = "github.com/hashicorp/golang-lru",
)

go_repository(
name = "com_github_mdlayher_arp",
commit = "98a83c8a27177c5179d02d41ad50b0cce8e59338",
importpath = "github.com/mdlayher/arp",
)

go_repository(
name = "com_github_mdlayher_ethernet",
commit = "0394541c37b7f86a10e0b49492f6d4f605c34163",
importpath = "github.com/mdlayher/ethernet",
)

go_repository(
name = "com_github_mdlayher_ndp",
commit = "012988d57f9ae7e329f16ec2a86b37c771cb57e8",
importpath = "github.com/mdlayher/ndp",
)

go_repository(
name = "com_github_mdlayher_raw",
commit = "fef19f00fc18511f735e13972bc53266d5a53f8c",
importpath = "github.com/mdlayher/raw",
)

go_repository(
name = "com_github_mikioh_ipaddr",
commit = "d465c8ab672111787b24b8f03326449059a4aa33",
importpath = "github.com/mikioh/ipaddr",
)

go_repository(
name = "com_gitlab_golang_commonmark_puny",
commit = "2cd490539afe7c6fc0eda6c59ef88fa93a00ea0d",
importpath = "gitlab.com/golang-commonmark/puny",
)
Loading