Skip to content

Commit

Permalink
Merge pull request #86 from fedepaol/ocp/bump090922
Browse files Browse the repository at this point in the history
Upstream bump - 090922
  • Loading branch information
openshift-merge-robot committed Sep 9, 2022
2 parents 0336ec8 + 5fc2592 commit 780fd28
Show file tree
Hide file tree
Showing 36 changed files with 1,009 additions and 160 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ jobs:
spec:
logLevel: debug
EOF
sudo -E env "PATH=$PATH" inv e2etest --skip "IPV6|DUALSTACK|metrics" -e /tmp/kind_logs
sudo -E env "PATH=$PATH" inv e2etest --skip "IPV6|DUALSTACK|metrics|L2-interface selector" -e /tmp/kind_logs
- name: Collect Logs
if: ${{ failure() }}
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jobs:
publish-images:
runs-on: ubuntu-20.04
needs: [unit-tests]
permissions:
contents: read
id-token: write # needed for signing the images with GitHub OIDC Token
strategy:
fail-fast: true
matrix:
Expand All @@ -57,6 +61,11 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Install Cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: "v1.9.0"

- name: Code checkout
uses: actions/checkout@v3

Expand Down Expand Up @@ -86,6 +95,7 @@ jobs:
- name: Build and push ${{ matrix.image }}
uses: docker/build-push-action@v3
id: build-and-push
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -98,3 +108,56 @@ jobs:
build-args: |
GIT_BRANCH: ${{ github.ref_name }}
GIT_COMMIT: ${{ github.sha }}
- name: Cosign sign tags
run: cosign sign ${TAGS}
env:
TAGS: ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }}
COSIGN_EXPERIMENTAL: 1

