diff --git a/docker-compose.yml b/docker-compose.yml index c8e30a217b7a063f09dfc8bb6ddbf691741ee8d0..9d4224705fbbc48977e6319206488e30f8598188 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -455,9 +455,9 @@ services: ports: - "80:8080" volumes: - - ./dbrepo-gateway-service/dbrepo.conf:/etc/nginx/conf.d/default.conf + - ./dbrepo-gateway-service/dbrepo.conf:/etc/nginx/conf.d/dbrepo.conf healthcheck: - test: lsof -i TCP:80 || exit 1 + test: ps -p 1 | grep "nginx" <<: *healthcheck-params deploy: <<: *resources-nano @@ -705,7 +705,7 @@ services: BASE_URL: "${BASE_URL:-http://localhost}" # do not attempt to set it in the grafana.ini, hours wasted here: 7 GF_SERVER_ROOT_URL: http://dashboard-ui:3000/dashboard/ - GF_INSTALL_PLUGINS: "yesoreyeram-infinity-datasource" + GF_INSTALL_PLUGINS: "yesoreyeram-infinity-datasource,grafana-opensearch-datasource" GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: "true" LDAP_ADMIN_USERNAME: "${IDENTITY_SERVICE_ADMIN_USERNAME:-admin}" LDAP_ADMIN_PASSWORD: "${IDENTITY_SERVICE_ADMIN_PASSWORD:-admin}" diff --git a/helm/dbrepo/templates/gateway-configmap.yaml b/helm/dbrepo/templates/gateway-configmap.yaml index 37863f85c45ae39134f5293687ca2f1bdb5e8223..3f500f0d9b0683e427e86a45a6d988900b5d9cbd 100644 --- a/helm/dbrepo/templates/gateway-configmap.yaml +++ b/helm/dbrepo/templates/gateway-configmap.yaml @@ -2,10 +2,10 @@ apiVersion: v1 kind: ConfigMap metadata: - name: gateway-service-setup + name: gateway-service-config namespace: {{ include "common.names.namespace" . | quote }} data: - dbrepo.conf: | + dbrepo.conf: |- # This is required to proxy Grafana Live WebSocket connections. map $http_upgrade $connection_upgrade { default upgrade; diff --git a/helm/dbrepo/templates/gateway-setup-configmap.yaml b/helm/dbrepo/templates/gateway-setup-configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0b830ba224b3eb2daf2329bfa486918d56ed9e23 --- /dev/null +++ b/helm/dbrepo/templates/gateway-setup-configmap.yaml @@ -0,0 +1,69 @@ +{{- if .Values.gatewayservice.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: gateway-service-setup + namespace: {{ include "common.names.namespace" . | quote }} +data: + nginx.conf: |- + # Based on https://www.nginx.com/resources/wiki/start/topics/examples/full/#nginx-conf + # user www www; ## Default: nobody + + worker_processes auto; + error_log "/opt/bitnami/nginx/logs/error.log"; + pid "/opt/bitnami/nginx/tmp/nginx.pid"; + + events { + worker_connections 1024; + } + + http { + include mime.types; + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + access_log "/opt/bitnami/nginx/logs/access.log" main; + add_header X-Frame-Options SAMEORIGIN; + + client_body_temp_path "/opt/bitnami/nginx/tmp/client_body" 1 2; + proxy_temp_path "/opt/bitnami/nginx/tmp/proxy" 1 2; + fastcgi_temp_path "/opt/bitnami/nginx/tmp/fastcgi" 1 2; + scgi_temp_path "/opt/bitnami/nginx/tmp/scgi" 1 2; + uwsgi_temp_path "/opt/bitnami/nginx/tmp/uwsgi" 1 2; + + sendfile on; + tcp_nopush on; + tcp_nodelay off; + gzip on; + gzip_http_version 1.0; + gzip_comp_level 2; + gzip_proxied any; + gzip_types text/plain text/css application/javascript text/xml application/xml+rss; + keepalive_timeout 65; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305; + client_max_body_size 2G; + server_tokens off; + + absolute_redirect off; + port_in_redirect off; + + include "/opt/bitnami/nginx/conf/server_blocks/*.conf"; + + # HTTP Server + server { + # Port to listen on, can also be set in IP:PORT format + listen 8080; + + include "/opt/bitnami/nginx/conf/bitnami/*.conf"; + + location /status { + stub_status on; + access_log off; + allow 127.0.0.1; + deny all; + } + } + } +{{- end }} \ No newline at end of file diff --git a/helm/dbrepo/values.yaml b/helm/dbrepo/values.yaml index 62ce16d3de3933c1be25c7a5602ff55be9c5cbbe..d50f79460f285dbadea119ef37450a43e64a7ad1 100644 --- a/helm/dbrepo/values.yaml +++ b/helm/dbrepo/values.yaml @@ -1052,7 +1052,15 @@ gatewayservice: ## @param gatewayservice.metrics.enabled Enable the Prometheus metrics sidecar. enabled: false ## @param gatewayservice.existingServerBlockConfigmap The extra configuration for the reverse proxy - existingServerBlockConfigmap: gateway-service-setup + existingServerBlockConfigmap: gateway-service-config + extraVolumes: + - name: config-map + configMap: + name: gateway-service-setup + extraVolumeMounts: + - name: config-map + mountPath: /etc/nginx/conf.d/nginx.conf + subPath: nginx.conf ## @param gatewayservice.replicaCount The number of replicas. replicaCount: 3