Skip to content

Commit

Permalink
set apiServer of the target for garden terminals
Browse files Browse the repository at this point in the history
  • Loading branch information
petersutter committed Oct 14, 2021
1 parent 1a3c23a commit 285cc70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions backend/lib/services/terminals/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ async function getTargetCluster ({ user, namespace, name, target, preferredHost,
switch (target) {
case TargetEnum.GARDEN: {
targetCluster.kubeconfigContextNamespace = namespace
targetCluster.apiServer = {
server: config.apiServerUrl
}

if (isAdmin) {
targetCluster.namespace = 'garden'
targetCluster.credentials = getConfigValue('terminal.garden.operatorCredentials')
Expand Down Expand Up @@ -244,9 +248,6 @@ async function getTargetCluster ({ user, namespace, name, target, preferredHost,
]
}
]
targetCluster.apiServer = {
server: config.apiServerUrl
}
}

break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ Array [
"temporaryNamespace": true,
},
"target": Object {
"apiServer": undefined,
"apiServer": Object {
"server": "https://kubernetes.external.foo.bar",
},
"authorization": Object {
"projectMemberships": undefined,
"roleBindings": Array [
Expand Down

0 comments on commit 285cc70

Please sign in to comment.