Skip to content

Commit

Permalink
Merge branch 'main' into v0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
fedepaol committed Apr 19, 2024
2 parents c4bec6d + 61e7f86 commit 7ebb4a2
Show file tree
Hide file tree
Showing 30 changed files with 294 additions and 185 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4
with:
version: v3.12.1

Expand Down Expand Up @@ -250,6 +250,13 @@ jobs:
with:
artifact-name: kind-logs-${{ matrix.ip-family }}-${{ matrix.bgp-type }}-${{ matrix.deployment}}

- name: Publish JUnit Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
annotate_only: true
report_paths: 'e2etest/junit-report.xml'

e2e-use-operator:
runs-on: ubuntu-22.04
needs:
Expand Down Expand Up @@ -340,6 +347,14 @@ jobs:
with:
artifact-name: kind_logs_use_operator

- name: Publish JUnit Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
annotate_only: true
report_paths: 'e2etest/junit-report.xml'


oldest_k8s:
runs-on: ubuntu-22.04
needs:
Expand Down Expand Up @@ -375,3 +390,10 @@ jobs:
uses: ./.github/workflows/composite/collectlogs
with:
artifact-name: kind-logs-oldest-k8s

- name: Publish JUnit Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
annotate_only: true
report_paths: 'e2etest/junit-report.xml'
5 changes: 3 additions & 2 deletions .github/workflows/classify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ on:
jobs:
add_labels:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions-ecosystem/action-remove-labels@v1
with:
Expand Down Expand Up @@ -53,7 +54,7 @@ jobs:
labels: kind/${{ steps.regex-match.outputs.group1 }}

