Skip to content
Open
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
6 changes: 4 additions & 2 deletions .devcontainer/prod/devcontainer.env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
HOME_PROD_HOSTNAME=<TO_BE_MODIFIED!!!>

HOME_PROD_INTERNAL_PORT=<TO_BE_MODIFIED!!!>
HOME_PROD_INTERNAL_HTTP_PORT=<TO_BE_MODIFIED!!!>
HOME_PROD_INTERNAL_HTTPS_PORT=<TO_BE_MODIFIED!!!>

HOME_PROD_EXTERNAL_PORT=<TO_BE_MODIFIED!!!>
HOME_PROD_EXTERNAL_HTTP_PORT=<TO_BE_MODIFIED!!!>
HOME_PROD_EXTERNAL_HTTPS_PORT=<TO_BE_MODIFIED!!!>

HOME_PROD_BASE_EXTERNAL_URL=<TO_BE_MODIFIED!!!>

Expand Down
12 changes: 8 additions & 4 deletions deploy/environments/local/values.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
HOME_HOSTNAME: "localhost"
HOME_UI_HOSTNAME: "localhost"

# there are the same HOME_INTERNAL_PORT and externalPort to support both kind and Docker Desktop k8s clusters
HOME_CMS_HOSTNAME: "localhost"

# there are the same HOME_INTERNAL_HTTP_PORT and externalPort to support both kind and Docker Desktop k8s clusters
# when these are different e.g. 40080 for externalPort it doesn't work for Docker Desktop
# it was decided to keep things less explicit to support seemless switch between clusters
HOME_INTERNAL_PORT: "30080"
HOME_INTERNAL_HTTP_PORT: "30080"
HOME_INTERNAL_HTTPS_PORT: ""
# -- Port the external HTTP listener is published with.
HOME_EXTERNAL_PORT: "40120"
HOME_EXTERNAL_HTTP_PORT: "40120"
HOME_EXTERNAL_HTTPS_PORT: ""

# there has to be externalPort in baseExternalUrl (cannot be used as a variable in the same file)
HOME_BASE_EXTERNAL_URL: "http://localhost:40120"
Expand Down
10 changes: 7 additions & 3 deletions deploy/environments/prod/values.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
HOME_HOSTNAME: "{{ requiredEnv "HOME_PROD_HOSTNAME" }}"
HOME_UI_HOSTNAME: "{{ requiredEnv "HOME_PROD_UI_HOSTNAME" }}"

HOME_INTERNAL_PORT: "{{ requiredEnv "HOME_PROD_INTERNAL_PORT" }}"
HOME_CMS_HOSTNAME: "{{ requiredEnv "HOME_PROD_CMS_HOSTNAME" }}"

HOME_EXTERNAL_PORT: "{{ requiredEnv "HOME_PROD_EXTERNAL_PORT" }}"
HOME_INTERNAL_HTTP_PORT: "{{ requiredEnv "HOME_PROD_INTERNAL_HTTP_PORT" }}"
HOME_INTERNAL_HTTPS_PORT: "{{ requiredEnv "HOME_PROD_INTERNAL_HTTPS_PORT" }}"

HOME_EXTERNAL_HTTP_PORT: "{{ requiredEnv "HOME_PROD_EXTERNAL_HTTP_PORT" }}"
HOME_EXTERNAL_HTTPS_PORT: "{{ requiredEnv "HOME_PROD_EXTERNAL_HTTPS_PORT" }}"

HOME_BASE_EXTERNAL_URL: "{{ requiredEnv "HOME_PROD_BASE_EXTERNAL_URL" }}"

Expand Down
3 changes: 3 additions & 0 deletions deploy/values-cms.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
image:
tag: "latest"

ingress:
hostname: "{{ .Values.HOME_CMS_HOSTNAME }}"

