Skip to content

Commit

Permalink
feat: rudimentary traefik middlewares support (no json schema)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojciech Międzybrodzki committed Jan 21, 2025
1 parent 7ce8cdd commit 1bb6112
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ appVersion: 1.0.0

dependencies:
- name: app
version: 0.6.0
version: 0.7.0
repository: oci://ghcr.io/wojciechem/platformex
```
Expand Down
2 changes: 1 addition & 1 deletion charts/app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Flexible helm chart to deploy your apps to kubernetes cluster.
type: application

# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.0
version: 0.7.0

appVersion: 1.0.0

13 changes: 13 additions & 0 deletions charts/app/templates/middlewares.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: List
items:
{{- range .Values.traefikMiddlewares }}
- apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: {{ .name }}
labels:
{{- include "platformex.globalLabels" $ | indent 8 }}
spec:
{{- toYaml .spec | nindent 6 }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/app/values-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ sealedSecrets:
- key: passcode
value: (encrypted-passcode)

traefikMiddlewares:
- name: someForwardAuth
spec:
forwardAuth:
address: "hxxp://auth.svc"
authResponseHeaders:
- X-Authservice

instances:
1-plain:
enableCrons: false
Expand Down
4 changes: 4 additions & 0 deletions charts/app/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"sealedSecrets": {
"type": "object"
},

"traefikMiddlewares": {
"type": "array"
},
"instances": {
"$ref": "#/definitions/Instances"
}
Expand Down

0 comments on commit 1bb6112

Please sign in to comment.