Skip to content

Commit

Permalink
[Cloud Security][D4C] Hide K8S (elastic#201062)
Browse files Browse the repository at this point in the history
## Summary

This PR is to hide K8S so User won't be able to access K8S Dashboard via
navigating to it from the page or by direct URL,
also deleting Cypress tests related to this

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
animehart and kibanamachine authored Nov 25, 2024
1 parent f7a274a commit 6d91a7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const allowedExperimentalValues = Object.freeze({
// FIXME:PT delete?
excludePoliciesInFilterEnabled: false,

kubernetesEnabled: true,
kubernetesEnabled: false,
donutChartEmbeddablesEnabled: false, // Depends on https://github.com/elastic/kibana/issues/136409 item 2 - 6

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React from 'react';
import { TrackApplicationView } from '@kbn/usage-collection-plugin/public';
import { allowedExperimentalValues } from '../../common';
import { KubernetesContainer } from './pages';

import type { SecuritySubPluginRoutes } from '../app/types';
Expand All @@ -24,7 +25,7 @@ export const KubernetesRoutes = () => (

export const routes: SecuritySubPluginRoutes = [
{
path: KUBERNETES_PATH,
path: allowedExperimentalValues.kubernetesEnabled ? KUBERNETES_PATH : [],
component: KubernetesRoutes,
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
DETECTION_RESPONSE,
DASHBOARDS,
CSP_DASHBOARD,
KUBERNETES,
INDICATORS,
BLOCKLIST,
CSP_BENCHMARKS,
Expand Down Expand Up @@ -54,7 +53,6 @@ import {
EXPLORE_URL,
MANAGE_URL,
CSP_DASHBOARD_URL,
KUBERNETES_URL,
BLOCKLIST_URL,
CSP_BENCHMARKS_URL,
CSP_FINDINGS_URL,
Expand Down Expand Up @@ -114,11 +112,6 @@ describe('top-level navigation common to all pages in the Security app', { tags:
cy.url().should('include', ENTITY_ANALYTICS_URL);
});

it('navigates to the Kubernetes page', () => {
navigateFromHeaderTo(KUBERNETES);
cy.url().should('include', KUBERNETES_URL);
});

it('navigates to the CSP dashboard page', () => {
navigateFromHeaderTo(CSP_DASHBOARD);
cy.url().should('include', CSP_DASHBOARD_URL);
Expand Down Expand Up @@ -289,11 +282,6 @@ describe('Serverless side navigation links', { tags: '@serverless' }, () => {
cy.url().should('include', ENTITY_ANALYTICS_URL);
});

it('navigates to the Kubernetes page', () => {
navigateFromHeaderTo(ServerlessHeaders.KUBERNETES, true);
cy.url().should('include', KUBERNETES_URL);
});

it('navigates to the CSP dashboard page', () => {
navigateFromHeaderTo(ServerlessHeaders.CSP_DASHBOARD, true);
cy.url().should('include', CSP_DASHBOARD_URL);
Expand Down

0 comments on commit 6d91a7c

Please sign in to comment.