-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
passt: Build and publish Passt binding CNI image
Include DaemonSet manifest to deploy the binary on the cluster nodes. Signed-off-by: Or Shoval <[email protected]>
- Loading branch information
Showing
5 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ on: | |
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: kubevirt/ipam-controller | ||
PASST_BINDING_CNI_IMAGE_NAME: kubevirt/passt-binding-cni | ||
|
||
jobs: | ||
push-amd64: | ||
|
@@ -39,6 +40,11 @@ jobs: | |
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Fetch KubeVirt Release | ||
run: | | ||
KUBEVIRT_VERSION=$(curl -sSL https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirt/stable.txt) | ||
echo "KUBEVIRT_VERSION=${KUBEVIRT_VERSION}" >> $GITHUB_ENV | ||
- name: Push latest container image | ||
if: github.repository_owner == 'kubevirt' | ||
uses: docker/[email protected] | ||
|
@@ -48,6 +54,17 @@ jobs: | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | ||
file: Dockerfile | ||
|
||
- name: Push latest passt binding cni container image | ||
if: github.repository_owner == 'kubevirt' | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.PASST_BINDING_CNI_IMAGE_NAME }}:latest | ||
file: passt/Dockerfile | ||
build-args: | | ||
KUBEVIRT_VERSION=${{ env.KUBEVIRT_VERSION }} | ||
- name: Push stable container image | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: docker/[email protected] | ||
|
@@ -57,6 +74,17 @@ jobs: | |
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | ||
file: Dockerfile | ||
|
||
- name: Push stable passt binding cni container image | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.PASST_BINDING_CNI_IMAGE_NAME }}:${{ github.ref_name }} | ||
file: passt/Dockerfile | ||
build-args: | | ||
KUBEVIRT_VERSION=${{ env.KUBEVIRT_VERSION }} | ||
- name: Template release manifests | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: IMG=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} make build-installer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM registry.access.redhat.com/ubi9/ubi-minimal | ||
|
||
ARG KUBEVIRT_VERSION | ||
|
||
ENV CNI_PATH="/cni" | ||
|
||
RUN mkdir -p ${CNI_PATH} | ||
ADD https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-passt-binding ${CNI_PATH}/network-passt-binding | ||
RUN chmod +x ${CNI_PATH}/network-passt-binding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: passt-binding-cni | ||
namespace: kube-system | ||
labels: | ||
tier: node | ||
app: passt-binding-cni | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: passt-binding-cni | ||
updateStrategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 10% | ||
template: | ||
metadata: | ||
labels: | ||
name: passt-binding-cni | ||
tier: node | ||
app: passt-binding-cni | ||
annotations: | ||
description: passt-binding-cni installs 'passt binding' CNI on cluster nodes | ||
spec: | ||
priorityClassName: system-cluster-critical | ||
containers: | ||
- name: installer | ||
image: ghcr.io/kubevirt/passt-binding-cni:latest | ||
command: [ "/bin/sh", "-ce" ] | ||
args: | ||
- | | ||
ls -la "/cni/network-passt-binding" | ||
cp -f "/cni/network-passt-binding" "/opt/cni/bin" | ||
echo "passt binding CNI plugin installation complete..sleep inf" | ||
sleep infinity | ||
resources: | ||
requests: | ||
cpu: "10m" | ||
memory: "15Mi" | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- name: cnibin | ||
mountPath: /opt/cni/bin | ||
volumes: | ||
- name: cnibin | ||
hostPath: | ||
path: /opt/cni/bin |