Skip to content

Commit

Permalink
Merge pull request #346 from plotly/update-k8s-version
Browse files Browse the repository at this point in the history
Support k8s >= 1.16
  • Loading branch information
Jody McIntyre authored Sep 22, 2020
2 parents 6f4b8a5 + 00a0835 commit a47c8b9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,23 @@ jobs:
keys:
- v3-npm-
- run:
name: Build Docker image
name: Build and push Docker image
command: |
docker build -f deployment/Dockerfile -t quay.io/plotly/image-exporter:$CIRCLE_SHA1 .
docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
docker push quay.io/plotly/image-exporter:$CIRCLE_SHA1
docker tag quay.io/plotly/image-exporter:$CIRCLE_SHA1 quay.io/plotly/orca:$CIRCLE_SHA1
docker push quay.io/plotly/orca:$CIRCLE_SHA1
- run:
name: Smoke test Docker image
command: |
docker run -d -p 9091:9091/tcp --name imageserver quay.io/plotly/image-exporter:$CIRCLE_SHA1
docker run --network container:imageserver quay.io/plotly/wget wget --retry-connrefused --waitretry=1 -t 60 -O /dev/null --progress=dot http://localhost:9091/ping
- run:
name: Push Docker image to Quay
name: Tag and release Docker image
command: |
docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
docker push quay.io/plotly/image-exporter:$CIRCLE_SHA1
docker tag quay.io/plotly/image-exporter:$CIRCLE_SHA1 quay.io/plotly/orca:$CIRCLE_SHA1
docker push quay.io/plotly/orca:$CIRCLE_SHA1
# Is this a "version" commit? e.g. from `npm version`
# inspired by: https://discuss.circleci.com/t/git-tag-deploys-in-2-0/9493/4
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; then
Expand Down
13 changes: 8 additions & 5 deletions deployment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FROM ubuntu:xenial

RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg curl ca-certificates xz-utils wget libgtk2.0-0 libgconf-2-4 \
libxss1 \
&& rm -rf /var/lib/apt/lists/* && apt-get clean

RUN groupadd --gid 1000 node \
Expand All @@ -14,14 +15,16 @@ RUN groupadd --gid 1000 node \
# gpg keys listed at https://github.com/nodejs/node#release-team
RUN set -ex \
&& for key in \
9554F04D7259F04124DE6B476D5A82AC7E37093B \
4ED778F539E3634C779C87C6D7062848A1AB005C \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
56730D5401028683275BD23C23EFEFE93C4CFFFE \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
; do \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
Expand Down
2 changes: 1 addition & 1 deletion deployment/kube/prod/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# stage version. When updating this file, please check if your changes
# need to be made to the other version.

apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: imageserver
Expand Down
2 changes: 1 addition & 1 deletion deployment/kube/prod/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
name: imageserver
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
name: imageserver
# Set this to 3x "min-nodes":
Expand Down
2 changes: 1 addition & 1 deletion deployment/kube/stage/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# prod version. When updating this file, please check if your changes
# need to be made to the other version.

apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
Expand Down
2 changes: 1 addition & 1 deletion deployment/kube/stage/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
name: imageserver
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
name: imageserver
# Set this to 3x "min-nodes":
Expand Down

0 comments on commit a47c8b9

Please sign in to comment.