GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific cluster from a project in GitLab using the GitLab API. It is useful for managing and cleaning up clusters associated with projects, especially when clusters are no longer needed or need to be removed for security or organizational reasons. For example, a DevOps engineer might use this node to automate the removal of outdated Kubernetes clusters linked to a project.

Use Case Examples

  1. Deleting a cluster from a project by specifying the project ID and cluster ID.
  2. Automating cluster cleanup in CI/CD pipelines to maintain project environments.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to DELETE for this operation.
Path Parameters Parameters required in the URL path to identify the project and cluster to delete.

Output

JSON

  • statusCode - HTTP status code of the delete operation response
  • responseBody - Response body from the GitLab API after attempting to delete the cluster

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and cluster ID are correct and exist in GitLab to avoid 404 Not Found errors.
  • Verify that the API authentication token has sufficient permissions to delete clusters in the specified project to prevent 403 Forbidden errors.
  • Check the base URL if using a self-hosted GitLab instance to ensure the request is sent to the correct server.

Links

Discussion