Skip to content

Commit

Permalink
Merge pull request #62 from senthilrch/senthilrch
Browse files Browse the repository at this point in the history
PR for release v0.7.1
  • Loading branch information
senthilrch authored Oct 11, 2020
2 parents 981b537 + 63e3f15 commit 70d6468
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 39 deletions.
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
- docker
env:
# Enable docker buildx plugin
- DOCKER_CLI_EXPERIMENTAL=enabled
- DOCKER_CLI_EXPERIMENTAL=enabled COVERALLS_SERVICE_JOB_ID=$TRAVIS_JOB_ID COVERALLS_SERVICE_NAME="kube-fledged code coverage"
before_install:
# Install latest stable version of docker-engine as described in docker documentation:-
# https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
Expand All @@ -22,12 +22,13 @@ install:
- go get github.com/mattn/goveralls
- go get -u golang.org/x/lint/golint
stages:
# This stage builds fledged controller image, performs tests in "hack" and runs unit tests with coverage
- build_amd64
# This stage builds multi-arch images for fledged controller, fledged client and operator (only for PR builds)
# This stage builds controller and webhook-server images, performs tests in "hack" and runs unit tests with coverage
- name: build_amd64
if: type = push
# This stage builds all four multi-arch images and pushes them to docker hub (only for PR builds)
- name: build_multiarch
if: type = pull_request
# This stage builds all three multi-arch images and pushes them to docker hub (only for release tags)
# This stage builds all four multi-arch images and pushes them to docker hub (only for release tags)
- name: build_release
if: tag IS present
jobs:
Expand All @@ -45,12 +46,11 @@ jobs:
- $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=coverage.out -service=travis-ci
- stage: build_multiarch
script:
# BUILD_OUTPUT is left empty to indicate buildx to leave the built images in it's cache
- travis_wait 60 make BUILD_OUTPUT= release
- echo "$DOCKERHUB_PSWD" | docker login --username "$DOCKERHUB_USER" --password-stdin
# BUILD_OUTPUT=--push requests buildx to push the built images to docker hub
- travis_wait 60 make release
- stage: build_release
script:
- echo "$DOCKERHUB_PSWD" | docker login --username "$DOCKERHUB_USER" --password-stdin
# BUILD_OUTPUT=--push requests buildx to push the built images to docker hub
- travis_wait 60 make BUILD_OUTPUT=--push release
- make latest-tag

- travis_wait 60 make release
24 changes: 5 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ifndef OPERATOR_IMAGE_REPO
endif

ifndef RELEASE_VERSION
RELEASE_VERSION=v0.7.0
RELEASE_VERSION=v0.7.1
endif

ifndef DOCKER_VERSION
Expand Down Expand Up @@ -120,7 +120,7 @@ clean-operator:

controller-image: clean-controller
docker buildx build --platform=${TARGET_PLATFORMS} -t ${CONTROLLER_IMAGE_REPO}:${RELEASE_VERSION} \
-f build/Dockerfile.controller ${HTTP_PROXY_CONFIG} ${HTTPS_PROXY_CONFIG} \
-t ${CONTROLLER_IMAGE_REPO}:latest -f build/Dockerfile.controller ${HTTP_PROXY_CONFIG} ${HTTPS_PROXY_CONFIG} \
--build-arg GOLANG_VERSION=${GOLANG_VERSION} --build-arg ALPINE_VERSION=${ALPINE_VERSION} --progress=plain ${BUILD_OUTPUT} .

controller-amd64: TARGET_PLATFORMS=linux/amd64
Expand All @@ -134,7 +134,7 @@ controller-dev: clean-controller

webhook-server-image: clean-webhook-server
docker buildx build --platform=${TARGET_PLATFORMS} -t ${WEBHOOK_SERVER_IMAGE_REPO}:${RELEASE_VERSION} \
-f build/Dockerfile.webhook_server ${HTTP_PROXY_CONFIG} ${HTTPS_PROXY_CONFIG} \
-t ${WEBHOOK_SERVER_IMAGE_REPO}:latest -f build/Dockerfile.webhook_server ${HTTP_PROXY_CONFIG} ${HTTPS_PROXY_CONFIG} \
--build-arg GOLANG_VERSION=${GOLANG_VERSION} --build-arg ALPINE_VERSION=${ALPINE_VERSION} --progress=plain ${BUILD_OUTPUT} .

webhook-server-amd64: TARGET_PLATFORMS=linux/amd64
Expand All @@ -148,31 +148,17 @@ webhook-server-dev: clean-webhook-server

cri-client-image: clean-cri-client
docker buildx build --platform=${TARGET_PLATFORMS} -t ${CRI_CLIENT_IMAGE_REPO}:${RELEASE_VERSION} \
-f build/Dockerfile.cri_client ${HTTP_PROXY_CONFIG} ${HTTPS_PROXY_CONFIG} \
-t ${CRI_CLIENT_IMAGE_REPO}:latest -f build/Dockerfile.cri_client ${HTTP_PROXY_CONFIG} ${HTTPS_PROXY_CONFIG} \
--build-arg DOCKER_VERSION=${DOCKER_VERSION} --build-arg CRICTL_VERSION=${CRICTL_VERSION} \
--build-arg ALPINE_VERSION=${ALPINE_VERSION} --progress=plain ${BUILD_OUTPUT} .

operator-image: clean-operator
cd deploy/kubefledged-operator && \
docker buildx build --platform=${OPERATOR_TARGET_PLATFORMS} -t ${OPERATOR_IMAGE_REPO}:${RELEASE_VERSION} \
-f build/Dockerfile --build-arg OPERATORSDK_VERSION=${OPERATORSDK_VERSION} --progress=plain ${BUILD_OUTPUT} .
-t ${OPERATOR_IMAGE_REPO}:latest -f build/Dockerfile --build-arg OPERATORSDK_VERSION=${OPERATORSDK_VERSION} --progress=plain ${BUILD_OUTPUT} .

