Skip to content

Commit 59c805a

Browse files
committed
Refactor ops-traefik: use env-var based config
1 parent ac44663 commit 59c805a

File tree

11 files changed

+83
-313
lines changed

11 files changed

+83
-313
lines changed

charts/simcore-charts/resource-usage-tracker/values.yaml.gotmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ env:
135135
- name: REDIS_USER
136136
value: {{ env "REDIS_USER" }}
137137
- name: REDIS_HOST
138-
value: {{ requiredEnv "REDIS_EXTERNAL_HOST" }}
138+
value: {{ requiredEnv "REDIS_HOST" }}
139139
- name: REDIS_PORT
140-
value: {{ requiredEnv "REDIS_EXTERNAL_PORT" }}
140+
value: {{ requiredEnv "REDIS_PORT" }}
141141
- name: REDIS_SECURE
142142
value: {{ requiredEnv "REDIS_SECURE" }}
143143
- name: REDIS_PASSWORD

services/graylog/docker-compose.local.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.7"
21
services:
32
mongodb:
43
deploy:

services/simcore/docker-compose.deploy.master.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ services:
3535
- "--entryPoints.http.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
3636
- "--entryPoints.http.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
3737
- "--entryPoints.postgres.address=:5432"
38-
- "--entryPoints.redis.address=:${REDIS_EXTERNAL_PORT}"
38+
- "--entryPoints.redis.address=:5672"
3939
- "--entryPoints.simcore_api.address=:10081"
4040
- "--entryPoints.simcore_api.forwardedHeaders.insecure"
4141
- "--entryPoints.simcore_api.transport.respondingTimeouts.idleTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
@@ -70,7 +70,7 @@ services:
7070
- traefik.tcp.routers.${SWARM_STACK_NAME}_redisRoute.entrypoints=redis
7171
- traefik.tcp.routers.${SWARM_STACK_NAME}_redisRoute.tls=false
7272
- traefik.tcp.routers.${SWARM_STACK_NAME}_redisRoute.service=${SWARM_STACK_NAME}_redisRoute
73-
- traefik.tcp.services.${SWARM_STACK_NAME}_redisRoute.loadbalancer.server.port=${REDIS_EXTERNAL_PORT}
73+
- traefik.tcp.services.${SWARM_STACK_NAME}_redisRoute.loadbalancer.server.port=6379
7474
- "traefik.tcp.routers.${SWARM_STACK_NAME}_redisRoute.rule=HostSNI(`*`)"
7575

7676
clusters-keeper:

services/traefik/Makefile

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,38 +49,32 @@ ${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.local.yml .env traefik_
4949
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.local.yml > $@
5050

5151
.PHONY: ${TEMP_COMPOSE}-aws
52-
${TEMP_COMPOSE}-aws: docker-compose.yml docker-compose.aws.yml .env
52+
${TEMP_COMPOSE}-aws: docker-compose.yml .env
5353
@set -o allexport; \
5454
source .env; \
5555
set +o allexport; \
56-
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.aws.yml > $@
56+
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@
5757

5858
.PHONY: ${TEMP_COMPOSE}-dalco
59-
${TEMP_COMPOSE}-dalco: docker-compose.yml docker-compose.dalco.yml .env
59+
${TEMP_COMPOSE}-dalco: docker-compose.yml .env
6060
@set -o allexport; \
6161
source .env; \
6262
set +o allexport; \
63-
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.dalco.yml > $@
63+
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@
6464

6565
.PHONY: ${TEMP_COMPOSE}-public
66-
${TEMP_COMPOSE}-public: docker-compose.yml docker-compose.public.yml .env
66+
${TEMP_COMPOSE}-public: docker-compose.yml .env
6767
@set -o allexport; \
6868
source .env; \
6969
set +o allexport; \
70-
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.public.yml > $@
70+
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@
7171

7272
.PHONY: ${TEMP_COMPOSE}-master
73-
${TEMP_COMPOSE}-master: docker-compose.yml docker-compose.master.yml .env
73+
${TEMP_COMPOSE}-master: docker-compose.yml .env
7474
@set -o allexport; \
7575
source .env; \
7676
set +o allexport; \
77-
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.master.yml > $@
78-
79-
.PHONY: docker-compose.letsencrypt.dns.yml
80-
docker-compose.letsencrypt.dns.yml: .venv .env
81-
@$(call jinja, docker-compose.letsencrypt.dns.yml.j2, .env, docker-compose.letsencrypt.dns.yml.unlinted) && \
82-
$(_yq) docker-compose.letsencrypt.dns.yml.unlinted > docker-compose.letsencrypt.dns.yml; \
83-
rm docker-compose.letsencrypt.dns.yml.unlinted >/dev/null 2>&1;
77+
${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@
8478

8579
.PHONY: docker-compose.yml
8680
docker-compose.yml: traefik_dynamic_config.yml .venv .env

services/traefik/docker-compose.aws.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

services/traefik/docker-compose.dalco.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

services/traefik/docker-compose.local.yml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,5 @@
11
services:
22
traefik:
3-
command:
4-
# Here we subsitute with a custom entrypoint to load self-signed
5-
# certificates.
6-
- "/bin/sh"
7-
- "/customEntrypoint.sh"
8-
- "--api=true"
9-
- "--ping=true"
10-
- "--entryPoints.ping.address=:9082"
11-
- "--ping.entryPoint=ping"
12-
- "--api.dashboard=true"
13-
- "--log.level=${OPS_TRAEFIK_LOGLEVEL}"
14-
- "--accesslog=true"
15-
- "--accesslog.format=json"
16-
- "--accesslog.fields.defaultmode=keep"
17-
- "--accesslog.fields.names.ClientUsername=keep"
18-
- "--accesslog.fields.headers.defaultmode=keep"
19-
- "--accesslog.fields.headers.names.User-Agent=keep"
20-
- "--accesslog.fields.headers.names.Authorization=drop"
21-
- "--accesslog.fields.headers.names.Content-Type=keep"
22-
- "--metrics.prometheus=true"
23-
- "--metrics.prometheus.addEntryPointsLabels=true"
24-
- "--metrics.prometheus.addServicesLabels=true"
25-
- "--entryPoints.metrics.address=:8082"
26-
- "--metrics.prometheus.entryPoint=metrics"
27-
- "--entryPoints.smtp.address=:25"
28-
- "--entryPoints.http.address=:80"
29-
- "--entryPoints.http.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
30-
- "--entryPoints.http.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
31-
- "--entryPoints.https.address=:443"
32-
- "--entryPoints.https.transport.respondingTimeouts.writeTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
33-
- "--entryPoints.https.transport.respondingTimeouts.readTimeout=21600s" #6h, for https://github.com/traefik/traefik/issues/10805
34-
- "--entryPoints.postgres.address=:5432"
35-
- "--entrypoints.http.http.redirections.entrypoint.to=https"
36-
- "--entrypoints.http.http.redirections.entrypoint.scheme=https"
37-
- "--entrypoints.http.http.redirections.entrypoint.permanent=true"
38-
- "--providers.swarm.endpoint=unix:///var/run/docker.sock"
39-
- "--providers.swarm.exposedByDefault=false"
40-
- "--providers.swarm.constraints=!LabelRegex(`io.simcore.zone`, `${TRAEFIK_SIMCORE_ZONE}`)"
41-
- "--core.defaultRuleSyntax=v2"
42-
- "--tracing=true"
43-
- "--tracing.addinternals"
44-
- "--tracing.otlp=true"
45-
- "--tracing.otlp.http=true"
46-
- "--providers.file.directory=/etc/traefik/"
47-
- "--providers.file.watch=true"
483
networks:
494
public:
505
monitored:

services/traefik/docker-compose.master.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

services/traefik/docker-compose.public.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)