extraConfigMapEnvVars:
HOST: "0.0.0.0"
PORT: "1337"
Expand Down
11 changes: 8 additions & 3 deletions deploy/values-ingress-nginx.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ controller:
service:
type: NodePort
ports:
http: "{{ .Values.HOME_EXTERNAL_PORT }}"
http: "{{ .Values.HOME_EXTERNAL_HTTP_PORT }}"
{{- if .Values.HOME_EXTERNAL_HTTPS_PORT }}
https: "{{ .Values.HOME_EXTERNAL_HTTPS_PORT }}"
{{- end }}
nodePorts:
http: "{{ .Values.HOME_INTERNAL_PORT }}"
https:
http: "{{ .Values.HOME_INTERNAL_HTTP_PORT }}"
{{- if .Values.HOME_EXTERNAL_HTTPS_PORT }}
https: "{{ .Values.HOME_EXTERNAL_HTTPS_PORT }}"
{{- end }}
# not needed in this setup
admissionWebhooks:
enabled: false
4 changes: 2 additions & 2 deletions deploy/values-minio.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ defaultBuckets: home-local-env
ingress:
enabled: true
ingressClassName: "nginx"
hostname: minio-s3-console.{{ .Values.HOME_HOSTNAME }}
hostname: minio-s3-console.localhost
path: /

apiIngress:
enabled: true
ingressClassName: "nginx"
hostname: minio-s3.{{ .Values.HOME_HOSTNAME }}
hostname: minio-s3.localhost
path: /
6 changes: 0 additions & 6 deletions deploy/values-postgre.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ global:
password: "{{ .Values.HOME_DATABASE_PASSWORD }}"
database: "{{ .Values.HOME_DATABASE_NAME }}"

primary:
service:
type: NodePort
nodePorts:
postgresql: 30130

# persistence:
# size: {{ env "POSTGRES_PV_SIZE" }}

7 changes: 5 additions & 2 deletions deploy/values-ui.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
image:
tag: "latest"

ingress:
hostname: "{{ .Values.HOME_UI_HOSTNAME }}"

extraConfigMapEnvVars:
CMS_URL: "http://home-cms-nginx:40120"
CMS_URL: "http://home-cms-nginx:{{ .Values.HOME_EXTERNAL_HTTP_PORT }}"
FRONTEND_URL: "{{ .Values.HOME_BASE_EXTERNAL_URL }}"

PREVIEW_SECRET: "{{ .Values.HOME_PREVIEW_SECRET }}"
PREVIEW_SECRET: "{{ .Values.HOME_PREVIEW_SECRET }}"
6 changes: 3 additions & 3 deletions deploy/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ image:
tag: "latest"

ingress:
hostname: "{{ .Values.HOME_HOSTNAME }}"
annotations:
# to do not redirect from http to https
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
# the maximum allowed size of the client's request body
nginx.ingress.kubernetes.io/proxy-body-size: "100m"
{{- if eq .Release.Namespace "local" }}
tls: false

{{- end }}
service:
ports:
http: {{ .Values.HOME_EXTERNAL_PORT }}
http: {{ .Values.HOME_EXTERNAL_HTTP_PORT }}
2 changes: 1 addition & 1 deletion kind-local-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nodes:
# this port is exposed from the cluster container
- containerPort: 30080
# host OS port which is called from the browser e.g. when UI is opened
# it should be the same as {{ .Values.HOME_EXTERNAL_PORT }}
# it should be the same as {{ .Values.HOME_EXTERNAL_HTTP_PORT }}
hostPort: 40120
# listens to all interfaces
listenAddress: "0.0.0.0"
19 changes: 19 additions & 0 deletions kind-prod-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# related discussion https://stackoverflow.com/a/69009486
# kind docs regarding this bit https://kind.sigs.k8s.io/docs/user/configuration#nodeport-with-port-mappings

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
# containerPort has to be the same port that is configured in values-ingress-nginx
# this port is exposed from the cluster container
- containerPort: 30080
# host OS port which is called from the browser e.g. when UI is opened
hostPort: 80
# listens to all interfaces
listenAddress: "0.0.0.0"

- containerPort: 30443
hostPort: 443
listenAddress: "0.0.0.0"