From e620ffffbe4b5d107367a89ccadd9dc82bb7e9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20L=C3=A4ngerer?= Date: Mon, 20 Nov 2023 08:53:50 +0100 Subject: [PATCH] Make container ports configurable to support unprivileged ports --- airbyte-webapp/Dockerfile | 4 ++-- airbyte-webapp/nginx/default.conf.template | 4 ++-- .../templates/deployment.yaml | 2 +- charts/airbyte-connector-builder-server/values.yaml | 4 ++++ charts/airbyte-webapp/templates/deployment.yaml | 2 +- charts/airbyte-webapp/values.yaml | 4 ++++ 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/airbyte-webapp/Dockerfile b/airbyte-webapp/Dockerfile index a0ab3f379e4..b8430d01420 100644 --- a/airbyte-webapp/Dockerfile +++ b/airbyte-webapp/Dockerfile @@ -1,7 +1,7 @@ ARG NGINX_IMAGE=nginx:alpine FROM ${NGINX_IMAGE} -EXPOSE 80 - COPY bin/build /usr/share/nginx/html COPY bin/nginx/default.conf.template /etc/nginx/templates/default.conf.template + + diff --git a/airbyte-webapp/nginx/default.conf.template b/airbyte-webapp/nginx/default.conf.template index aa9c77ed860..5ee9846d70d 100644 --- a/airbyte-webapp/nginx/default.conf.template +++ b/airbyte-webapp/nginx/default.conf.template @@ -11,8 +11,8 @@ upstream keycloak { } server { - listen 80; - listen [::]:80; + listen ${NGINX_PORT}; + listen [::]:${NGINX_PORT}; server_name localhost; add_header Content-Security-Policy "script-src * 'unsafe-inline'; worker-src 'self' blob:;"; diff --git a/charts/airbyte-connector-builder-server/templates/deployment.yaml b/charts/airbyte-connector-builder-server/templates/deployment.yaml index a09dbef6cf6..0af33cfd4e7 100644 --- a/charts/airbyte-connector-builder-server/templates/deployment.yaml +++ b/charts/airbyte-connector-builder-server/templates/deployment.yaml @@ -116,7 +116,7 @@ spec: ports: - name: http - containerPort: 80 + containerPort: {{ .Values.ports.http }} protocol: TCP {{- if .Values.debug.enabled }} - name: debug diff --git a/charts/airbyte-connector-builder-server/values.yaml b/charts/airbyte-connector-builder-server/values.yaml index fc9dcf63166..86554970851 100644 --- a/charts/airbyte-connector-builder-server/values.yaml +++ b/charts/airbyte-connector-builder-server/values.yaml @@ -27,6 +27,10 @@ image: repository: airbyte/connector-builder-server pullPolicy: IfNotPresent +## HTTP port of connector-builder-server container - option to switch to a non-privileged one +ports: + http: 80 + ## podAnnotations [object] Add extra annotations to the server pod ## podAnnotations: {} diff --git a/charts/airbyte-webapp/templates/deployment.yaml b/charts/airbyte-webapp/templates/deployment.yaml index 881796426a9..4f093eaf47b 100644 --- a/charts/airbyte-webapp/templates/deployment.yaml +++ b/charts/airbyte-webapp/templates/deployment.yaml @@ -141,7 +141,7 @@ spec: {{- end }} ports: - name: http - containerPort: 80 + containerPort: {{ .Values.ports.http }} protocol: TCP {{- if .Values.resources }} resources: {{- toYaml .Values.resources | nindent 10 }} diff --git a/charts/airbyte-webapp/values.yaml b/charts/airbyte-webapp/values.yaml index 3e012890855..1f9c95eafc2 100644 --- a/charts/airbyte-webapp/values.yaml +++ b/charts/airbyte-webapp/values.yaml @@ -25,6 +25,10 @@ image: repository: airbyte/webapp pullPolicy: IfNotPresent +## HTTP port of webapp container - option to switch to a non-privileged one +ports: + http: 80 + ## webapp.podAnnotations [object] Add extra annotations to the webapp pod(s) ## podAnnotations: {}