GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation updates a specific cluster within a GitLab project using the GitLab API. It is useful for managing and modifying cluster configurations associated with a project, such as updating cluster details or settings. For example, a DevOps engineer might use this node to update the cluster information for a project to reflect changes in infrastructure or deployment environments.

Use Case Examples

  1. Updating cluster details for a project in GitLab to change its configuration or metadata.
  2. Modifying cluster settings to enable or disable features or update access credentials.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Type of authentication to use, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance to which the API request is sent, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but can be set to PUT for this operation.
Path Parameters Parameters for the API path including the project ID or URL-encoded path and the cluster ID to identify the cluster to update.

Output

JSON

  • id - The ID of the updated cluster.
  • name - The name of the updated cluster.
  • environment_scope - The environment scope associated with the cluster.
  • platform_kubernetes_attributes
    • api_url - The Kubernetes API URL for the cluster.
    • ca_cert - The CA certificate for the Kubernetes cluster.
    • token - The authentication token for the Kubernetes cluster.
  • created_at - Timestamp when the cluster was created.
  • updated_at - Timestamp when the cluster was last updated.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and cluster ID path parameters are correctly set and URL-encoded if necessary.
  • Verify that the authentication credentials are valid and have sufficient permissions to update clusters in the project.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the API endpoint is reachable.
  • Common error messages include 401 Unauthorized (invalid or missing credentials), 404 Not Found (incorrect project or cluster ID), and 400 Bad Request (invalid request body or parameters).

Links

Discussion