release-charts:
needs: [publish-images]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Fetch entire history. Required for chart-releaser; see https://github.com/helm/chart-releaser-action/issues/13#issuecomment-602063896
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Chart releaser
if: startsWith(github.ref, 'refs/tags/v') # we craft releases only for tags
run: |
# Download chart releaser
curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/v1.4.0/chart-releaser_1.4.0_linux_amd64.tar.gz"
tar -xzf cr.tar.gz
rm -f cr.tar.gz
repo=$(basename "$GITHUB_REPOSITORY")
owner=$(dirname "$GITHUB_REPOSITORY")
tag="${GITHUB_REF_NAME:1}"
exists=$(curl -s -H "Accept: application/vnd.github.v3+json" https://github.com/$GITHUB_REPOSITORY/releases/tag/$repo-chart-$tag -w %{http_code} -o /dev/null)
if [[ $exists != "200" ]]; then
echo "Creating release..."
# package chart
./cr package charts/$repo
# upload chart to github releases
./cr upload \
--owner "$owner" \
--git-repo "$repo" \
--release-name-template "{{ .Name }}-chart-{{ .Version }}" \
--token "${{ secrets.GITHUB_TOKEN }}"
# Update index and push to github pages
./cr index \
--owner "$owner" \
--git-repo "$repo" \
--index-path index.yaml \
--release-name-template "{{ .Name }}-chart-{{ .Version }}" \
--push
else
echo "Release already exists"
fi
53 changes: 0 additions & 53 deletions .github/workflows/release-chart.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions api/v1beta1/l2advertisement_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ type L2AdvertisementSpec struct {
// NodeSelectors allows to limit the nodes to announce as next hops for the LoadBalancer IP. When empty, all the nodes having are announced as next hops.
// +optional
NodeSelectors []metav1.LabelSelector `json:"nodeSelectors,omitempty"`
// A list of interfaces to announce from. The LB IP will be announced only from these interfaces.
// If the field is not set, we advertise from all the interfaces on the host.
// +optional
Interfaces []string `json:"interfaces,omitempty"`
}

// L2AdvertisementStatus defines the observed state of L2Advertisement.
Expand Down
1 change: 1 addition & 0 deletions charts/metallb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ A network load-balancer implementation for Kubernetes using standard routing pro
| speaker.frr.image.pullPolicy | string | `nil` | |
| speaker.frr.image.repository | string | `"frrouting/frr"` | |
| speaker.frr.image.tag | string | `"v7.5.1"` | |
| speaker.frr.metricsPort | int | `7473` | |
| speaker.image.pullPolicy | string | `nil` | |
| speaker.image.repository | string | `"quay.io/metallb/speaker"` | |
| speaker.image.tag | string | `nil` | |
Expand Down
7 changes: 7 additions & 0 deletions charts/metallb/charts/crds/templates/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,13 @@ spec:
spec:
description: L2AdvertisementSpec defines the desired state of L2Advertisement.
properties:
interfaces:
description: A list of interfaces to announce from. The LB IP will
be announced only from these interfaces. If the field is not set,
we advertise from all the interfaces on the host.
items:
type: string
type: array
ipAddressPoolSelectors:
description: A selector for the IPAddressPools which would get advertised
via this advertisement. If no IPAddressPool is selected by this
Expand Down
4 changes: 2 additions & 2 deletions charts/metallb/templates/speaker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@ spec:
image: {{ .Values.speaker.frr.image.repository }}:{{ .Values.speaker.frr.image.tag | default .Chart.AppVersion }}
command: ["/etc/frr_metrics/frr-metrics"]
args:
- --metrics-port=7473
- --metrics-port={{ .Values.speaker.frr.metricsPort }}
ports:
- containerPort: 7473
- containerPort: {{ .Values.speaker.frr.metricsPort }}
name: monitoring
volumeMounts:
- name: frr-sockets
Expand Down
2 changes: 1 addition & 1 deletion charts/metallb/templates/webhooks.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: validating-webhook-configuration
name: metallb-webhook-configuration
labels:
{{- include "metallb.labels" . | nindent 4 }}
webhooks:
Expand Down
1 change: 1 addition & 0 deletions charts/metallb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ speaker:
repository: frrouting/frr
tag: v7.5.1
pullPolicy:
metricsPort: 7473

# if set, enables a rbac proxy sidecar container on the speaker to
# expose the frr metrics via tls.
Expand Down
7 changes: 7 additions & 0 deletions config/crd/bases/metallb.io_l2advertisements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ spec:
spec:
description: L2AdvertisementSpec defines the desired state of L2Advertisement.
properties:
interfaces:
description: A list of interfaces to announce from. The LB IP will
be announced only from these interfaces. If the field is not set,
we advertise from all the interfaces on the host.
items:
type: string
type: array
ipAddressPoolSelectors:
description: A selector for the IPAddressPools which would get advertised
via this advertisement. If no IPAddressPool is selected by this
Expand Down
7 changes: 7 additions & 0 deletions config/manifests/metallb-frr-prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,13 @@ spec:
spec:
description: L2AdvertisementSpec defines the desired state of L2Advertisement.
properties:
interfaces:
description: A list of interfaces to announce from. The LB IP will
be announced only from these interfaces. If the field is not set,
we advertise from all the interfaces on the host.
items:
type: string
type: array
ipAddressPoolSelectors:
description: A selector for the IPAddressPools which would get advertised
via this advertisement. If no IPAddressPool is selected by this
Expand Down
9 changes: 8 additions & 1 deletion config/manifests/metallb-frr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,13 @@ spec:
spec:
description: L2AdvertisementSpec defines the desired state of L2Advertisement.
properties:
interfaces:
description: A list of interfaces to announce from. The LB IP will
be announced only from these interfaces. If the field is not set,
we advertise from all the interfaces on the host.
items:
type: string
type: array
ipAddressPoolSelectors:
description: A selector for the IPAddressPools which would get advertised
via this advertisement. If no IPAddressPool is selected by this
Expand Down Expand Up @@ -1863,7 +1870,7 @@ apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: validating-webhook-configuration
name: metallb-webhook-configuration
webhooks:
- admissionReviewVersions:
- v1
Expand Down
7 changes: 7 additions & 0 deletions config/manifests/metallb-native-prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,13 @@ spec:
spec:
description: L2AdvertisementSpec defines the desired state of L2Advertisement.
properties:
interfaces:
description: A list of interfaces to announce from. The LB IP will
be announced only from these interfaces. If the field is not set,
we advertise from all the interfaces on the host.
items:
type: string
type: array
ipAddressPoolSelectors:
description: A selector for the IPAddressPools which would get advertised
via this advertisement. If no IPAddressPool is selected by this
Expand Down
9 changes: 8 additions & 1 deletion config/manifests/metallb-native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,13 @@ spec:
spec:
description: L2AdvertisementSpec defines the desired state of L2Advertisement.
properties:
interfaces:
description: A list of interfaces to announce from. The LB IP will
be announced only from these interfaces. If the field is not set,
we advertise from all the interfaces on the host.
items:
type: string
type: array
ipAddressPoolSelectors:
description: A selector for the IPAddressPools which would get advertised
via this advertisement. If no IPAddressPool is selected by this
Expand Down Expand Up @@ -1653,7 +1660,7 @@ apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: validating-webhook-configuration
name: metallb-webhook-configuration
webhooks:
- admissionReviewVersions:
- v1
Expand Down
7 changes: 7 additions & 0 deletions config/webhook/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ resources:

configurations:
- kustomizeconfig.yaml

patchesJson6902:
- path: patches/patch_webhook_configuration.yaml
target:
version: v1
kind: ValidatingWebhookConfiguration
name: validating-webhook-configuration
4 changes: 4 additions & 0 deletions config/webhook/patches/patch_webhook_configuration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- op: replace
path: /metadata/name
value: metallb-webhook-configuration

0 comments on commit 780fd28

Please sign in to comment.