forked from github/multus-cni
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e9b87fb05a | ||
|
25703fce21 | ||
|
6b38a213b1 | ||
|
2068ea9f77 |
2
.github/workflows/image-push-release.yml
vendored
2
.github/workflows/image-push-release.yml
vendored
@ -47,7 +47,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository }}:thick-amd64
|
ghcr.io/${{ github.repository }}:stable-thick-amd64
|
||||||
${{ steps.docker_meta.outputs.tags }}-thick-amd64
|
${{ steps.docker_meta.outputs.tags }}-thick-amd64
|
||||||
file: images/Dockerfile.thick
|
file: images/Dockerfile.thick
|
||||||
|
|
||||||
|
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@ -16,11 +16,10 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Run Revive
|
- name: Run Revive Action by pulling pre-built image
|
||||||
run: |
|
uses: docker://morphy/revive-action:v2
|
||||||
GO111MODULE=off go get github.com/mgechev/revive
|
with:
|
||||||
$(go env GOPATH)/bin/revive -exclude ./vendor/... ./... # this is ouput for user
|
exclude: "./vendor/..."
|
||||||
$(go env GOPATH)/bin/revive -exclude ./vendor/... ./...| xargs -0 -r false # this is for github actions
|
|
||||||
|
|
||||||
- name: Run go fmt
|
- name: Run go fmt
|
||||||
run: go fmt ./...
|
run: go fmt ./...
|
||||||
|
@ -122,7 +122,7 @@ spec:
|
|||||||
serviceAccountName: multus
|
serviceAccountName: multus
|
||||||
containers:
|
containers:
|
||||||
- name: kube-multus
|
- name: kube-multus
|
||||||
image: ghcr.io/k8snetworkplumbingwg/multus-cni:thick
|
image: ghcr.io/k8snetworkplumbingwg/multus-cni:v3.9.2-thick-amd64
|
||||||
command: [ "/usr/src/multus-cni/bin/multus-daemon" ]
|
command: [ "/usr/src/multus-cni/bin/multus-daemon" ]
|
||||||
args:
|
args:
|
||||||
- "-cni-version=0.3.1"
|
- "-cni-version=0.3.1"
|
||||||
@ -146,7 +146,7 @@ spec:
|
|||||||
mountPath: /host/opt/cni/bin
|
mountPath: /host/opt/cni/bin
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: install-multus-binary
|
- name: install-multus-binary
|
||||||
image: ghcr.io/k8snetworkplumbingwg/multus-cni:thick
|
image: ghcr.io/k8snetworkplumbingwg/multus-cni:v3.9.2-thick-amd64
|
||||||
command:
|
command:
|
||||||
- "cp"
|
- "cp"
|
||||||
- "/usr/src/multus-cni/bin/multus"
|
- "/usr/src/multus-cni/bin/multus"
|
||||||
@ -162,7 +162,7 @@ spec:
|
|||||||
mountPath: /host/opt/cni/bin
|
mountPath: /host/opt/cni/bin
|
||||||
mountPropagation: Bidirectional
|
mountPropagation: Bidirectional
|
||||||
- name: generate-kubeconfig
|
- name: generate-kubeconfig
|
||||||
image: ghcr.io/k8snetworkplumbingwg/multus-cni:thick
|
image: ghcr.io/k8snetworkplumbingwg/multus-cni:v3.9.2-thick-amd64
|
||||||
command:
|
command:
|
||||||
- "/usr/src/multus-cni/bin/generate-kubeconfig"
|
- "/usr/src/multus-cni/bin/generate-kubeconfig"
|
||||||
args:
|
args:
|
||||||
|
@ -7,7 +7,7 @@ ADD . /usr/src/multus-cni
|
|||||||
RUN cd /usr/src/multus-cni && \
|
RUN cd /usr/src/multus-cni && \
|
||||||
./hack/build-go.sh
|
./hack/build-go.sh
|
||||||
|
|
||||||
FROM centos:centos7
|
FROM python:slim
|
||||||
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
||||||
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
||||||
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
||||||
|
@ -11,7 +11,7 @@ RUN cd /usr/src/multus-cni && \
|
|||||||
./hack/build-go.sh
|
./hack/build-go.sh
|
||||||
|
|
||||||
# build arm container
|
# build arm container
|
||||||
FROM arm32v7/centos:7
|
FROM arm32v7/python:slim
|
||||||
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
||||||
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
||||||
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
||||||
|
@ -11,7 +11,7 @@ RUN cd /usr/src/multus-cni && \
|
|||||||
./hack/build-go.sh
|
./hack/build-go.sh
|
||||||
|
|
||||||
# build arm64 container
|
# build arm64 container
|
||||||
FROM arm64v8/centos:7
|
FROM arm64v8/python:slim
|
||||||
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
||||||
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
||||||
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
||||||
|
@ -11,7 +11,7 @@ RUN cd /usr/src/multus-cni && \
|
|||||||
./hack/build-go.sh
|
./hack/build-go.sh
|
||||||
|
|
||||||
# build ppc container
|
# build ppc container
|
||||||
FROM ppc64le/centos:latest
|
FROM ppc64le/python:slim
|
||||||
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
||||||
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
||||||
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
||||||
|
@ -11,7 +11,7 @@ RUN cd /usr/src/multus-cni && \
|
|||||||
./hack/build-go.sh
|
./hack/build-go.sh
|
||||||
|
|
||||||
# build s390x container
|
# build s390x container
|
||||||
FROM s390x/python:3-slim
|
FROM s390x/python:slim
|
||||||
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
||||||
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
||||||
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
||||||
|
@ -7,7 +7,7 @@ ADD . /usr/src/multus-cni
|
|||||||
RUN cd /usr/src/multus-cni && \
|
RUN cd /usr/src/multus-cni && \
|
||||||
./hack/build-go.sh
|
./hack/build-go.sh
|
||||||
|
|
||||||
FROM registry.access.redhat.com/ubi8/ubi-minimal
|
FROM debian:stable-slim
|
||||||
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/multus-cni
|
||||||
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
COPY --from=build /usr/src/multus-cni/bin /usr/src/multus-cni/bin
|
||||||
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
COPY --from=build /usr/src/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
|
||||||
|
@ -83,10 +83,6 @@ function warn()
|
|||||||
log "WARN: {$1}"
|
log "WARN: {$1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
if type python3 &> /dev/null; then
|
|
||||||
alias python=python3
|
|
||||||
fi
|
|
||||||
|
|
||||||
function checkCniVersion {
|
function checkCniVersion {
|
||||||
cniversion_python_tmpfile=$(mktemp)
|
cniversion_python_tmpfile=$(mktemp)
|
||||||
cat << EOF > $cniversion_python_tmpfile
|
cat << EOF > $cniversion_python_tmpfile
|
||||||
@ -103,7 +99,7 @@ if version(v_top_level) >= v_040 and version(v_nested) < v_040:
|
|||||||
msg = "Multus cni version is %s while master plugin cni version is %s"
|
msg = "Multus cni version is %s while master plugin cni version is %s"
|
||||||
print(msg % (v_top_level, v_nested))
|
print(msg % (v_top_level, v_nested))
|
||||||
EOF
|
EOF
|
||||||
python $cniversion_python_tmpfile $1 $2
|
python3 $cniversion_python_tmpfile $1 $2
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parse parameters given as arguments to this script.
|
# Parse parameters given as arguments to this script.
|
||||||
@ -364,7 +360,7 @@ if [ "$MULTUS_CONF_FILE" == "auto" ]; then
|
|||||||
|
|
||||||
if [ "$OVERRIDE_NETWORK_NAME" == "true" ]; then
|
if [ "$OVERRIDE_NETWORK_NAME" == "true" ]; then
|
||||||
MASTER_PLUGIN_NET_NAME="$(cat $MULTUS_AUTOCONF_DIR/$MASTER_PLUGIN | \
|
MASTER_PLUGIN_NET_NAME="$(cat $MULTUS_AUTOCONF_DIR/$MASTER_PLUGIN | \
|
||||||
python -c 'import json,sys;print(json.load(sys.stdin)["name"])')"
|
python3 -c 'import json,sys;print(json.load(sys.stdin)["name"])')"
|
||||||
else
|
else
|
||||||
MASTER_PLUGIN_NET_NAME="multus-cni-network"
|
MASTER_PLUGIN_NET_NAME="multus-cni-network"
|
||||||
fi
|
fi
|
||||||
@ -386,7 +382,7 @@ else:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
NESTED_CAPABILITIES_STRING="$(cat $MULTUS_AUTOCONF_DIR/$MASTER_PLUGIN | \
|
NESTED_CAPABILITIES_STRING="$(cat $MULTUS_AUTOCONF_DIR/$MASTER_PLUGIN | \
|
||||||
python $capabilities_python_filter_tmpfile)"
|
python3 $capabilities_python_filter_tmpfile)"
|
||||||
rm $capabilities_python_filter_tmpfile
|
rm $capabilities_python_filter_tmpfile
|
||||||
log "Nested capabilities string: $NESTED_CAPABILITIES_STRING"
|
log "Nested capabilities string: $NESTED_CAPABILITIES_STRING"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user