Skip to content

Commit 8684665

Browse files
committed
feat(docker): dealing with the change of docker in kubenetes 1.20
1 parent 9b8abd1 commit 8684665

File tree

7 files changed

+19
-15
lines changed

7 files changed

+19
-15
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PLATFORM ?= linux/amd64,linux/arm64
77

88
include versioning.mk
99

10-
SHELLCHECK_PREFIX := docker run -v ${CURDIR}:/workdir -w /workdir ${DRYCC_REGISTRY}drycc/go-dev shellcheck
10+
SHELLCHECK_PREFIX := docker run -v ${CURDIR}:/workdir -w /workdir ${DEV_REGISTRY}/drycc/go-dev shellcheck
1111
SHELL_SCRIPTS = $(wildcard rootfs/bin/*) $(shell find "rootfs" -name '*.sh') $(wildcard _scripts/*.sh)
1212

1313
# Test processes used in quick unit testing

charts/controller/templates/controller-celery.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ spec:
2121
labels:
2222
app: drycc-controller-celery
2323
spec:
24+
serviceAccount: drycc-controller
2425
containers:
2526
- name: drycc-controller-celery-high
26-
image: {{.Values.image_registry}}{{.Values.org}}/controller:{{.Values.image_tag}}
27+
image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
2728
command:
2829
- /bin/bash
2930
- -c
@@ -37,7 +38,7 @@ spec:
3738
name: slugrunner-config
3839
readOnly: true
3940
- name: drycc-controller-celery-middle
40-
image: {{.Values.image_registry}}{{.Values.org}}/controller:{{.Values.image_tag}}
41+
image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
4142
command:
4243
- /bin/bash
4344
- -c
@@ -51,7 +52,7 @@ spec:
5152
readOnly: true
5253
imagePullPolicy: {{.Values.image_pull_policy}}
5354
- name: drycc-controller-celery-low
54-
image: {{.Values.image_registry}}{{.Values.org}}/controller:{{.Values.image_tag}}
55+
image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
5556
command:
5657
- /bin/bash
5758
- -c

charts/controller/templates/controller-cronjob-daily.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ spec:
1515
template:
1616
spec:
1717
restartPolicy: OnFailure
18+
serviceAccount: drycc-controller
1819
containers:
19-
- image: {{.Values.image_registry}}{{.Values.org}}/controller:{{.Values.image_tag}}
20+
- image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
2021
imagePullPolicy: {{.Values.image_pull_policy}}
2122
name: drycc-controller-push-data-to-influxdb
2223
command:
@@ -29,7 +30,7 @@ spec:
2930
- mountPath: /etc/slugrunner
3031
name: slugrunner-config
3132
readOnly: true
32-
- image: {{.Values.image_registry}}{{.Values.org}}/controller:{{.Values.image_tag}}
33+
- image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
3334
imagePullPolicy: {{.Values.pull_policy}}
3435
name: drycc-controller-measure-app
3536
command:
@@ -42,7 +43,7 @@ spec:
4243
- mountPath: /etc/slugrunner
4344
name: slugrunner-config
4445
readOnly: true
45-
- image: {{.Values.image_registry}}{{.Values.org}}/controller:{{.Values.image_tag}}
46+
- image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
4647
imagePullPolicy: {{.Values.pull_policy}}
4748
name: drycc-controller-measure-config
4849
command:
@@ -55,7 +56,7 @@ spec:
5556
- mountPath: /etc/slugrunner
5657
name: slugrunner-config
5758
readOnly: true
58-
- image: {{.Values.image_registry}}{{.Values.org}}/controller:{{.Values.image_tag}}
59+
- image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
5960
imagePullPolicy: {{.Values.pull_policy}}
6061
name: drycc-controller-measure-resources
6162
command:
@@ -68,7 +69,7 @@ spec:
6869
- mountPath: /etc/slugrunner
6970
name: slugrunner-config
7071
readOnly: true
71-
- image: {{.Values.image_registry}}{{.Values.org}}/controller:{{.Values.image_tag}}
72+
- image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
7273
imagePullPolicy: {{.Values.pull_policy}}
7374
name: drycc-controller-measure-volumes
7475
command:

charts/controller/templates/controller-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
serviceAccount: drycc-controller
2525
containers:
2626
- name: drycc-controller
27-
image: {{.Values.image_registry}}{{.Values.org}}/controller:{{.Values.image_tag}}
27+
image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
2828
imagePullPolicy: {{.Values.image_pull_policy}}
2929
livenessProbe:
3030
httpGet:
@@ -45,4 +45,4 @@ spec:
4545
{{- include "controller.limits" . | indent 10 }}
4646
{{- include "controller.envs" . | indent 10 }}
4747
{{- include "controller.volumeMounts" . | indent 10 }}
48-
{{- include "controller.volumes" . | indent 6 }}
48+
{{- include "controller.volumes" . | indent 6 }}

charts/controller/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
org: "drycc"
22
image_pull_policy: "Always"
33
image_tag: "canary"
4-
image_registry: ""
4+
image_registry: "docker.io"
55
app_image_pull_policy: "Always"
66
# A comma-separated list of URLs to send app release information to
77
# See https://drycc.com/docs/workflow/managing-workflow/deploy-hooks

rootfs/api/settings/celery.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from celery import Celery
2+
from celery import Celery, platforms
33

44
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings.production')
55
app = Celery('drycc')
@@ -10,3 +10,5 @@
1010
},
1111
)
1212
app.autodiscover_tasks()
13+
platforms.C_FORCE_ROOT = True
14+

versioning.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
MUTABLE_VERSION ?= canary
22
VERSION ?= git-$(shell git rev-parse --short HEAD)
33

4-
IMAGE := ${DRYCC_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${VERSION}
5-
MUTABLE_IMAGE := ${DRYCC_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION}
4+
IMAGE := ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${VERSION}
5+
MUTABLE_IMAGE := ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION}
66

77
info:
88
@echo "Build tag: ${VERSION}"

0 commit comments

Comments
 (0)