release: install-buildx controller-image webhook-server-image cri-client-image operator-image

latest-tag:
docker pull ${CONTROLLER_IMAGE_REPO}:${RELEASE_VERSION}
docker tag ${CONTROLLER_IMAGE_REPO}:${RELEASE_VERSION} ${CONTROLLER_IMAGE_REPO}:latest
docker push ${CONTROLLER_IMAGE_REPO}:latest
docker pull ${WEBHOOK_SERVER_IMAGE_REPO}:${RELEASE_VERSION}
docker tag ${WEBHOOK_SERVER_IMAGE_REPO}:${RELEASE_VERSION} ${WEBHOOK_SERVER_IMAGE_REPO}:latest
docker push ${WEBHOOK_SERVER_IMAGE_REPO}:latest
docker pull ${CRI_CLIENT_IMAGE_REPO}:${RELEASE_VERSION}
docker tag ${CRI_CLIENT_IMAGE_REPO}:${RELEASE_VERSION} ${CRI_CLIENT_IMAGE_REPO}:latest
docker push ${CRI_CLIENT_IMAGE_REPO}:latest
docker pull ${OPERATOR_IMAGE_REPO}:${RELEASE_VERSION}
docker tag ${OPERATOR_IMAGE_REPO}:${RELEASE_VERSION} ${OPERATOR_IMAGE_REPO}:latest
docker push ${OPERATOR_IMAGE_REPO}:latest

install-buildx:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
-docker buildx rm multibuilder
Expand Down
27 changes: 23 additions & 4 deletions build/Dockerfile.cri_client
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,32 @@ RUN apk add --no-cache bash curl openssh-client

ARG DOCKER_VERSION
ARG CRICTL_VERSION
ARG TARGETPLATFORM

RUN curl -L -o /tmp/docker-$DOCKER_VERSION.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$DOCKER_VERSION.tgz && \
tar -xz -C /tmp -f /tmp/docker-$DOCKER_VERSION.tgz && \
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then\
curl -L -o /tmp/docker-$DOCKER_VERSION.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$DOCKER_VERSION.tgz;\
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then\
curl -L -o /tmp/docker-$DOCKER_VERSION.tgz https://download.docker.com/linux/static/stable/aarch64/docker-$DOCKER_VERSION.tgz;\
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then\
curl -L -o /tmp/docker-$DOCKER_VERSION.tgz https://download.docker.com/linux/static/stable/armhf/docker-$DOCKER_VERSION.tgz;\
else\
:;\
fi

RUN tar -xz -C /tmp -f /tmp/docker-$DOCKER_VERSION.tgz && \
mv /tmp/docker/docker /usr/bin && \
rm -rf /tmp/docker-$DOCKER_VERSION.tgz /tmp/docker

RUN curl -L -o /tmp/crictl-$CRICTL_VERSION.tgz https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRICTL_VERSION/crictl-$CRICTL_VERSION-linux-amd64.tar.gz && \
tar -xz -C /tmp -f /tmp/crictl-$CRICTL_VERSION.tgz && \
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then\
curl -L -o /tmp/crictl-$CRICTL_VERSION.tgz https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRICTL_VERSION/crictl-$CRICTL_VERSION-linux-amd64.tar.gz;\
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then\
curl -L -o /tmp/crictl-$CRICTL_VERSION.tgz https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRICTL_VERSION/crictl-$CRICTL_VERSION-linux-arm64.tar.gz;\
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then\
curl -L -o /tmp/crictl-$CRICTL_VERSION.tgz https://github.com/kubernetes-sigs/cri-tools/releases/download/$CRICTL_VERSION/crictl-$CRICTL_VERSION-linux-arm.tar.gz;\
else\
:;\
fi

RUN tar -xz -C /tmp -f /tmp/crictl-$CRICTL_VERSION.tgz && \
mv /tmp/crictl /usr/bin && \
rm -rf /tmp/crictl-$CRICTL_VERSION.tgz /tmp/crictl
4 changes: 2 additions & 2 deletions deploy/kubefledged-deployment-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ spec:
app: kubefledged
spec:
containers:
- image: senthilrch/kubefledged-controller:v0.7.0
- image: senthilrch/kubefledged-controller:v0.7.1
command: ["/opt/bin/kubefledged-controller"]
args:
- "--stderrthreshold=INFO"
- "--image-pull-deadline-duration=5m"
- "--image-cache-refresh-frequency=15m"
- "--cri-client-image=senthilrch/kubefledged-cri-client:v0.7.0"
- "--cri-client-image=senthilrch/kubefledged-cri-client:v0.7.1"
- "--image-pull-policy=IfNotPresent"
imagePullPolicy: Always
name: controller
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubefledged-deployment-webhook-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
app: kubefledged
spec:
containers:
- image: senthilrch/kubefledged-webhook-server:v0.7.0
- image: senthilrch/kubefledged-webhook-server:v0.7.1
command: ["/opt/bin/kubefledged-webhook-server"]
args:
- "--stderrthreshold=INFO"
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubefledged-operator/deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
containers:
- name: kubefledged-operator
# Replace this with the built image name
image: docker.io/senthilrch/kubefledged-operator:v0.7.0
image: docker.io/senthilrch/kubefledged-operator:v0.7.1
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: v0.7.0
version: v0.7.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v0.7.0
appVersion: v0.7.1

0 comments on commit 70d6468

Please sign in to comment.