Skip to content

Commit

Permalink
Remove the check for number of valid Kiali instances in remote cluste…
Browse files Browse the repository at this point in the history
…rs (#6135)
  • Loading branch information
josunect committed May 15, 2023
1 parent 0ffa08d commit b989101
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions frontend/src/app/AuthenticationController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import * as AlertUtils from '../utils/AlertUtils';
import { setServerConfig, serverConfig, humanDurations } from '../config/ServerConfig';
import { AuthStrategy } from '../types/Auth';
import { JaegerInfo } from '../types/JaegerInfo';
import { ServerConfig } from '../types/ServerConfig';
import { LoginActions } from '../actions/LoginActions';
import history from './History';
import { NamespaceActions } from 'actions/NamespaceAction';
Expand Down Expand Up @@ -202,7 +201,6 @@ export class AuthenticationController extends React.Component<
this.props.setNamespaces(configs[0].data, new Date());
setServerConfig(configs[1].data);
this.applyUIDefaults();
this.checkConfiguredRemoteKialis(configs[1].data);

if (this.props.landingRoute) {
history.replace(this.props.landingRoute);
Expand Down Expand Up @@ -297,37 +295,6 @@ export class AuthenticationController extends React.Component<
}
}

// Check which clusters do not have an accessible Kiali instance.
// Emit a warning telling that for those clusters, no cross-links will be available.
private checkConfiguredRemoteKialis(backendConfigs: ServerConfig) {
if (backendConfigs.clusters) {
const clustersWithoutKialis = [] as string[];
for (let cluster in backendConfigs.clusters) {
// skip home cluster, it's always reachable
if (cluster === backendConfigs.clusterInfo?.name) {
continue;
}
if (backendConfigs.clusters.hasOwnProperty(cluster)) {
const kialiInstance = backendConfigs.clusters[cluster].kialiInstances?.find(
instance => instance.url.length !== 0
);
if (!kialiInstance) {
clustersWithoutKialis.push(cluster);
}
}
}

if (clustersWithoutKialis.length > 0) {
AlertUtils.addWarning(
'Not all remote clusters have reachable Kiali instances.',
undefined,
undefined,
'Context menus are disabled for remote cluster nodes if a Kiali instance is not discovered, or if the remote Kiali is not configured with an external URL.'
);
}
}
}

private setDocLayout = () => {
if (document.documentElement) {
const isKiosk = isKioskMode();
Expand Down

0 comments on commit b989101

Please sign in to comment.