Skip to content

Commit

Permalink
fix(helm): missing env var CADDY_EXTRA_CONFIG (#889)
Browse files Browse the repository at this point in the history
* docs: missing env var CADDY_EXTRA_CONFIG

* Update charts/mercure/values.yaml

Co-authored-by: Kévin Dunglas <[email protected]>

---------

Co-authored-by: Kévin Dunglas <[email protected]>
  • Loading branch information
maxhelias and dunglas authored Apr 5, 2024
1 parent af3dec5 commit 6847dfa
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
5 changes: 5 additions & 0 deletions charts/mercure/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ spec:
configMapKeyRef:
name: {{ include "mercure.fullname" . }}
key: global-options
- name: CADDY_EXTRA_CONFIG
valueFrom:
secretKeyRef:
name: {{ include "mercure.fullname" . }}
key: caddy-extra-config
- name: CADDY_SERVER_EXTRA_DIRECTIVES
valueFrom:
secretKeyRef:
Expand Down
1 change: 1 addition & 0 deletions charts/mercure/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ data:
subscriber-jwt-key: {{ .Values.subscriberJwtKey | default (randAlphaNum 40) | b64enc | quote }}
extra-directives: {{ .Values.extraDirectives | b64enc | quote }}
license: {{ .Values.license | b64enc | quote }}
caddy-extra-config: {{ .Values.caddyExtraConfig | b64enc | quote }}
caddy-extra-directives: {{ .Values.caddyExtraDirectives | b64enc | quote }}
2 changes: 2 additions & 0 deletions charts/mercure/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# -- Inject global options in the Caddyfile.
globalOptions: ""
# -- Inject snippet or named-routes options in the Caddyfile
caddyExtraConfig: ""
# -- Enable the development mode, including the debug UI and the demo.
dev: false
# -- The URL representation of the transport to use.
Expand Down
25 changes: 13 additions & 12 deletions docs/hub/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,19 @@ See also [the list of built-in Caddyfile directives](https://caddyserver.com/doc

The provided `Caddyfile` and the Docker image provide convenient environment variables:

| Environment variable | Description | Default value |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------- |
| `GLOBAL_OPTIONS` | the [global options block](https://caddyserver.com/docs/caddyfile/options#global-options) to inject in the `Caddyfile`, one per line | |
| `CADDY_SERVER_EXTRA_DIRECTIVES`| [`Caddyfile` statements](https://caddyserver.com/docs/caddyfile) | |
| `SERVER_NAME` | the server name or address | `localhost` |
| `MERCURE_TRANSPORT_URL` | the value passed to the `transport_url` directive | `bolt://mercure.db` |
| `MERCURE_PUBLISHER_JWT_KEY` | the JWT key to use for publishers | |
| `MERCURE_PUBLISHER_JWT_ALG` | the JWT algorithm to use for publishers | `HS256` |
| `MERCURE_SUBSCRIBER_JWT_KEY` | the JWT key to use for subscribers | |
| `MERCURE_SUBSCRIBER_JWT_ALG` | the JWT algorithm to use for subscribers | `HS256` |
| `MERCURE_EXTRA_DIRECTIVES` | a list of extra Mercure directives inject in the Caddy file, one per line | |
| `MERCURE_LICENSE` | the license to use ([only applicable for the HA version](cluster.md)) | |
| Environment variable | Description | Default value |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| `GLOBAL_OPTIONS` | the [global options block](https://caddyserver.com/docs/caddyfile/options#global-options) to inject in the `Caddyfile`, one per line | |
| `CADDY_EXTRA_CONFIG` | the [snippet](https://caddyserver.com/docs/caddyfile/concepts#snippets) or the [named-routes](https://caddyserver.com/docs/caddyfile/concepts#named-routes) options block to inject in the `Caddyfile`, one per line | |
| `CADDY_SERVER_EXTRA_DIRECTIVES`| [`Caddyfile` directives](https://caddyserver.com/docs/caddyfile/concepts#directives) | |
| `SERVER_NAME` | the server name or address | `localhost` |
| `MERCURE_TRANSPORT_URL` | the value passed to the `transport_url` directive | `bolt://mercure.db` |
| `MERCURE_PUBLISHER_JWT_KEY` | the JWT key to use for publishers | |
| `MERCURE_PUBLISHER_JWT_ALG` | the JWT algorithm to use for publishers | `HS256` |
| `MERCURE_SUBSCRIBER_JWT_KEY` | the JWT key to use for subscribers | |
| `MERCURE_SUBSCRIBER_JWT_ALG` | the JWT algorithm to use for subscribers | `HS256` |
| `MERCURE_EXTRA_DIRECTIVES` | a list of extra [Mercure directives](#directives) inject in the Caddy file, one per line | |
| `MERCURE_LICENSE` | the license to use ([only applicable for the HA version](cluster.md)) | |

## JWT Verification

Expand Down

0 comments on commit 6847dfa

Please sign in to comment.