-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor ops-traefik #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
As of now we need docker-compose.master.yml (and Co) to open some ports on a subset of deployments (service exposure) while keeping this services private on other deployments where we do not need it (security)
@@ -9,7 +9,7 @@ services: | |||
- "/customEntrypoint.sh" | |||
- "--api=true" | |||
- "--api.dashboard=true" | |||
- "--log.level=${OPS_TRAEFIK_LOGLEVEL}" | |||
- "--log.level=${TRAEFIK_LOG_LEVEL}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: why removing the prefix? Since we have 2 traefiks, it makes sense, oder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will revert, yes
Now using jinja2 logic and env-vars, ports are only opened when needed. The DNS 8.8.8.8 is set everywhere. |
configs: | ||
- source: traefik_dynamic_config.yml | ||
target: /etc/traefik/dynamic_conf.yml | ||
env_file: | ||
- .env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is clear what env_file
does.
Why do we now need env inside traefik? What change causes it?
TRAEFIK_ENTRYPOINTS_HTTP_TRANSPORT_RESPONDINGTIMEOUTS_IDLETIMEOUT="21600s" | ||
TRAEFIK_ENTRYPOINTS_HTTP_TRANSPORT_RESPONDINGTIMEOUTS_WRITETIMEOUT="21600s" | ||
TRAEFIK_ENTRYPOINTS_HTTP_TRANSPORT_RESPONDINGTIMEOUTS_READTIMEOUT="21600s" | ||
TRAEFIK_ENTRYPOINTS_RABBIT_ADDRESS=":5672" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is redis port 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does redis need to be exposed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- target: 5433 | ||
published: 5433 | ||
{% endif %} | ||
{% if OPS_TRAEFIK_EXPOSE_RABBITMQ|lower == "true" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is redis port?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does redis need to be exposed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. See ITISFoundation#1054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Left some comments
charts/simcore-charts/resource-usage-tracker/values.yaml.gotmpl
Outdated
Show resolved
Hide resolved
* Update longhorn README Document how to perform (kubernetes) node maintenance * Update Longhorn README: disks config and maintenance * Kubernets add local storage Use topolvm as the most mature local storage csi. * Update longhorn readme
In order to remove duplication of hardcoded values, in a first step I have moved the configuration that used to be passed to traefik as CLI arguments into env-vars. This is supported by traefik according to https://doc.traefik.io/traefik/reference/static-configuration/env/ |
@@ -0,0 +1,198 @@ | |||
version: "3.8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will not work in CI (aka on machines) as our servers have different docker compose verison. It will probably cause version mismatch error and fail in deploy_ops CI
I propose to ditch this label altogether. version
is deprecated and is not used anymore (except when define may cause errors)
See https://docs.docker.com/reference/compose-file/version-and-name/#version-top-level-element-obsolete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See example of no version definition in the newest metabase
stack ITISFoundation#1093. Works like a charm 🚀
- traefik.http.middlewares.graylog_replace_regex.replacepathregex.regex=^/graylog/?(.*)$$ | ||
- traefik.http.middlewares.graylog_replace_regex.replacepathregex.replacement=/$${1} | ||
- traefik.http.routers.graylog.middlewares=ops_whitelist_ips@swarm, ops_gzip@swarm, graylog_replace_regex | ||
fluentd: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, this is refactor OPS traefik PR or introduce fluentd / loki PR 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is true, I made a bad merge and all was mixed :O I will make a fresh PR for traefik ,sorry @YuryHrytsuk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely a very nice idea to use ENV instead of CLI Arguments as it is indeed easier to work with 👌
Left a few comments. Also seems like fluentd
/ loki
changes go accidentally in but should be done in a separate PR
I made a bad merge and the code got mixed up between unrelated PRs (traefik refactoring, loki, fluentd, etc.) :O I will make a fresh PR for traefik and close this one @YuryHrytsuk |
What do these changes do?
Related issue/s
Related PR/s
https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/merge_requests/1389/
Checklist