Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 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
16 changes: 16 additions & 0 deletions nginx/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ http {
location /v1/healthz {
return 200 'OK';
}
location ~ ^/agent/([^/]+)/team-([^/]+)/(.*)$ {
set $agent_name $1;
set $team_id $2;
set $agent_path $3;
resolver ${KUBE_DNS_SERVICE_HOST} valid=10s;
proxy_pass http://$agent_name.team-$team_id.svc.cluster.local:9099/$agent_path$is_args$args;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Support for streaming responses
proxy_buffering off;
proxy_cache off;
chunked_transfer_encoding on;
}
location ~* \.(?:css|js|eot|woff|woff2|ttf|svg|otf) {
# Enable GZip for static files
gzip_static on;
Expand Down
6 changes: 5 additions & 1 deletion nginx/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ CONTEXT_PATH=${CONTEXT_PATH:-''}

find build -type f -print0 | xargs -0 sed -i -e "s/##CONTEXT_PATH##/$CONTEXT_PATH/g"

envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" </app/nginx.tmpl >/etc/nginx/nginx.conf
# Extract DNS nameserver for nginx resolver (fallback to resolv.conf if env var not set)
DNS_SERVER=${KUBE_DNS_SERVICE_HOST:-$(awk '/^nameserver/{print $2; exit}' /etc/resolv.conf)}

# Generate nginx.conf with DNS resolver substituted
sed "s/\${KUBE_DNS_SERVICE_HOST}/$DNS_SERVER/g" /app/nginx.tmpl > /etc/nginx/nginx.conf

exec nginx -g 'daemon off;'
1 change: 1 addition & 0 deletions public/assets/agents_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/i18n/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
"Knowledge-base_plural": "Knowledge Bases",
"TITLE_KNOWLEDGE_BASE": "Knowledge base details",
"TITLE_KNOWLEDGE_BASES": "Knowledge bases - {{scope}}",
"Agent": "Agent",
"Agent_plural": "Agents",
"TITLE_AGENT": "Agent details",
"TITLE_AGENTS": "Agents - {{scope}}",
"TITLE_NETWORK_POLICY": "Network policy details",
"TITLE_NETWORK_POLICIES": "Network policies - {{scope}}"
}
14 changes: 14 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ import CodeRepositoriesCreateEditPage from 'pages/code-repositories/create-edit/
import CodeRepositoriesOverviewPage from 'pages/code-repositories/overview/CodeRepositoriesOverviewPage'
import KnowledgeBasesCreateEditPage from 'pages/knowledge-bases/create-edit/KnowledgeBasesCreateEditPage'
import KnowledgeBasesOverviewPage from 'pages/knowledge-bases/overview/KnowledgeBasesOverviewPage'
import AgentsCreateEditPage from 'pages/agents/create-edit/AgentsCreateEditPage'
import AgentsOverviewPage from 'pages/agents/overview/AgentsOverviewPage'
import NetworkPoliciesOverviewPage from 'pages/network-policies/overview/NetworkPoliciesOverviewPage'
import NetworkPoliciesIngressCreateEditPage from 'pages/network-policies/create-edit/NetworkPoliciesIngressCreateEditPage'
import NetworkPoliciesEgressCreateEditPage from 'pages/network-policies/create-edit/NetworkPoliciesEgressCreateEditPage'
Expand Down Expand Up @@ -124,6 +126,18 @@ function App() {
exact
/>

<PrivateRoute path='/teams/:teamId/agents' component={AgentsOverviewPage} exact />
<PrivateRoute
path='/teams/:teamId/agents/create'
component={AgentsCreateEditPage}
exact
/>
<PrivateRoute
path='/teams/:teamId/agents/:agentName'
component={AgentsCreateEditPage}
exact
/>

<PrivateRoute path='/apps/:teamId' component={Apps} exact />
<PrivateRoute path='/apps/:teamId/:appId' component={OtomiApp} exact />
<PrivateRoute path='/backups' component={Backups} platformAdminRoute exact />
Expand Down
Loading