Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions controlplane/src/bin/get-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ const getConfig = () => {
password: process.env.S3_SECRET_ACCESS_KEY,
forcePathStyle: process.env.S3_FORCE_PATH_STYLE === undefined ? true : process.env.S3_FORCE_PATH_STYLE === 'true',
},

s3StorageFailover: process.env.S3_FAILOVER_STORAGE_URL
? {
url: process.env.S3_FAILOVER_STORAGE_URL,
endpoint: process.env.S3_FAILOVER_ENDPOINT,
region: process.env.S3_FAILOVER_REGION || 'auto',
username: process.env.S3_FAILOVER_ACCESS_KEY_ID,
password: process.env.S3_FAILOVER_SECRET_ACCESS_KEY,
forcePathStyle:
process.env.S3_FAILOVER_FORCE_PATH_STYLE === undefined
? true
: process.env.S3_FAILOVER_FORCE_PATH_STYLE === 'true',
}
: undefined,
};
};

Expand Down
6 changes: 6 additions & 0 deletions helm/cosmo/charts/controlplane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ WunderGraph Cosmo Controlplane
| configuration.redisTlsKey | string | `""` | |
| configuration.s3AccessKeyId | string | `""` | s3 access key id, can be used instead of [username]:[password] in the url |
| configuration.s3Endpoint | string | `""` | The endpoint of the S3 bucket. |
| configuration.s3FailoverAccessKeyId | string | `""` | S3 failover access key id, can be used instead of [username]:[password] in the url |
| configuration.s3FailoverEndpoint | string | `""` | The endpoint of the S3 failover bucket. |
| configuration.s3FailoverForcePathStyle | string | `""` | Forces usage of path style urls for the failover S3. Default is true. |
Comment thread
pepol marked this conversation as resolved.
| configuration.s3FailoverRegion | string | `""` | The region where the S3 failover bucket is located. |
| configuration.s3FailoverSecretAccessKey | string | `""` | S3 failover secret access key, can be used instead of [username]:[password] in the url |
| configuration.s3FailoverStorageUrl | string | `""` | The url of S3-compatible storage for backup/failover purposes. If not defined, failover is not used. |
| configuration.s3ForcePathStyle | string | `"true"` | Forces usage of path style urls for S3. Default is true. |
| configuration.s3Region | string | `"auto"` | The region where the S3 bucket is located. |
| configuration.s3SecretAccessKey | string | `""` | s3 secret access key, can be used instead of [username]:[password] in the url |
Expand Down
42 changes: 42 additions & 0 deletions helm/cosmo/charts/controlplane/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,48 @@ spec:
name: {{ include "controlplane.secretName" . }}
key: s3SecretAccessKey
{{- end }}
{{- if .Values.configuration.s3FailoverStorageUrl }}
- name: S3_FAILOVER_STORAGE_URL
valueFrom:
secretKeyRef:
name: {{ include "controlplane.secretName" . }}
Comment thread
Noroth marked this conversation as resolved.
key: s3FailoverStorageUrl
{{- end }}
{{- if .Values.configuration.s3FailoverRegion }}
- name: S3_FAILOVER_REGION
valueFrom:
configMapKeyRef:
name: {{ include "controlplane.fullname" . }}-configmap
key: s3FailoverRegion
{{- end }}
{{- if .Values.configuration.s3FailoverEndpoint }}
- name: S3_FAILOVER_ENDPOINT
valueFrom:
configMapKeyRef:
name: {{ include "controlplane.fullname" . }}-configmap
key: s3FailoverEndpoint
{{- end }}
{{- if .Values.configuration.s3FailoverForcePathStyle }}
- name: S3_FAILOVER_FORCE_PATH_STYLE
valueFrom:
configMapKeyRef:
name: {{ include "controlplane.fullname" . }}-configmap
key: s3FailoverForcePathStyle
{{- end }}
Comment thread
pepol marked this conversation as resolved.
{{- if .Values.configuration.s3FailoverAccessKeyId }}
- name: S3_FAILOVER_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ include "controlplane.secretName" . }}
key: s3FailoverAccessKeyId
{{- end }}
{{- if .Values.configuration.s3FailoverSecretAccessKey }}
- name: S3_FAILOVER_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ include "controlplane.secretName" . }}
key: s3FailoverSecretAccessKey
{{- end }}
- name: SMTP_ENABLED
valueFrom:
configMapKeyRef:
Expand Down
18 changes: 18 additions & 0 deletions helm/cosmo/charts/controlplane/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,22 @@ stringData:
{{- if .Values.configuration.s3SecretAccessKey }}
s3SecretAccessKey: "{{ .Values.configuration.s3SecretAccessKey }}"
{{- end }}
{{- if .Values.configuration.s3FailoverStorageUrl }}
s3FailoverStorageUrl: "{{ .Values.configuration.s3FailoverStorageUrl }}"
{{- end }}
{{- if .Values.configuration.s3FailoverRegion }}
s3FailoverRegion: "{{ .Values.configuration.s3FailoverRegion }}"
{{- end }}
{{- if .Values.configuration.s3FailoverEndpoint }}
s3FailoverEndpoint: "{{ .Values.configuration.s3FailoverEndpoint }}"
{{- end }}
{{- if .Values.configuration.s3FailoverForcePathStyle }}
s3FailoverForcePathStyle: "{{ .Values.configuration.s3FailoverForcePathStyle }}"
{{- end }}
{{- if .Values.configuration.s3FailoverAccessKeyId }}
s3FailoverAccessKeyId: "{{ .Values.configuration.s3FailoverAccessKeyId }}"
{{- end }}
{{- if .Values.configuration.s3FailoverSecretAccessKey }}
s3FailoverSecretAccessKey: "{{ .Values.configuration.s3FailoverSecretAccessKey }}"
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions helm/cosmo/charts/controlplane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,18 @@ configuration:
s3SecretAccessKey: ''
# -- Forces usage of path style urls for S3. Default is true.
s3ForcePathStyle: 'true'
# -- The url of S3-compatible storage for backup/failover purposes. If not defined, failover is not used.
s3FailoverStorageUrl: ''
# -- The region where the S3 failover bucket is located.
s3FailoverRegion: ''
# -- The endpoint of the S3 failover bucket.
s3FailoverEndpoint: ''
# -- S3 failover access key id, can be used instead of [username]:[password] in the url
s3FailoverAccessKeyId: ''
# -- S3 failover secret access key, can be used instead of [username]:[password] in the url
s3FailoverSecretAccessKey: ''
# -- Forces usage of path style urls for the failover S3. Default is true.
s3FailoverForcePathStyle: ''
Comment thread
pepol marked this conversation as resolved.
stripeSecretKey: ''
stripeWebhookSecret: ''
# -- The default billing plan, eg `developer@1`
Expand Down
Loading