mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
images: tag with intel prefix
In preparations to get some of the images to hub.docker.com/intel, start using intel/ prefix. Moreover, set the Makefile variables so that the images built by make [images|demos] can easily be pushed to any registry/org by 'docker push' (e.g., by Jenkins). Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
parent
9d585ea0b8
commit
d06f98690f
9
Makefile
9
Makefile
@ -41,19 +41,22 @@ build: $(cmds)
|
|||||||
clean:
|
clean:
|
||||||
@for cmd in $(cmds) ; do pwd=$(shell pwd) ; cd cmd/$$cmd ; $(GO) clean ; cd $$pwd ; done
|
@for cmd in $(cmds) ; do pwd=$(shell pwd) ; cd cmd/$$cmd ; $(GO) clean ; cd $$pwd ; done
|
||||||
|
|
||||||
TAG?=$(shell git rev-parse HEAD)
|
ORG?=intel
|
||||||
|
REG?=$(ORG)/
|
||||||
|
TAG?=devel
|
||||||
|
export TAG
|
||||||
|
|
||||||
images = $(shell ls build/docker/*.Dockerfile | sed 's/.*\/\(.\+\)\.Dockerfile/\1/')
|
images = $(shell ls build/docker/*.Dockerfile | sed 's/.*\/\(.\+\)\.Dockerfile/\1/')
|
||||||
|
|
||||||
$(images):
|
$(images):
|
||||||
@build/docker/build-image.sh $@ $(BUILDER)
|
@build/docker/build-image.sh $(REG)$@ $(BUILDER)
|
||||||
|
|
||||||
images: $(images)
|
images: $(images)
|
||||||
|
|
||||||
demos = $(shell cd demo/ && ls -d */ | sed 's/\(.\+\)\//\1/g')
|
demos = $(shell cd demo/ && ls -d */ | sed 's/\(.\+\)\//\1/g')
|
||||||
|
|
||||||
$(demos):
|
$(demos):
|
||||||
@cd demo/ && ./build-image.sh $@ $(BUILDER)
|
@cd demo/ && ./build-image.sh $(REG)$@ $(BUILDER)
|
||||||
|
|
||||||
demos: $(demos)
|
demos: $(demos)
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
IMG=$1
|
IMG=$1
|
||||||
BUILDER=$2
|
BUILDER=$2
|
||||||
|
|
||||||
DOCKERFILE="$(dirname $0)/${IMG}.Dockerfile"
|
DOCKERFILE="$(dirname $0)/$(basename ${IMG}).Dockerfile"
|
||||||
|
|
||||||
if [ -z "$IMG" ]; then
|
if [ -z "$IMG" ]; then
|
||||||
(>&2 echo "Usage: $0 <Dockerfile>")
|
(>&2 echo "Usage: $0 <Dockerfile>")
|
||||||
@ -15,14 +15,15 @@ if [ ! -e "${DOCKERFILE}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TAG=$(git rev-parse HEAD)
|
TAG=${TAG:-devel}
|
||||||
|
SRCREV=$(git rev-parse HEAD)
|
||||||
|
|
||||||
if [ -z "${BUILDER}" -o "${BUILDER}" = 'docker' ] ; then
|
if [ -z "${BUILDER}" -o "${BUILDER}" = 'docker' ] ; then
|
||||||
docker build --pull -t ${IMG}:${TAG} -f ${DOCKERFILE} .
|
docker build --pull -t ${IMG}:${TAG} -f ${DOCKERFILE} .
|
||||||
docker tag ${IMG}:${TAG} ${IMG}:devel
|
docker tag ${IMG}:${TAG} ${IMG}:${SRCREV}
|
||||||
elif [ "${BUILDER}" = 'buildah' ] ; then
|
elif [ "${BUILDER}" = 'buildah' ] ; then
|
||||||
buildah bud --pull-always -t ${IMG}:${TAG} -f ${DOCKERFILE} .
|
buildah bud --pull-always -t ${IMG}:${TAG} -f ${DOCKERFILE} .
|
||||||
buildah tag ${IMG}:${TAG} ${IMG}:devel
|
buildah tag ${IMG}:${TAG} ${IMG}:${SRCREV}
|
||||||
else
|
else
|
||||||
(>&2 echo "Unknown builder ${BUILDER}")
|
(>&2 echo "Unknown builder ${BUILDER}")
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -2,26 +2,28 @@
|
|||||||
|
|
||||||
IMG=$1
|
IMG=$1
|
||||||
BUILDER=$2
|
BUILDER=$2
|
||||||
|
DIR=$(basename $IMG)
|
||||||
|
|
||||||
if [ -z "$IMG" ]; then
|
if [ -z "$DIR" ]; then
|
||||||
(>&2 echo "Usage: $0 <image directory>")
|
(>&2 echo "Usage: $0 <image directory>")
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$IMG" ]; then
|
if [ ! -d "$DIR" ]; then
|
||||||
(>&2 echo "Directory $IMG doesn't exist")
|
(>&2 echo "Directory $DIR doesn't exist")
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CWD=`dirname $0`
|
CWD=`dirname $0`
|
||||||
TAG=`git rev-parse HEAD`
|
TAG=${TAG:-devel}
|
||||||
|
SRCREV=$(git rev-parse HEAD)
|
||||||
|
|
||||||
if [ -z "$BUILDER" -o "$BUILDER" = 'docker' ] ; then
|
if [ -z "$BUILDER" -o "$BUILDER" = 'docker' ] ; then
|
||||||
docker build --rm -t ${IMG}:${TAG} "$CWD/$IMG/"
|
docker build --pull -t ${IMG}:${TAG} "$CWD/$DIR/"
|
||||||
docker tag ${IMG}:${TAG} ${IMG}:devel
|
docker tag ${IMG}:${TAG} ${IMG}:${SRCREV}
|
||||||
elif [ "$BUILDER" = 'buildah' ] ; then
|
elif [ "$BUILDER" = 'buildah' ] ; then
|
||||||
buildah bud -t ${IMG}:${TAG} "$CWD/$IMG/"
|
buildah bud --pull-always -t ${IMG}:${TAG} "$CWD/$DIR/"
|
||||||
buildah tag ${IMG}:${TAG} ${IMG}:devel
|
buildah tag ${IMG}:${TAG} ${IMG}:${SRCREV}
|
||||||
else
|
else
|
||||||
(>&2 echo "Unknown builder $BUILDER")
|
(>&2 echo "Unknown builder $BUILDER")
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -13,7 +13,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: fpga-mutator
|
- name: fpga-mutator
|
||||||
image: intel-fpga-admissionwebhook:devel
|
image: intel/intel-fpga-admissionwebhook:devel
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
args:
|
args:
|
||||||
- -tls-cert-file=/etc/webhook/certs/cert.pem
|
- -tls-cert-file=/etc/webhook/certs/cert.pem
|
||||||
|
@ -17,7 +17,7 @@ spec:
|
|||||||
serviceAccountName: intel-fpga-plugin-controller
|
serviceAccountName: intel-fpga-plugin-controller
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: intel-fpga-initcontainer
|
- name: intel-fpga-initcontainer
|
||||||
image: intel-fpga-initcontainer:devel
|
image: intel/intel-fpga-initcontainer:devel
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /opt/intel/fpga-sw
|
- mountPath: /opt/intel/fpga-sw
|
||||||
@ -31,7 +31,7 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: spec.nodeName
|
fieldPath: spec.nodeName
|
||||||
image: intel-fpga-plugin:devel
|
image: intel/intel-fpga-plugin:devel
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: devfs
|
- name: devfs
|
||||||
|
@ -21,7 +21,7 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: spec.nodeName
|
fieldPath: spec.nodeName
|
||||||
image: intel-gpu-plugin:devel
|
image: intel/intel-gpu-plugin:devel
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: devfs
|
- name: devfs
|
||||||
|
@ -5,7 +5,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: crypto-perf
|
- name: crypto-perf
|
||||||
image: crypto-perf:devel
|
image: intel/crypto-perf:devel
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command: [ "/bin/bash", "-c", "--" ]
|
command: [ "/bin/bash", "-c", "--" ]
|
||||||
args: [ "while true; do sleep 300000; done;" ]
|
args: [ "while true; do sleep 300000; done;" ]
|
||||||
|
@ -15,7 +15,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: intel-qat-plugin
|
- name: intel-qat-plugin
|
||||||
image: intel-qat-plugin:devel
|
image: intel/intel-qat-plugin:devel
|
||||||
env:
|
env:
|
||||||
- name: DPDK_DRIVER
|
- name: DPDK_DRIVER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
@ -17,7 +17,7 @@ spec:
|
|||||||
- name: intel-qat-kernel-plugin
|
- name: intel-qat-kernel-plugin
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
image: intel-qat-plugin:devel
|
image: intel/intel-qat-plugin:devel
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command: ["/usr/bin/intel_qat_device_plugin", "-mode", "kernel"]
|
command: ["/usr/bin/intel_qat_device_plugin", "-mode", "kernel"]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
Loading…
Reference in New Issue
Block a user