- name: Check release notes were not deleted
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const pr = await github.rest.pulls.get({
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ build/
website/public
dev-env/unittest/bin
.envrc
junit-report.xml

# generated by helm chart-releaser
.cr-*
Expand Down
6 changes: 3 additions & 3 deletions charts/metallb/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 0.14.4
- name: frr-k8s
repository: https://metallb.github.io/frr-k8s
version: 0.0.10
digest: sha256:b86c6655696e26961e41859b7b88c31797091692d910c7d1baae05af8591c937
generated: "2024-03-26T16:10:37.59968399+01:00"
version: 0.0.11
digest: sha256:0830886dfbdb00b06f0ee45f7f4b424e3dda50ce229c0f287e944511d9e68602
generated: "2024-04-05T09:29:47.21116601+03:00"
2 changes: 1 addition & 1 deletion charts/metallb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- name: frr-k8s
repository: https://metallb.github.io/frr-k8s
condition: frrk8s.enabled
version: 0.0.10
version: 0.0.11


# A chart can be either an 'application' or a 'library' chart.
Expand Down
2 changes: 1 addition & 1 deletion charts/metallb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Kubernetes: `>= 1.19.0-0`
| Repository | Name | Version |
|------------|------|---------|
| | crds | 0.0.0 |
| https://metallb.github.io/frr-k8s | frr-k8s | 0.0.10 |
| https://metallb.github.io/frr-k8s | frr-k8s | 0.0.11 |

## Values

Expand Down
Binary file removed charts/metallb/charts/frr-k8s-0.0.10.tgz
Binary file not shown.
Binary file added charts/metallb/charts/frr-k8s-0.0.11.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion config/frr-k8s/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/metallb/frr-k8s/config/default/?timeout=120&ref=v0.0.10
- https://github.com/metallb/frr-k8s/config/default/?timeout=120&ref=v0.0.11
- ../native
patchesStrategicMerge:
- speaker-patch.yaml
Expand Down
14 changes: 10 additions & 4 deletions config/manifests/metallb-frr-k8s-prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,12 @@ spec:
of seconds
rule: duration(self).getMilliseconds() % 1000 ==
0
disableMP:
default: false
description: To set if we want to disable MP BGP that
will separate IPv4 and IPv6 route exchanges into
distinct BGP sessions.
type: boolean
ebgpMultiHop:
description: EBGPMultiHop indicates if the BGPPeer
is multi-hops away.
Expand Down Expand Up @@ -2697,7 +2703,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/metallb/frr-k8s:v0.0.10
image: quay.io/metallb/frr-k8s:v0.0.11
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
Expand Down Expand Up @@ -2853,7 +2859,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/metallb/frr-k8s:v0.0.10
image: quay.io/metallb/frr-k8s:v0.0.11
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
Expand Down Expand Up @@ -2979,7 +2985,7 @@ spec:
- /bin/sh
- -c
- cp -f /frr-reloader.sh /etc/frr_reloader/
image: quay.io/metallb/frr-k8s:v0.0.10
image: quay.io/metallb/frr-k8s:v0.0.11
name: cp-reloader
volumeMounts:
- mountPath: /etc/frr_reloader
Expand All @@ -2988,7 +2994,7 @@ spec:
- /bin/sh
- -c
- cp -f /frr-metrics /etc/frr_metrics/
image: quay.io/metallb/frr-k8s:v0.0.10
image: quay.io/metallb/frr-k8s:v0.0.11
name: cp-metrics
volumeMounts:
- mountPath: /etc/frr_metrics
Expand Down
14 changes: 10 additions & 4 deletions config/manifests/metallb-frr-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,12 @@ spec:
of seconds
rule: duration(self).getMilliseconds() % 1000 ==
0
disableMP:
default: false
description: To set if we want to disable MP BGP that
will separate IPv4 and IPv6 route exchanges into
distinct BGP sessions.
type: boolean
ebgpMultiHop:
description: EBGPMultiHop indicates if the BGPPeer
is multi-hops away.
Expand Down Expand Up @@ -2579,7 +2585,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/metallb/frr-k8s:v0.0.10
image: quay.io/metallb/frr-k8s:v0.0.11
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
Expand Down Expand Up @@ -2735,7 +2741,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/metallb/frr-k8s:v0.0.10
image: quay.io/metallb/frr-k8s:v0.0.11
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
Expand Down Expand Up @@ -2861,7 +2867,7 @@ spec:
- /bin/sh
- -c
- cp -f /frr-reloader.sh /etc/frr_reloader/
image: quay.io/metallb/frr-k8s:v0.0.10
image: quay.io/metallb/frr-k8s:v0.0.11
name: cp-reloader
volumeMounts:
- mountPath: /etc/frr_reloader
Expand All @@ -2870,7 +2876,7 @@ spec:
- /bin/sh
- -c
- cp -f /frr-metrics /etc/frr_metrics/
image: quay.io/metallb/frr-k8s:v0.0.10
image: quay.io/metallb/frr-k8s:v0.0.11
name: cp-metrics
volumeMounts:
- mountPath: /etc/frr_metrics
Expand Down
2 changes: 1 addition & 1 deletion config/prometheus-frr-k8s/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/metallb/frr-k8s/config/prometheus/?timeout=120&ref=v0.0.10
- https://github.com/metallb/frr-k8s/config/prometheus/?timeout=120&ref=v0.0.11
- ../prometheus-native
patchesStrategicMerge:
- speaker-patch.yaml
Expand Down
8 changes: 4 additions & 4 deletions configmaptocrs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1.2

FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.8 AS builder
FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.9 AS builder
WORKDIR $GOPATH/go.universe.tf/metallb

RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,source=go.sum,target=go.sum \
--mount=type=bind,source=go.mod,target=go.mod \
go mod download -x
--mount=type=bind,source=go.sum,target=go.sum \
--mount=type=bind,source=go.mod,target=go.mod \
go mod download -x

ARG GIT_COMMIT=dev
ARG GIT_BRANCH=dev
Expand Down
8 changes: 4 additions & 4 deletions controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1.2

FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.8 AS builder
FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.9 AS builder
WORKDIR $GOPATH/go.universe.tf/metallb

RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,source=go.sum,target=go.sum \
--mount=type=bind,source=go.mod,target=go.mod \
go mod download -x
--mount=type=bind,source=go.sum,target=go.sum \
--mount=type=bind,source=go.mod,target=go.mod \
go mod download -x

ARG GIT_COMMIT=dev
ARG GIT_BRANCH=dev
Expand Down
33 changes: 2 additions & 31 deletions e2etest/bgptests/bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1342,11 +1342,12 @@ var _ = ginkgo.Describe("BGP", func() {
Expect(err).NotTo(HaveOccurred())
Expect(peer.Spec.Port).To(Equal(uint16(179)))
})
ginkgo.It("BGP Peer connect time", func() {
ginkgo.It("BGP Peer parameters", func() {
connectTime := time.Second * 5
resources := config.Resources{
Peers: metallb.PeersForContainers(FRRContainers, ipfamily.IPv4, func(p *metallbv1beta2.BGPPeer) {
p.Spec.ConnectTime = ptr.To(metav1.Duration{Duration: connectTime})
p.Spec.DisableMP = true
}),
}
err := ConfigUpdater.Update(resources)
Expand All @@ -1370,37 +1371,7 @@ var _ = ginkgo.Describe("BGP", func() {
if neighbor.ConfiguredConnectTime != int(connectTime.Seconds()) {
return fmt.Errorf("expected connect time to be %d, got %d", int(connectTime.Seconds()), neighbor.ConfiguredConnectTime)
}
}
return nil
}, 2*time.Minute, time.Second).ShouldNot(HaveOccurred())
}

})
ginkgo.It("FRR-MODE BGP Peer disable MP BGP", func() {
resources := config.Resources{
Peers: metallb.PeersForContainers(FRRContainers, ipfamily.DualStack, func(p *metallbv1beta2.BGPPeer) {
p.Spec.DisableMP = true
}),
}

err := ConfigUpdater.Update(resources)
Expect(err).NotTo(HaveOccurred())

speakerPods, err := metallb.SpeakerPods(cs)
Expect(err).NotTo(HaveOccurred())

for _, pod := range speakerPods {
podExec, err := FRRProvider.FRRExecutorFor(pod.Namespace, pod.Name)
Expect(err).NotTo(HaveOccurred())
Eventually(func() error {
neighbors, err := frr.NeighborsInfo(podExec)
if err != nil {
return err
}
if len(neighbors) == 0 {
return fmt.Errorf("expected at least 1 neighbor, got %d", len(neighbors))
}
for _, neighbor := range neighbors {
neighborFamily := ipfamily.ForAddress(neighbor.IP)
for _, family := range neighbor.AddressFamilies {
if !strings.Contains(family, string(neighborFamily)) {
Expand Down
4 changes: 2 additions & 2 deletions e2etest/pkg/frr/bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// useful for fetching informations from FRR (such as metrics) and we may need to move it
// to metallb.

// NeighborForContainer returns informations for the given neighbor in the given
// NeighborInfo returns informations for the given neighbor in the given
// executor.
func NeighborInfo(neighborName string, exec executor.Executor) (*Neighbor, error) {
res, err := exec.Exec("vtysh", "-c", fmt.Sprintf("show bgp neighbor %s json", neighborName))
Expand All @@ -31,7 +31,7 @@ func NeighborInfo(neighborName string, exec executor.Executor) (*Neighbor, error
return neighbor, nil
}

// NeighborsForContainer returns informations for the all the neighbors in the given
// NeighborsInfo returns informations for the all the neighbors in the given
// executor.
func NeighborsInfo(exec executor.Executor) ([]*Neighbor, error) {
res, err := exec.Exec("vtysh", "-c", "show bgp neighbor json")
Expand Down
Loading

0 comments on commit 7ebb4a2

Please sign in to comment.