Help Center/ Ubiquitous Cloud Native Service/ API Reference/ API/ UCS Cluster/ Obtaining the Progress of Enabling GitOps
Updated on 2025-12-01 GMT+08:00

Obtaining the Progress of Enabling GitOps

Function

This API is used to obtain the progress of enabling GitOps.

URI

GET /v1/clusters/{clusterid}/gitops

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

clusterid

Yes

String

Cluster ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

Identity authentication information. Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

metadata

ListMeta object

List metadata

items

Array of Pod objects

Pod list

Table 4 ListMeta

Parameter

Type

Description

resourceVersion

String

Server's internal version

continue

String

Whether there is data on the next page that needs to be returned

remainingItemCount

String

The number of items in the list that are not included in this response

Table 5 Pod

Parameter

Type

Description

metadata

ObjectMeta object

Pod metadata

spec

PodSpec object

Desired pod status

status

PodStatus object

Actual pod status

Table 6 ObjectMeta

Parameter

Type

Description

uid

String

Resource ID

name

String

Resource name

generateName

String

If no name is provided, the server uses the prefix to generate a unique name.

namespace

String

Namespace

labels

Map<String,String>

Label

annotations

Map<String,String>

Annotation

creationTimestamp

String

Creation time

updateTimestamp

String

Update time

resourceVersion

String

Internal version of a resource

generation

String

Generation of the desired resource state

managedFields

Array of ManagedFieldsEntry objects

Fields managed by workflows

ownerReferences

Array of OwnerReference objects

Ownership, dependencies, and garbage collection mechanism of objects. It supports resource management by the controller.

Table 7 ManagedFieldsEntry

Parameter

Type

Description

manager

String

Manager name

operation

String

Operation type that causes this entry being created. The value can only be Apply or Update.

apiVersion

String

Resource API version used by a manager for defining fields

time

String

Timestamp when this entry was created or last updated

fieldsType

String

Field structure format. The value is fixed at "FieldsV1".

fieldsV1

Object

Information about the managed fields

Table 8 OwnerReference

Parameter

Type

Description

apiVersion

String

API version of the referent

kind

String

Type of the referent

name

String

Name of the referent

uid

String

UID of the referent

controller

Boolean

If the value is true, this reference points to the controller that manages the resource.

blockOwnerDeletion

Boolean

If the value is true and the owner has a finalizer named foregroundDeletion, the owner cannot be deleted until this reference is removed.

Table 9 PodSpec

Parameter

Type

Description

volumes

Array of objects

List of storage volumes that can be mounted to a pod

containers

Array of objects

List of service containers in a pod

restartPolicy

String

Container restart policy after failures

terminationGracePeriodSeconds

Integer

The time to wait for a container to shut down gracefully before it is forcefully killed

activeDeadlineSeconds

Integer

Maximum lifetime of a pod on a node

dnsPolicy

String

DNS policy

nodeSelector

Map<String,String>

Node selector, which is used to specify nodes where pods can be scheduled

serviceAccountName

String

Name of the ServiceAccount used to run a pod

serviceAccount

String

The ServiceAccount field of the earlier version for backward compatibility

automountServiceAccountToken

Boolean

Whether the ServiceAccount token is automatically mounted to the pod

nodeName

String

Node where a pod should be scheduled

securityContext

Object

Pod-level security context

schedulerName

String

Scheduler that will dispatch a pod

tolerations

Array of Toleration objects

List of taints tolerated by a container

priority

Integer

Pod priority

enableServiceLinks

Boolean

Whether the service information is injected into the environment variables of a pod

preemptionPolicy

String

Priority-based preemption policy

Table 10 Toleration

Parameter

Type

Description

key

String

Key name of the taint to be tolerated

operator

String

Relationship between the key and value. The value can be Exists or Equal. The default value is Equal.

value

String

Taint value to be matched. When Operator is set to Exists, Value must be empty.

effect

String

Taint effect to be matched. The value can be NoSchedule, PreferNoSchedule, or NoExecute. If the value is empty, all effects are matched.

tolerationSeconds

Integer

Duration during which a pod can tolerate a taint. This parameter is valid only for NoExecute.

Table 11 PodStatus

Parameter

Type

Description

phase

String

