---
title: "UpdateMinerSet"
method: PUT
path: "/v1/minersets"
tags: ["Gateway"]
---

# UpdateMinerSet

`PUT /v1/minersets`

## Request body

- Appsv1beta1MinerSet — MinerSet ensures that a specified number of miners replicas are running at any given time.
  - `spec` V1beta1MinerSetSpec — MinerSetSpec defines the desired state of MinerSet.
    - `minReadySeconds` integer
    - `progressDeadlineSeconds` integer — The maximum time in seconds for a minerset to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.
    - `replicas` integer
    - `selector` V1LabelSelector
      - `matchLabels` object
      - `matchExpressions` V1LabelSelectorRequirement[]
        - `key` string — key is the label key that the selector applies to.
        - `operator` string — operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
        - `values` string[]
    - `template` V1beta1MinerTemplateSpec — MinerTemplateSpec describes the data needed to create a Miner from a template.
      - `metadata` Appsv1beta1ObjectMeta — ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. This is a copy of customizable fields from metav1.ObjectMeta. ObjectMeta is embedded in `Miner.Spec` and `MinerSet.Template`, which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases and read-only fields which end up in the generated CRD validation, having it as a subset simplifies the API and some issues that can impact user experience. During the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically `spec.metadata.creationTimestamp in body must be of type string: "null"`. The investigation showed that `controller-tools@v2` behaves differently than its previous version when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package. In more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` had validation properties, including for `creationTimestamp` (metav1.Time). The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` which breaks validation because the field isn't marked as nullable. In future versions, controller-tools@v2 might allow overriding the type and validation for embedded types. When that happens, this hack should be revisited.
        - `labels` object
        - `annotations` object
      - `spec` V1beta1MinerSpec — MinerSpec defines the desired state of Miner.
        - `podDeletionTimeout` Metav1Duration — Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.
          - `duration` string, int64
        - `metadata` Appsv1beta1ObjectMeta — ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. This is a copy of customizable fields from metav1.ObjectMeta. ObjectMeta is embedded in `Miner.Spec` and `MinerSet.Template`, which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases and read-only fields which end up in the generated CRD validation, having it as a subset simplifies the API and some issues that can impact user experience. During the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically `spec.metadata.creationTimestamp in body must be of type string: "null"`. The investigation showed that `controller-tools@v2` behaves differently than its previous version when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package. In more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` had validation properties, including for `creationTimestamp` (metav1.Time). The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` which breaks validation because the field isn't marked as nullable. In future versions, controller-tools@v2 might allow overriding the type and validation for embedded types. When that happens, this hack should be revisited.
          - `labels` object
          - `annotations` object
        - `displayName` string
        - `minerType` string
        - `chainName` string
        - `restartPolicy` string
    - `displayName` string — The display name of the minerset.
    - `deletePolicy` string
  - `status` V1beta1MinerSetStatus — MinerSetStatus represents the current status of a MinerSet.
    - `failureReason` string — In the event that there is a terminal problem reconciling the replicas, both FailureReason and FailureMessage will be set. FailureReason will be populated with a succinct value suitable for miner interpretation, while FailureMessage will contain a more verbose string suitable for logging and human consumption. These fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MinerTemplate's spec or the configuration of the miner controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the miner controller, or the responsible miner controller itself being critically misconfigured. Any transient errors that occur during the reconciliation of Miners can be added as events to the MinerSet object and/or logged in the controller's output. +optional
    - `failureMessage` string — FailureMessage will be set in the event that there is a terminal problem reconciling the MinerSet and will contain a more verbose string suitable for logging and human consumption. This field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MinerSet's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured. Any transient errors that occur during the reconciliation of MinerSets can be added as events to the MinerSet object and/or logged in the controller's output. +optional
    - `conditions` Appsv1beta1Condition[]
      - `reason` string
      - `message` string
      - `type` string — Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important.
      - `status` string — Status of the condition, one of True, False, Unknown.
      - `severity` string
      - `lastTransitionTime` V1Time — Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. +protobuf.options.marshal=false +protobuf.as=Timestamp +protobuf.options.(gogoproto.goproto_stringer)=false
        - `seconds` string, int64 — Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
        - `nanos` integer — Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.
    - `replicas` integer — Replicas is the most recently observed number of replicas.
    - `fullyLabeledReplicas` integer
    - `readyReplicas` integer
    - `availableReplicas` integer
    - `observedGeneration` string, int64
  - `metadata` Metav1ObjectMeta — ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
    - `resourceVersion` string — An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +optional
    - `creationTimestamp` V1Time — Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. +protobuf.options.marshal=false +protobuf.as=Timestamp +protobuf.options.(gogoproto.goproto_stringer)=false
      - `seconds` string, int64 — Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
      - `nanos` integer — Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.
    - `namespace` string — Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces +optional
    - `deletionGracePeriodSeconds` string, int64
    - `managedFields` V1ManagedFieldsEntry[] — ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. +optional
      - `subresource` string — Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.
      - `manager` string — Manager is an identifier of the workflow managing these fields.
      - `operation` string — Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.
      - `apiVersion` string — APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.
      - `time` V1Time — Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. +protobuf.options.marshal=false +protobuf.as=Timestamp +protobuf.options.(gogoproto.goproto_stringer)=false
        - `seconds` string, int64 — Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
        - `nanos` integer — Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.
      - `fieldsType` string
      - `fieldsV1` V1FieldsV1 — FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. Each key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:<name>', where <name> is the name of a field in a struct, or key in a map 'v:<value>', where <value> is the exact json formatted value of a list item 'i:<index>', where <index> is position of a item in a list 'k:<keys>', where <keys> is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set. The exact format is defined in sigs.k8s.io/structured-merge-diff +protobuf.options.(gogoproto.goproto_stringer)=false
        - `Raw` string, byte — Raw is the underlying serialization of this object.
    - `selfLink` string
    - `annotations` object
    - `deletionTimestamp` V1Time — Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. +protobuf.options.marshal=false +protobuf.as=Timestamp +protobuf.options.(gogoproto.goproto_stringer)=false
      - `seconds` string, int64 — Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
      - `nanos` integer — Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.
    - `labels` object
    - `ownerReferences` V1OwnerReference[]
      - `apiVersion` string — API version of the referent.
      - `kind` string
      - `name` string
      - `uid` string
      - `controller` boolean
      - `blockOwnerDeletion` boolean
    - `finalizers` string[]
    - `name` string
    - `generateName` string — GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. If this field is specified and the generated name exists, the server will return a 409. Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency +optional
    - `uid` string — UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids +optional
    - `generation` string, int64

## Response `200`

A successful response.

- object

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/onexstack/apis/usercenter-v1-usercenter-proto.md) · [All operations](https://skmtc.net/onexstack/apis/usercenter-v1-usercenter-proto/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onexstack/usercenter-v1-usercenter-proto/versions/fc95c4d4129d/schema)
