Skip to content

Commit

Permalink
Added changes for fixing beta9 issues (#4086)
Browse files Browse the repository at this point in the history
Signed-off-by: Jonsy13 <[email protected]>
  • Loading branch information
Jonsy13 authored Jul 12, 2023
1 parent 30b703c commit 351d0ba
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
6 changes: 3 additions & 3 deletions chaoscenter/web/config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ const devConfig = {
}
},
proxy: {
'/chaos/manager/api': {
pathRewrite: { '^/chaos/manager/api': '' },
'/api': {
pathRewrite: { '^/api': '' },
target: process.env.CHAOS_MANAGER
? process.env.CHAOS_MANAGER
: targetLocalHost
? 'http://localhost:8080'
: `${baseUrl}/chaos/manager/api`,
: `${baseUrl}/api`,
secure: false,
changeOrigin: true,
logLevel: 'info'
Expand Down
15 changes: 11 additions & 4 deletions chaoscenter/web/src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import type { APIConfig } from '@api/LitmusAPIProvider';

const loc = window.location;
let auth: string;
let chaosManager: string;
let sockURL: string;

if (loc.protocol === 'https:') {
sockURL = 'wss:';
} else {
sockURL = 'ws:';
}

if (__DEV__) {
auth = `/auth`;
chaosManager = `/chaos/manager/api`;
sockURL = `ws://${window.location.hostname}:8080`;
chaosManager = `/api`;
sockURL += `//${window.location.hostname}:8080`;
} else {
auth = `${window.location.origin}/auth`;
chaosManager = `${window.location.origin}/gateway/chaos/manager/api`;
sockURL = `wss://${window.location.host}/chaos/ws`;
chaosManager = `${window.location.origin}/api`;
sockURL += `//${window.location.host}/ws`;
}

const APIEndpoints: APIConfig = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,11 @@ metadata:
data:
default.conf: |
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
Expand Down Expand Up @@ -662,8 +664,8 @@ spec:
value: "litmuschaos/chaos-exporter:3.0.0-beta3"
- name: SERVER_SERVICE_NAME
value: "litmusportal-server-service"
- name: AGENT_DEPLOYMENTS
value: '["app=chaos-exporter", "name=chaos-operator", "app=event-tracker", "app=workflow-controller"]'
- name: INFRA_DEPLOYMENTS
value: '["app=chaos-exporter", "name=chaos-operator", "app=workflow-controller"]'
- name: NODE_NAME
valueFrom:
fieldRef:
Expand Down
4 changes: 3 additions & 1 deletion mkdocs/docs/3.0.0-beta9/litmus-3.0.0-beta9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,11 @@ metadata:
data:
nginx.conf: |
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
Expand Down Expand Up @@ -672,7 +674,7 @@ spec:
- name: SERVER_SERVICE_NAME
value: "litmusportal-server-service"
- name: INFRA_DEPLOYMENTS
value: '["app=chaos-exporter", "name=chaos-operator", "app=event-tracker", "app=workflow-controller"]'
value: '["app=chaos-exporter", "name=chaos-operator", "app=workflow-controller"]'
- name: NODE_NAME
valueFrom:
fieldRef:
Expand Down
6 changes: 4 additions & 2 deletions mkdocs/docs/3.0.0-beta9/litmus-namespaced-3.0.0-beta9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,11 @@ metadata:
data:
default.conf: |
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
Expand Down Expand Up @@ -626,8 +628,8 @@ spec:
value: ""
- name: CHAOS_CENTER_SCOPE
value: "namespace"
- name: AGENT_DEPLOYMENTS
value: '["app=chaos-exporter", "name=chaos-operator", "app=event-tracker", "app=workflow-controller"]'
- name: INFRA_DEPLOYMENTS
value: '["app=chaos-exporter", "name=chaos-operator", "app=workflow-controller"]'
- name: SERVER_SERVICE_NAME
value: "litmusportal-server-service"
- name: CHAOS_CENTER_UI_ENDPOINT
Expand Down

0 comments on commit 351d0ba

Please sign in to comment.