Where the pod is in its lifecycle. Options:

  • Pending: The pod has been accepted but is not ready.

  • Running: The pod has been bound to a node and at least one container is running.

  • Succeeded: All containers in the pod have been terminated and will not be restarted.

  • Failed: At least one container in the pod failed to be terminated.

  • Unknown: The pod status cannot be obtained.

hostIP

String

IP address of the host where the pod is assigned

startTime

String

Time at which the pod was acknowledged by kubelet

containerStatuses

Array of ContainerStatus objects

Container status list

Table 12 ContainerStatus

Parameter

Type

Description

name

String

Container name

state

Object

Current container status

lastState

String

The status of a container after it has terminated

ready

Boolean

Whether a container passes the readiness probe

restartCount

Integer

The number of container restarts

image

String

Name of the image for running a container

imageID

String

ID of the image for running a container

started

String

Whether a container has been started and is running stably

Status code: 400

Table 13 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 404

Table 14 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 500

Table 15 Response body parameters

Parameter

Type

Description

-

String

-

Example Requests

None

Example Responses

Status code: 200

Pod information of the GitOps component obtained

{
  "metadata" : { },
  "items" : [ {
    "metadata" : {
      "name" : "source-controller-97bdcd8cf-5fs52",
      "generateName" : "source-controller-97bdcd8cf-",
      "namespace" : "flux-system",
      "uid" : "590c9359-5812-49f2-9dd2-779ba0737f4b",
      "resourceVersion" : "5273585",
      "creationTimestamp" : "2025-11-05T03:48:06Z",
      "labels" : {
        "app" : "source-controller",
        "pod-template-hash" : "97bdcd8cf",
        "release" : "cceaddon-flux"
      },
      "annotations" : {
        "prometheus.io/port" : "8080",
        "prometheus.io/scrape" : "true"
      },
      "ownerReferences" : [ {
        "apiVersion" : "apps/v1",
        "kind" : "ReplicaSet",
        "name" : "source-controller-97bdcd8cf",
        "uid" : "4093b4f6-97db-41a7-9bc9-2855f12418a9",
        "controller" : true,
        "blockOwnerDeletion" : true
      } ],
      "managedFields" : [ {
        "manager" : "kube-controller-manager",
        "operation" : "Update",
        "apiVersion" : "v1",
        "time" : "2025-11-05T03:48:06Z",
        "fieldsType" : "FieldsV1"
      }, {
        "manager" : "kubelet",
        "operation" : "Update",
        "apiVersion" : "v1",
        "time" : "2025-11-05T03:48:06Z",
        "fieldsType" : "FieldsV1"
      } ]
    },
    "spec" : {
      "volumes" : [ ],
      "containers" : [ ],
      "restartPolicy" : "Always",
      "terminationGracePeriodSeconds" : 10,
      "dnsPolicy" : "ClusterFirst",
      "serviceAccountName" : "source-controller",
      "serviceAccount" : "source-controller",
      "automountServiceAccountToken" : true,
      "nodeName" : "192.168.0.138",
      "securityContext" : {
        "runAsUser" : 10000,
        "fsGroup" : 10000,
        "seccompProfile" : {
          "type" : "Unconfined"
        }
      },
      "schedulerName" : "default-scheduler",
      "tolerations" : [ {
        "key" : "node.kubernetes.io/not-ready",
        "operator" : "Exists",
        "effect" : "NoExecute",
        "tolerationSeconds" : 300
      }, {
        "key" : "node.kubernetes.io/unreachable",
        "operator" : "Exists",
        "effect" : "NoExecute",
        "tolerationSeconds" : 300
      } ],
      "priority" : 0,
      "enableServiceLinks" : true,
      "preemptionPolicy" : "PreemptLowerPriority"
    },
    "status" : {
      "phase" : "Pending",
      "hostIP" : "192.168.0.138",
      "startTime" : "2025-11-05T03:48:06Z",
      "containerStatuses" : [ {
        "name" : "manager",
        "state" : {
          "waiting" : {
            "reason" : "ContainerCreating"
          }
        },
        "lastState" : { },
        "ready" : false,
        "image" : "xxxxxx",
        "imageID" : "",
        "started" : false
      } ]
    }
  } ]
}

Status Codes

Status Code

Description

200

Pod information of the GitOps component obtained

400

Client request error. The server could not execute the request.

404

Resources not found

500

Internal server error

Error Codes

See Error Codes.