Method: Gitlab::Client::ProjectClusters#edit_project_cluster

Defined in:
lib/gitlab/client/project_clusters.rb

#edit_project_cluster(project, cluster_id, options = {}) ⇒ Gitlab::ObjectifiedHash

Updates an existing project cluster.

Examples:

Gitlab.edit_project_cluster(5, 1, { name: 'cluster-6', platform_kubernetes_attributes: { api_url: 'https://35.111.51.20', token: '12345', ca_cert: "-----BEGIN CERTIFICATE-----\r\nhFiK1L61owwDQYJKoZIhvcNAQELBQAw\r\nLzEtMCsGA1UEAxMkZDA1YzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM4ZDBj\r\nMB4XDTE4MTIyNzIwMDM1MVoXDTIzMTIyNjIxMDM1MVowLzEtMCsGA1UEAxMkZDA1\r\nYzQ1YjctNzdiMS00NDY0LThjNmEtMTQ0ZDJkZjM.......-----END CERTIFICATE-----", namespace: 'cluster-6-namespace' } })

Parameters:

  • project (Integer, String)

    The ID or name of a project.

  • cluster_id (Integer)

    The ID of the cluster.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :name(optional) (String)

    The name of the cluster

  • :platform_kubernetes_attributes (Hash)

    A customizable set of Kubernetes platform attributes

Returns:



67
68
69
# File 'lib/gitlab/client/project_clusters.rb', line 67

def edit_project_cluster(project, cluster_id, options = {})
  put("/projects/#{url_encode project}/clusters/#{cluster_id}", body: options)
end