diff --git a/metallb-system/README.md b/metallb-system/README.md deleted file mode 100644 index eb266eb..0000000 --- a/metallb-system/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# MetalLB - -## Background - -MetalLB exposes services to the outside world. - - -## Deployment - -To update manifests: - -``` -curl -O https://raw.githubusercontent.com/metallb/metallb-operator/v0.14.2/bin/metallb-operator.yaml -kubectl apply -f metallb-operator.yaml -kubectl apply -f application.yml -``` - -Set up BGP secrets: - -``` -kubectl delete secret -n metallb-system mikrotik-router - kubectl create secret -n metallb-system generic mikrotik-router --type=kubernetes.io/basic-auth --from-literal=password=... -``` - -Eventually the external IP should show up here: - -``` -kubectl get svc -n traefik -``` diff --git a/metallb-system/.gitignore b/metallb/.gitignore similarity index 100% rename from metallb-system/.gitignore rename to metallb/.gitignore diff --git a/metallb/README.md b/metallb/README.md new file mode 100644 index 0000000..fd2e9c7 --- /dev/null +++ b/metallb/README.md @@ -0,0 +1,15 @@ +# MetalLB + +## Derployment + +With ArgoCD. Render it locally: + +```sh +kustomize build . --enable-helm +``` + +Eventually the external IP should show up here: + +``` +kubectl get svc -n traefik +``` diff --git a/metallb-system/application.yml b/metallb/application-extras.yaml similarity index 79% rename from metallb-system/application.yml rename to metallb/application-extras.yaml index 16386fc..325e7c3 100644 --- a/metallb-system/application.yml +++ b/metallb/application-extras.yaml @@ -1,23 +1,4 @@ --- -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor -metadata: - name: monitoring - namespace: metallb-system -spec: - selector: {} - podMetricsEndpoints: - - port: monitoring ---- -apiVersion: metallb.io/v1beta1 -kind: MetalLB -metadata: - name: metallb - namespace: metallb-system -spec: - nodeSelector: - node-role.kubernetes.io/worker: "" ---- # Slice of the private Zoo subnet using MetalLB L2 method apiVersion: metallb.io/v1beta1 kind: IPAddressPool diff --git a/metallb/kustomization.yaml b/metallb/kustomization.yaml new file mode 100644 index 0000000..89f6ee4 --- /dev/null +++ b/metallb/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: metallb-system + +# spec: https://kubectl.docs.kubernetes.io/references/kustomize/builtins/#_helmchartinflationgenerator_ +helmCharts: +- includeCRDs: true + name: &name metallb + releaseName: *name + repo: https://metallb.github.io/metallb + valuesFile: values.yaml + version: 0.15.2 + +resources: +- ssh://git@git.k-space.ee/secretspace/kube/metallb # secrets (.env): mikrotik-router +- ./application-extras.yaml diff --git a/metallb/values.yaml b/metallb/values.yaml new file mode 100644 index 0000000..429dfb8 --- /dev/null +++ b/metallb/values.yaml @@ -0,0 +1,4 @@ +prometheus: + rbacPrometheus: false + serviceMonitor: + enabled: true