Skip to content

Commit 5d85f68

Browse files
committed
Registry rolling config update
Related issue: #984
1 parent 611900c commit 5d85f68

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

services/registry/Makefile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.DEFAULT_GOAL := help
22

3-
4-
53
# Internal VARIABLES ------------------------------------------------
64
# STACK_NAME defaults to name of the current directory. Should not to be changed if you follow GitOps operating procedures.
75
STACK_NAME = $(notdir $(shell pwd))
@@ -22,24 +20,24 @@ define create-s3-bucket
2220
endef
2321

2422
.PHONY: up-local
25-
up-local: .init .env ${TEMP_COMPOSE}-local ## Deploys registry stack
23+
up-local: .init ${TEMP_COMPOSE}-local prune-docker-stack-configs ## Deploys registry stack
2624
@$(create-s3-bucket)
2725
docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-local ${STACK_NAME}
2826

29-
.PHONY: up-letsencrypt-http ## Deploys registry stack using let's encrypt http challenge
30-
up-letsencrypt-http: .init .env ${TEMP_COMPOSE}-letsencrypt-http
27+
.PHONY: up-letsencrypt-http
28+
up-letsencrypt-http: .init ${TEMP_COMPOSE}-letsencrypt-http prune-docker-stack-configs ## Deploys registry stack using let's encrypt http challenge
3129
docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-letsencrypt-http ${STACK_NAME}
3230

33-
.PHONY: up-letsencrypt-dns ## Deploys registry stack using let's encrypt dns challenge
34-
up-letsencrypt-dns: .init .env ${TEMP_COMPOSE}-letsencrypt-dns
31+
.PHONY: up-letsencrypt-dns
32+
up-letsencrypt-dns: .init ${TEMP_COMPOSE}-letsencrypt-dns prune-docker-stack-configs ## Deploys registry stack using let's encrypt dns challenge
3533
docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-letsencrypt-dns ${STACK_NAME}
3634

37-
.PHONY: up-dalco ## Deploys registry stack for Dalco Cluster
38-
up-dalco: .init .env ${TEMP_COMPOSE}
35+
.PHONY: up-dalco
36+
up-dalco: .init ${TEMP_COMPOSE} prune-docker-stack-configs ## Deploys registry stack for Dalco Cluster
3937
docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE} ${STACK_NAME}
4038

4139
.PHONY: up-aws
42-
up-aws: .init .env ${TEMP_COMPOSE}-aws ## Deploys registry on AWS
40+
up-aws: .init ${TEMP_COMPOSE}-aws prune-docker-stack-configs ## Deploys registry on AWS
4341
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-aws ${STACK_NAME}
4442

4543
.PHONY: up-master ## Deploys registry on master cluster

services/registry/docker-compose.yml.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,11 @@ networks:
128128

129129
configs:
130130
registry_config.yml:
131+
name: ${STACK_NAME}_registry_config_{{ "./config.yml" | sha256file | substring(0,10) }}
131132
file: ./config.yml
132133
nsswitch_conf:
134+
name: ${STACK_NAME}_nsswitch_conf_{{ "./nsswitch.conf" | sha256file | substring(0,10) }}
133135
file: ./nsswitch.conf
134136
registry_init:
137+
name: ${STACK_NAME}_registry_init_{{ "./init" | sha256file | substring(0,10) }}
135138
file: ./init

services/registry/template.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
STACK_NAME=${STACK_NAME}
2+
13
OPS_REGISTRY_REPLICAS=${OPS_REGISTRY_REPLICAS}
24

35
REGISTRY_DOMAIN=${REGISTRY_DOMAIN}

0 commit comments

Comments
 (0)