-
Notifications
You must be signed in to change notification settings - Fork 11
Add Traefik reverse-proxy module #549
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
Open
RonaldHensbergen
wants to merge
7
commits into
main
Choose a base branch
from
feat/traefik-module
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+189
−0
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ee1bf61
New module for traefik
RonaldHensbergen 68fdacb
Update modules/integration/traefik/module.yaml
RonaldHensbergen 42d3d47
Update modules/integration/traefik/module.yaml
RonaldHensbergen 1763e81
Update modules/integration/traefik/module.yaml
RonaldHensbergen 5f623a7
Update modules/integration/traefik/module.yaml
RonaldHensbergen 4d4346b
Update modules/integration/traefik/module.yaml
RonaldHensbergen 7237783
Merge branch 'main' into feat/traefik-module
SemTiOne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,189 @@ | ||
| # modules/integration/traefik/module.yaml | ||
| # yaml-language-server: $schema=../../../cli/resources/module.schema.json | ||
| apiVersion: cds/v1alpha1 | ||
| kind: Module | ||
|
|
||
| metadata: | ||
| name: traefik | ||
| category: integration | ||
| version: "3.0.0" | ||
| displayName: Traefik | ||
| description: > | ||
| Traefik reverse proxy with TLS 1.2+ enforcement for secure ingress, | ||
| service discovery, and centralized certificate management. | ||
|
|
||
| spec: | ||
| runtime: | ||
| type: container | ||
| service: | ||
| name: traefik | ||
| ports: | ||
| - name: http | ||
| containerPort: 80 | ||
| protocol: TCP | ||
| - name: https | ||
| containerPort: 443 | ||
| protocol: TCP | ||
| - name: dashboard | ||
| containerPort: 8080 | ||
| protocol: TCP | ||
| networks: | ||
| - default | ||
|
|
||
| configSchema: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| log: | ||
| type: object | ||
| default: {} | ||
| properties: | ||
| level: | ||
| type: string | ||
| enum: [DEBUG, INFO, WARN, ERROR] | ||
| default: INFO | ||
|
|
||
| accessLog: | ||
| type: object | ||
| default: {} | ||
| properties: | ||
| enabled: | ||
| type: boolean | ||
| default: true | ||
|
|
||
| api: | ||
| type: object | ||
| default: {} | ||
| properties: | ||
| dashboard: | ||
| type: boolean | ||
| default: true | ||
| debug: | ||
| type: boolean | ||
| default: false | ||
| insecure: | ||
| type: boolean | ||
| default: false | ||
|
|
||
| entryPoints: | ||
| type: object | ||
| default: {} | ||
| properties: | ||
| web: | ||
| type: object | ||
| properties: | ||
| address: | ||
| type: string | ||
| default: ":80" | ||
| websecure: | ||
| type: object | ||
| properties: | ||
| address: | ||
| type: string | ||
| default: ":443" | ||
|
|
||
| tls: | ||
| type: object | ||
| default: {} | ||
| properties: | ||
| minVersion: | ||
| type: string | ||
| default: VersionTLS12 | ||
| maxVersion: | ||
| type: string | ||
| default: VersionTLS13 | ||
| preferServerCipherSuites: | ||
| type: boolean | ||
| default: true | ||
| sniStrict: | ||
| type: boolean | ||
| default: true | ||
|
|
||
| docker: | ||
| type: object | ||
| default: {} | ||
| properties: | ||
| enabled: | ||
| type: boolean | ||
| default: true | ||
| exposedByDefault: | ||
| type: boolean | ||
| default: false | ||
|
|
||
| fileProvider: | ||
| type: object | ||
| default: {} | ||
| properties: | ||
| directory: | ||
| type: string | ||
| default: "/etc/traefik/dynamic" | ||
| watch: | ||
| type: boolean | ||
| default: true | ||
|
|
||
| provides: | ||
| - name: reverse-proxy | ||
| contract: | ||
| kind: reverse-proxy | ||
| spec: | ||
| host: ${service.host} | ||
| port: 443 | ||
| protocol: https | ||
| connectionUri: "https://${service.host}:443" | ||
|
|
||
| implementation: | ||
| kind: docker-compose | ||
| compose: | ||
| services: | ||
| traefik: | ||
| image: traefik:v3.0 | ||
| user: "65532:65532" | ||
| init: true | ||
| read_only: true | ||
| cap_drop: | ||
| - ALL | ||
| security_opt: | ||
| - no-new-privileges:true | ||
| pids_limit: 512 | ||
|
RonaldHensbergen marked this conversation as resolved.
|
||
| tmpfs: | ||
| - /tmp:rw,noexec,nosuid,nodev | ||
|
|
||
| ports: | ||
| - "${config.entryPoints.web.address}:80" | ||
| - "${config.entryPoints.websecure.address}:443" | ||
| - "127.0.0.1:8080:8080" | ||
|
|
||
| networks: | ||
| - default | ||
|
|
||
| volumes: | ||
| - /var/run/docker.sock:/var/run/docker.sock:ro | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| - ./traefik/dynamic:/etc/traefik/dynamic:ro | ||
| - ./certs/traefik:/etc/traefik/certs:ro | ||
| - ./data:/data:rw | ||
|
|
||
| environment: | ||
| TRAEFIK_LOG_LEVEL: "${config.log.level}" | ||
| TRAEFIK_LOG_FILEPATH: "/data/traefik.log" | ||
| TRAEFIK_ACCESSLOG: "${config.accessLog.enabled}" | ||
| TRAEFIK_ACCESSLOG_FILEPATH: "/data/access.log" | ||
| TRAEFIK_API_DASHBOARD: "${config.api.dashboard}" | ||
| TRAEFIK_API_DEBUG: "${config.api.debug}" | ||
| TRAEFIK_API_INSECURE: "${config.api.insecure}" | ||
| TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: "${config.entryPoints.web.address}" | ||
| TRAEFIK_ENTRYPOINTS_WEBSECURE_ADDRESS: "${config.entryPoints.websecure.address}" | ||
| TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_TLS_MINVERSION: "${config.tls.minVersion}" | ||
| TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_TLS_MAXVERSION: "${config.tls.maxVersion}" | ||
| TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_TLS_SNISTRICT: "${config.tls.sniStrict}" | ||
| TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_TLS_PREFERSERVERCIPHERSUITES: "${config.tls.preferServerCipherSuites}" | ||
| TRAEFIK_PROVIDERS_DOCKER: "${config.docker.enabled}" | ||
| TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: "${config.docker.exposedByDefault}" | ||
| TRAEFIK_PROVIDERS_DOCKER_NETWORK: "default" | ||
| TRAEFIK_PROVIDERS_FILE_DIRECTORY: "${config.fileProvider.directory}" | ||
| TRAEFIK_PROVIDERS_FILE_WATCH: "${config.fileProvider.watch}" | ||
|
|
||
| healthcheck: | ||
| test: ["CMD", "traefik", "healthcheck", "--ping"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 3 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Pin traefik:v3.0 to a digest (keydb does).