Skip to content

Resolve "Fix Incomplete Kubernetes Cluster Status List"

What does this MR do?

On the Kubernetes cluster index page, there is an icon that displays a circle with a color and tooltip that displays that status of the cluster.

There is an issue with the status list.

The issue is still being investigated, so in the meantime we will remove the icon altogether.

Also, there is a loading icon that displays when the status is 'Deleting'. It has been requested that we also display a loading icon when the status is 'Creating'.

Screenshots

image

image

Testing Instructions

Ideally you already have a Kubernetes cluster set up. If not, follow these instructions to fake some clusters:

  1. Update the fetchClusters method in the actions file:
const clusterList = [
  {
    name: 'My Cluster 1',
    environment_scope: '*',
    cluster_type: 'group_type',
    provider_type: 'gcp',
    status: 'creating',
    nodes: null,
  },
  {
    name: 'My Cluster 2',
    environment_scope: 'development',
    cluster_type: 'project_type',
    provider_type: 'aws',
    status: 'deleting',
    nodes: [{ usage: { cpu: '246155922n', memory: '1255212Ki' } }],
  },
  {
    name: 'My Cluster 3',
    environment_scope: 'development',
    cluster_type: 'project_type',
    provider_type: 'none',
    status: 'authentication_failure',
    nodes: [
      { usage: { cpu: '246155922n', memory: '1255212Ki' } },
      { usage: { cpu: '307051934n', memory: '1379136Ki' } },
    ],
  },
];

const apiData = {
  clusters: clusterList,
  has_ancestor_clusters: false,
};

export const fetchClusters = ({ state, commit }) => {
  commit(types.SET_CLUSTERS_DATA, { data: apiData, paginationInformation: {} });
  commit(types.SET_LOADING_STATE, false);
};
  1. Add the js-clusters div to the top of the index file:
.clusters-container
  #js-clusters-list-app{ data: { endpoint: clusterable.index_path(format: :json) } }
  - if @clusters.empty?
    = render "empty_state"

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading