diff --git a/config/nginx/default.conf b/config/nginx/default.conf index 45d196c75ef164f63df6ceadbeda16a190d3787b..906b07c84e831e968a87d14ebe6063d08339d1a5 100644 --- a/config/nginx/default.conf +++ b/config/nginx/default.conf @@ -12,24 +12,9 @@ server { proxy_buffers 4 256k; proxy_busy_buffers_size 256k; - location /application_api/ { - # don't cache it - proxy_no_cache 1; - - # even if cached, don't try to use it - proxy_cache_bypass 1; - - proxy_pass http://localhost:8093/application_api/; # note the trailing slash here, it matters! - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # kill cache - add_header Last-Modified $date_gmt; - add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; - if_modified_since off; - expires off; - etag off; + location /application_api { + include conf.d/api-proxy.conf; + proxy_pass http://localhost:8093/application_api; # note the trailing slash here, it matters! } location /api { @@ -44,7 +29,7 @@ server { rewrite ^\/api\/organizations(/\d+)?$ /api/organizations$1 break; include conf.d/api-proxy.conf; - proxy_pass http://localhost:8090; + proxy_pass http://localhost:8092; } } diff --git a/src/main/k8s/production.yml b/src/main/k8s/production.yml index 4e3b57cba80e9af82195cc858e244985a1e48998..f8e41c74b16cbf6705ba92a166c149990a14d685 100644 --- a/src/main/k8s/production.yml +++ b/src/main/k8s/production.yml @@ -33,9 +33,7 @@ spec: image: eclipsefdn/eclipsefdn-membership-portal:latest imagePullPolicy: Always ports: - - targetPort: 8092 - protocol: TCP - port: 8090 + - containerPort: 8092 resources: limits: cpu: '1' @@ -56,9 +54,7 @@ spec: image: eclipsefdn/eclipsefdn-membership-application:latest imagePullPolicy: Always ports: - - targetPort: 8093 - protocol: TCP - port: 8090 + - containerPort: 8093 resources: limits: cpu: '1' @@ -104,17 +100,32 @@ spec: apiVersion: "v1" kind: "Service" metadata: - name: eclipsefdn-react-membership + name: eclipsefdn-membership-portal-staging namespace: foundation-internal-webdev-apps spec: ports: - name: "http" port: 80 protocol: "TCP" - targetPort: 8080 + targetPort: 8092 selector: app: eclipsefdn-react-membership - environment: production + environment: staging +--- +apiVersion: "v1" +kind: "Service" +metadata: + name: eclipsefdn-membership-application-staging + namespace: foundation-internal-webdev-apps +spec: + ports: + - name: "http" + port: 80 + protocol: "TCP" + targetPort: 8093 + selector: + app: eclipsefdn-react-membership + environment: staging --- apiVersion: "route.openshift.io/v1" kind: "Route" diff --git a/src/main/k8s/staging.yml b/src/main/k8s/staging.yml index 5f8ba2679cc79ab79896026f95a1ffdd52e7343e..507a4f1d20a81bc27ce6e04f2d7e41f9f92cfede 100644 --- a/src/main/k8s/staging.yml +++ b/src/main/k8s/staging.yml @@ -33,9 +33,7 @@ spec: image: eclipsefdn/eclipsefdn-membership-portal:latest imagePullPolicy: Always ports: - - targetPort: 8092 - protocol: TCP - port: 8090 + - containerPort: 8092 resources: limits: cpu: '1' @@ -56,16 +54,14 @@ spec: image: eclipsefdn/eclipsefdn-membership-application:latest imagePullPolicy: Always ports: - - targetPort: 8093 - protocol: TCP - port: 8090 + - containerPort: 8093 resources: limits: cpu: '1' - memory: 384Mi + memory: 256Mi requests: cpu: 200m - memory: 384Mi + memory: 256Mi env: - name: CONFIG_SECRET_PATH value: "/run/secrets/eclipsefdn-membership-application/secret.properties" @@ -89,12 +85,12 @@ spec: - mountPath: "/usr/share/nginx/imagestore" name: eclipsefdn-react-membership-staging-uploads-volume volumes: - - name: application-secret-properties - secret: - secretName: eclipsefdn-membership-application-staging - - name: portal-secret-properties - secret: - secretName: eclipsefdn-membership-portal-staging + - name: application-secret-properties + secret: + secretName: eclipsefdn-membership-application-staging + - name: portal-secret-properties + secret: + secretName: eclipsefdn-membership-portal-staging - name: eclipsefdn-react-membership-staging-uploads-volume persistentVolumeClaim: claimName: eclipsefdn-react-membership-staging-uploads @@ -102,14 +98,19 @@ spec: apiVersion: "v1" kind: "Service" metadata: - name: eclipsefdn-react-membership-staging + name: eclipsefdn-membership-staging namespace: foundation-internal-webdev-apps spec: ports: - name: "http" port: 80 protocol: "TCP" - targetPort: 8080 + targetPort: 8092 + ports: + - name: "http" + port: 80 + protocol: "TCP" + targetPort: 8093 selector: app: eclipsefdn-react-membership environment: staging