# Copyright 2022 Lingfei Kong . All rights reserved. # Use of this source code is governed by a MIT style # license that can be found in the LICENSE file. The original repo for # this file is https://github.com/onexstack/onex. # consumes: - application/json produces: - application/json swagger: "2.0" info: title: usercenter/v1/usercenter.proto version: version not set paths: /v1/miners/{name}: delete: tags: - Gateway summary: DeleteMiner operationId: Gateway_DeleteMiner parameters: - type: string name: name in: path required: true responses: "200": description: A successful response. schema: type: object default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' get: parameters: - type: string name: name in: path required: true responses: "200": description: A successful response. schema: $ref: '#/definitions/appsv1beta1Miner' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - Gateway summary: GetMiner operationId: Gateway_GetMiner /v1/minersets/{name}: get: tags: - Gateway summary: GetMinerSet operationId: Gateway_GetMinerSet parameters: - type: string name: name in: path required: true responses: default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' "200": description: A successful response. schema: $ref: '#/definitions/appsv1beta1MinerSet' delete: tags: - Gateway summary: DeleteMinerSet operationId: Gateway_DeleteMinerSet parameters: - type: string name: name in: path required: true responses: "200": schema: type: object description: A successful response. default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/orders: get: operationId: FakeServer_ListOrder parameters: - type: string format: int64 name: limit in: query - type: string format: int64 name: offset in: query responses: "200": description: A successful response. schema: $ref: '#/definitions/v1ListOrderResponse' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - FakeServer post: tags: - FakeServer operationId: FakeServer_CreateOrder parameters: - name: body in: body required: true schema: $ref: '#/definitions/v1CreateOrderRequest' responses: "200": description: A successful response. schema: $ref: '#/definitions/v1CreateOrderResponse' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/auth/login: post: tags: - UserCenter summary: Login operationId: UserCenter_Login parameters: - name: body in: body required: true schema: $ref: '#/definitions/v1LoginRequest' responses: "200": description: A successful response. schema: $ref: '#/definitions/v1LoginReply' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/auth/refresh-token: post: tags: - UserCenter summary: RefreshToken operationId: UserCenter_RefreshToken parameters: - schema: $ref: '#/definitions/v1RefreshTokenRequest' name: body in: body required: true responses: "200": description: A successful response. schema: $ref: '#/definitions/v1LoginReply' default: schema: $ref: '#/definitions/googlerpcStatus' description: An unexpected error response. /v1/miners: post: responses: "200": description: A successful response. schema: type: object default: schema: $ref: '#/definitions/googlerpcStatus' description: An unexpected error response. tags: - Gateway summary: CreateMiner operationId: Gateway_CreateMiner parameters: - description: Miner is the Schema for the miners API. name: body in: body required: true schema: $ref: '#/definitions/appsv1beta1Miner' get: tags: - Gateway summary: ListMiner operationId: Gateway_ListMiner parameters: - type: string format: int64 name: limit in: query - name: offset in: query type: string format: int64 responses: "200": description: A successful response. schema: $ref: '#/definitions/v1ListMinerResponse' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' put: responses: "200": description: A successful response. schema: type: object default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - Gateway summary: UpdateMiner operationId: Gateway_UpdateMiner parameters: - description: Miner is the Schema for the miners API. name: body in: body required: true schema: $ref: '#/definitions/appsv1beta1Miner' /v1/secrets/{name}: delete: parameters: - type: string name: name in: path required: true responses: default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' "200": description: A successful response. schema: type: object tags: - UserCenter summary: DeleteSecret operationId: UserCenter_DeleteSecret get: operationId: UserCenter_GetSecret parameters: - required: true type: string name: name in: path responses: "200": description: A successful response. schema: $ref: '#/definitions/v1SecretReply' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - UserCenter summary: GetSecret put: tags: - UserCenter summary: UpdateSecret operationId: UserCenter_UpdateSecret parameters: - required: true type: string name: name in: path - name: body in: body required: true schema: type: object properties: description: type: string expires: type: string format: int64 status: type: integer format: int32 responses: "200": description: A successful response. schema: type: object default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/users: get: parameters: - type: string format: int64 name: limit in: query - type: string format: int64 name: offset in: query responses: "200": schema: $ref: '#/definitions/v1ListUserResponse' description: A successful response. default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - UserCenter summary: ListUser operationId: UserCenter_ListUser post: tags: - UserCenter summary: CreateUser operationId: UserCenter_CreateUser parameters: - name: body in: body required: true schema: $ref: '#/definitions/v1CreateUserRequest' responses: "200": schema: type: object description: A successful response. default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/auth/authenticate: post: tags: - UserCenter summary: Authenticate operationId: UserCenter_Authenticate parameters: - in: body required: true schema: $ref: '#/definitions/v1AuthenticateRequest' name: body responses: "200": description: A successful response. schema: $ref: '#/definitions/v1AuthenticateResponse' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/idempotents: get: operationId: Gateway_GetIdempotentToken responses: "200": description: A successful response. schema: $ref: '#/definitions/v1IdempotentResponse' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - Gateway summary: GetIdempotentToken /v1/secrets: get: parameters: - type: string format: int64 name: limit in: query - format: int64 name: offset in: query type: string responses: "200": description: A successful response. schema: $ref: '#/definitions/v1ListSecretResponse' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - UserCenter summary: ListSecret operationId: UserCenter_ListSecret post: tags: - UserCenter summary: CreateSecret operationId: UserCenter_CreateSecret parameters: - schema: $ref: '#/definitions/v1CreateSecretRequest' name: body in: body required: true responses: "200": description: A successful response. schema: type: object default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/users/{username}: put: tags: - UserCenter summary: UpdateUser operationId: UserCenter_UpdateUser parameters: - type: string name: username in: path required: true - required: true schema: type: object properties: nickname: type: string phone: type: string email: type: string name: body in: body responses: default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' "200": description: A successful response. schema: type: object delete: tags: - UserCenter summary: DeleteUser operationId: UserCenter_DeleteUser parameters: - type: string name: username in: path required: true responses: "200": description: A successful response. schema: type: object default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' get: tags: - UserCenter summary: GetUser operationId: UserCenter_GetUser parameters: - type: string name: username in: path required: true responses: "200": description: A successful response. schema: $ref: '#/definitions/v1UserReply' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/users/{username}/update-password: put: responses: "200": schema: type: object description: A successful response. default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - UserCenter summary: UpdatePassword operationId: UserCenter_UpdatePassword parameters: - type: string name: username in: path required: true - required: true schema: type: object properties: newPassword: type: string oldPassword: type: string name: body in: body /v1/auth/logout: post: tags: - UserCenter summary: Logout operationId: UserCenter_Logout parameters: - required: true schema: $ref: '#/definitions/v1LogoutRequest' name: body in: body responses: "200": description: A successful response. schema: type: object default: schema: $ref: '#/definitions/googlerpcStatus' description: An unexpected error response. /v1/minersets/{name}/scale: put: tags: - Gateway summary: ScaleMinerSet operationId: Gateway_ScaleMinerSet parameters: - type: string name: name in: path required: true - name: body in: body required: true schema: type: object properties: replicas: type: integer format: int32 responses: "200": description: A successful response. schema: type: object default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/minersets: post: tags: - Gateway summary: CreateMinerSet operationId: Gateway_CreateMinerSet parameters: - in: body required: true schema: $ref: '#/definitions/appsv1beta1MinerSet' description: MinerSet ensures that a specified number of miners replicas are running at any given time. name: body responses: "200": description: A successful response. schema: type: object default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' get: tags: - Gateway summary: ListMinerSet operationId: Gateway_ListMinerSet parameters: - type: string format: int64 name: limit in: query - type: string format: int64 name: offset in: query responses: "200": description: A successful response. schema: $ref: '#/definitions/v1ListMinerSetResponse' default: schema: $ref: '#/definitions/googlerpcStatus' description: An unexpected error response. put: tags: - Gateway summary: UpdateMinerSet operationId: Gateway_UpdateMinerSet parameters: - description: MinerSet ensures that a specified number of miners replicas are running at any given time. name: body in: body required: true schema: $ref: '#/definitions/appsv1beta1MinerSet' responses: "200": schema: type: object description: A successful response. default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' /v1/orders/{orderID}: get: tags: - FakeServer operationId: FakeServer_GetOrder parameters: - type: string name: orderID in: path required: true responses: "200": description: A successful response. schema: $ref: '#/definitions/v1OrderReply' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' put: tags: - FakeServer operationId: FakeServer_UpdateOrder parameters: - type: string name: orderID in: path required: true - in: body required: true schema: type: object properties: product: type: string quantity: type: string format: int64 customer: type: string name: body responses: "200": description: A successful response. schema: type: object default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' delete: responses: "200": description: A successful response. schema: type: object default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - FakeServer operationId: FakeServer_DeleteOrder parameters: - required: true type: string name: orderID in: path /version: get: operationId: Gateway_GetVersion responses: "200": description: A successful response. schema: $ref: '#/definitions/v1GetVersionResponse' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - Gateway summary: GetVersion /v1/auth/auth: post: summary: Auth operationId: UserCenter_Auth parameters: - in: body required: true schema: $ref: '#/definitions/v1AuthRequest' name: body responses: "200": description: A successful response. schema: $ref: '#/definitions/v1AuthResponse' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - UserCenter /v1/auth/authorize: post: operationId: UserCenter_Authorize parameters: - name: body in: body required: true schema: $ref: '#/definitions/v1AuthorizeRequest' responses: "200": description: A successful response. schema: $ref: '#/definitions/v1AuthorizeResponse' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' tags: - UserCenter summary: Authorize definitions: v1OrderReply: properties: createdAt: type: string format: date-time x-order: !!float 4 updatedAt: x-order: !!float 5 type: string format: date-time orderID: type: string x-order: !!float 0 customer: type: string x-order: !!float 1 product: x-order: !!float 2 type: string quantity: x-order: !!float 3 type: string format: int64 type: object v1OwnerReference: type: object title: |- OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field. +structType=atomic properties: apiVersion: x-order: !!float 0 description: API version of the referent. type: string kind: type: string title: |- Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds x-order: !!float 1 name: title: |- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names x-order: !!float 2 type: string uid: type: string title: |- UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids x-order: !!float 3 controller: title: |- If true, this reference points to the managing controller. +optional x-order: !!float 4 type: boolean blockOwnerDeletion: type: boolean title: |- If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. +optional x-order: !!float 5 metav1Duration: type: object properties: duration: type: string format: int64 x-order: !!float 0 description: |- 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. v1ListUserResponse: type: object properties: totalCount: type: string format: int64 Users: type: array items: $ref: '#/definitions/v1UserReply' v1LoginReply: type: object properties: access_token: type: string expiresAt: type: string format: int64 refresh_token: type: string type: type: string v1beta1MinerSpec: description: MinerSpec defines the desired state of Miner. type: object properties: podDeletionTimeout: title: |- PodDeletionTimeout defines how long the controller will attempt to delete the Pod that the Machine hosts after the Machine is marked for deletion. A duration of 0 will retry deletion indefinitely. Defaults to 10 seconds. +optional x-order: !!float 5 $ref: '#/definitions/metav1Duration' metadata: title: |- ObjectMeta will autopopulate the Pod created. Use this to indicate what labels, annotations, name prefix, etc., should be used when creating the Pod. +optional x-order: !!float 0 $ref: '#/definitions/appsv1beta1ObjectMeta' displayName: type: string title: |- The display name of the miner. +optional x-order: !!float 1 minerType: type: string title: |- Miner machine configuration. +optional x-order: !!float 2 chainName: type: string title: +optional x-order: !!float 3 restartPolicy: type: string title: |- Restart policy for the miner. One of Always, OnFailure, Never. Default to Always. +optional x-order: !!float 4 appsv1beta1MinerSet: description: MinerSet ensures that a specified number of miners replicas are running at any given time. type: object properties: spec: title: |- Spec defines the specification of the desired behavior of the MinerSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +optional x-order: !!float 1 $ref: '#/definitions/v1beta1MinerSetSpec' status: title: |- Status is the most recently observed status of the MinerSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +optional x-order: !!float 2 $ref: '#/definitions/v1beta1MinerSetStatus' metadata: $ref: '#/definitions/metav1ObjectMeta' title: |- If the Labels of a MinerSet are empty, they are defaulted to be the same as the Miner(s) that the MinerSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional x-order: !!float 0 googlerpcStatus: type: object properties: message: type: string code: type: integer format: int32 details: type: array items: $ref: '#/definitions/protobufAny' v1AuthorizeRequest: type: object properties: act: type: string obj: type: string sub: type: string v1IdempotentResponse: type: object properties: token: type: string x-order: !!float 0 v1LabelSelectorRequirement: description: |- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. type: object properties: key: description: key is the label key that the selector applies to. type: string x-order: !!float 0 operator: description: |- operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. type: string x-order: !!float 1 values: type: array title: |- values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. +optional items: type: string x-order: !!float 2 v1Time: description: |- 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 type: object properties: seconds: format: int64 x-order: !!float 0 description: |- 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. type: string nanos: description: |- 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. type: integer format: int32 x-order: !!float 1 appsv1beta1Miner: description: Miner is the Schema for the miners API. type: object properties: metadata: title: |- Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional x-order: !!float 0 $ref: '#/definitions/metav1ObjectMeta' spec: x-order: !!float 1 $ref: '#/definitions/v1beta1MinerSpec' title: |- Specification of the desired behavior of the miner. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +optional status: title: |- Most recently observed status of the miner. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +optional x-order: !!float 2 $ref: '#/definitions/v1beta1MinerStatus' protobufAny: additionalProperties: false description: |- `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } type: object properties: '@type': type: string description: |- A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. v1beta1MinerAddress: description: MinerAddress contains information for the miner's address. type: object properties: type: description: Miner address type, one of Hostname, ExternalIP or InternalIP. type: string x-order: !!float 0 address: description: The machine address. type: string x-order: !!float 1 v1CreateOrderRequest: type: object properties: customer: type: string x-order: !!float 0 product: type: string x-order: !!float 1 quantity: type: string format: int64 x-order: !!float 2 v1CreateOrderResponse: type: object properties: orderID: type: string x-order: !!float 0 v1ListOrderResponse: type: object properties: totalCount: type: string format: int64 x-order: !!float 0 Orders: type: array items: $ref: '#/definitions/v1OrderReply' x-order: !!float 1 v1beta1MinerSetStatus: description: MinerSetStatus represents the current status of a MinerSet. type: object properties: failureReason: description: |- 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 type: string x-order: !!float 5 failureMessage: x-order: !!float 6 description: |- 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 type: string conditions: type: array title: |- Represents the latest available observations of a miner set's current state. +optional +patchMergeKey=type +patchStrategy=merge items: $ref: '#/definitions/appsv1beta1Condition' x-order: !!float 7 replicas: description: Replicas is the most recently observed number of replicas. type: integer format: int32 x-order: !!float 0 fullyLabeledReplicas: format: int32 title: |- The number of miners that have labels matching the labels of the miner template of the minerset. +optional x-order: !!float 1 type: integer readyReplicas: type: integer format: int32 title: |- readyReplicas is the number of miners targeted by this MinerSet with a Ready Condition. +optional x-order: !!float 2 availableReplicas: type: integer format: int32 title: |- The number of available replicas (ready for at least minReadySeconds) for this minerset. +optional x-order: !!float 3 observedGeneration: format: int64 title: |- ObservedGeneration reflects the generation of the most recently observed MinerSet. +optional x-order: !!float 4 type: string v1beta1MinerStatus: description: MinerStatus defines the observed state of Miner. type: object properties: observedGeneration: format: int64 title: |- ObservedGeneration is the latest generation observed by the controller. +optional x-order: !!float 6 type: string conditions: title: |- Conditions defines the current state of the Miner +optional items: $ref: '#/definitions/appsv1beta1Condition' x-order: !!float 7 type: array podRef: title: |- PodRef will point to the corresponding Pod if it exists. +optional x-order: !!float 0 $ref: '#/definitions/v1beta1ObjectReference' lastUpdated: x-order: !!float 1 $ref: '#/definitions/v1Time' title: |- LastUpdated identifies when this status was last observed. +optional failureReason: description: |- FailureReason will be set in the event that there is a terminal problem reconciling the Miner and will contain a succinct value suitable for miner interpretation. 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 Miner'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 Miners can be added as events to the Miner object and/or logged in the controller's output. +optional type: string x-order: !!float 2 failureMessage: description: |- FailureMessage will be set in the event that there is a terminal problem reconciling the Miner 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 Miner'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 Miners can be added as events to the Miner object and/or logged in the controller's output. +optional type: string x-order: !!float 3 addresses: type: array title: |- Addresses is a list of addresses assigned to the miner. Queried from kind cluster, if available. +optional +patchMergeKey=type +patchStrategy=merge items: $ref: '#/definitions/v1beta1MinerAddress' x-order: !!float 4 phase: type: string title: |- Phase represents the current phase of miner actuation. One of: Failed, Provisioning, Provisioned, Running, Deleting This field is maintained by miner controller. +optional x-order: !!float 5 v1CreateSecretRequest: type: object properties: description: type: string expires: type: string format: int64 name: type: string v1SecretReply: type: object properties: name: type: string secretID: type: string updatedAt: type: string format: date-time userID: type: string description: type: string expires: format: int64 type: string secretKey: type: string status: type: integer format: int32 createdAt: type: string format: date-time v1FieldsV1: description: |- 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:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where 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 type: object properties: Raw: description: Raw is the underlying serialization of this object. type: string format: byte x-order: !!float 0 v1ListSecretResponse: type: object properties: totalCount: format: int64 type: string Secrets: items: $ref: '#/definitions/v1SecretReply' type: array v1AuthenticateResponse: properties: userID: type: string type: object v1GetResponse: type: object properties: value: x-order: !!float 0 $ref: '#/definitions/protobufAny' expire: type: string x-order: !!float 1 v1LoginRequest: type: object properties: password: type: string username: type: string metav1ObjectMeta: description: |- ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. type: object properties: resourceVersion: x-order: !!float 5 description: |- 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 type: string creationTimestamp: description: |- CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional x-order: !!float 7 $ref: '#/definitions/v1Time' namespace: description: |- 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 type: string x-order: !!float 2 deletionGracePeriodSeconds: type: string format: int64 title: |- Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. +optional x-order: !!float 9 managedFields: description: |- 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 type: array items: $ref: '#/definitions/v1ManagedFieldsEntry' x-order: !!float 14 selfLink: type: string title: |- Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. +optional x-order: !!float 3 annotations: type: object title: |- Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations +optional additionalProperties: type: string x-order: !!float 11 deletionTimestamp: description: |- DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional x-order: !!float 8 $ref: '#/definitions/v1Time' labels: additionalProperties: type: string x-order: !!float 10 type: object title: |- Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels +optional ownerReferences: items: $ref: '#/definitions/v1OwnerReference' x-order: !!float 12 type: array title: |- List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. +optional +patchMergeKey=uid +patchStrategy=merge finalizers: type: array title: |- Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. +optional +patchStrategy=merge items: type: string x-order: !!float 13 name: x-order: !!float 0 type: string title: |- Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names +optional generateName: description: |- 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 type: string x-order: !!float 1 uid: description: |- 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 type: string x-order: !!float 4 generation: type: string format: int64 title: |- A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. +optional x-order: !!float 6 v1AuthenticateRequest: type: object properties: token: type: string v1LogoutRequest: type: object v1MinerTemplate: type: object properties: minerType: type: string x-order: !!float 0 chainName: type: string x-order: !!float 1 dataDir: type: string x-order: !!float 2 v1LabelSelector: title: |- A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. +structType=atomic properties: matchLabels: type: object title: |- matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. +optional additionalProperties: type: string x-order: !!float 0 matchExpressions: type: array title: |- matchExpressions is a list of label selector requirements. The requirements are ANDed. +optional items: $ref: '#/definitions/v1LabelSelectorRequirement' x-order: !!float 1 type: object v1ListMinerResponse: type: object properties: totalCount: type: string format: int64 x-order: !!float 0 Miners: type: array items: $ref: '#/definitions/gatewayv1Miner' x-order: !!float 1 v1AuthResponse: type: object properties: allowed: type: boolean userID: type: string v1GetVersionResponse: type: object properties: GitCommit: x-order: !!float 1 type: string GitTreeState: type: string x-order: !!float 2 BuildDate: type: string x-order: !!float 3 GoVersion: type: string x-order: !!float 4 Compiler: type: string x-order: !!float 5 Platform: type: string x-order: !!float 6 GitVersion: type: string x-order: !!float 0 v1beta1MinerTemplateSpec: description: MinerTemplateSpec describes the data needed to create a Miner from a template. type: object properties: metadata: title: |- Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional x-order: !!float 0 $ref: '#/definitions/appsv1beta1ObjectMeta' spec: $ref: '#/definitions/v1beta1MinerSpec' title: |- Specification of the desired behavior of the miner. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +optional x-order: !!float 1 v1AuthRequest: type: object properties: obj: type: string token: type: string act: type: string gatewayv1Miner: type: object properties: updatedAt: x-order: !!float 7 type: string format: date-time name: type: string x-order: !!float 0 displayName: type: string x-order: !!float 1 minerType: type: string x-order: !!float 2 chainName: type: string x-order: !!float 3 dataDir: type: string x-order: !!float 4 status: type: string x-order: !!float 5 createdAt: type: string format: date-time x-order: !!float 6 v1AuthorizeResponse: properties: allowed: type: boolean type: object v1CreateUserRequest: type: object properties: email: type: string nickname: type: string password: type: string phone: type: string username: type: string v1beta1MinerSetSpec: type: object properties: minReadySeconds: type: integer format: int32 title: |- Minimum number of seconds for which a newly created miner should be ready without any of its component crashing, for it to be considered available. Defaults to 0 (miner will be considered available as soon as it is ready) +optional x-order: !!float 5 progressDeadlineSeconds: description: |- 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. type: integer format: int32 x-order: !!float 6 replicas: format: int32 title: |- Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller +optional x-order: !!float 0 type: integer selector: title: |- Selector is a label query over miners that should match the replica count. Label keys and values that must match in order to be controlled by this MinerSet. It must match the miner template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors x-order: !!float 1 $ref: '#/definitions/v1LabelSelector' template: title: |- Template is the object that describes the miner that will be created if insufficient replicas are detected. +optional x-order: !!float 2 $ref: '#/definitions/v1beta1MinerTemplateSpec' displayName: description: The display name of the minerset. type: string x-order: !!float 3 deletePolicy: type: string title: |- DeletePolicy defines the policy used to identify miners to delete when downscaling. Defaults to "Random". Valid values are "Random, "Newest", "Oldest" +kubebuilder:validation:Enum=Random;Newest;Oldest +optional x-order: !!float 4 description: MinerSetSpec defines the desired state of MinerSet. gatewayv1MinerSet: type: object properties: name: type: string x-order: !!float 0 replicas: type: integer format: int32 x-order: !!float 1 displayName: type: string x-order: !!float 2 deletePolicy: type: string x-order: !!float 3 MinerTemplate: x-order: !!float 4 $ref: '#/definitions/v1MinerTemplate' createdAt: format: date-time x-order: !!float 5 type: string updatedAt: format: date-time x-order: !!float 6 type: string v1UserReply: type: object properties: nickname: type: string password: type: string username: type: string createdAt: type: string format: date-time email: type: string phone: type: string secrets: type: string format: int64 updatedAt: type: string format: date-time userID: type: string v1beta1ObjectReference: type: object properties: resourceVersion: type: string title: |- Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +optional x-order: !!float 5 fieldPath: title: |- If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future. +optional x-order: !!float 6 type: string kind: title: |- Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +optional x-order: !!float 0 type: string namespace: title: |- Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ +optional x-order: !!float 1 type: string name: type: string title: |- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +optional x-order: !!float 2 uid: type: string title: |- UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids +optional x-order: !!float 3 apiVersion: type: string title: |- API version of the referent. +optional x-order: !!float 4 appsv1beta1Condition: description: Condition defines an observation of a cloud miner resource operational state. type: object properties: reason: type: string title: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may not be empty. +optional x-order: !!float 4 message: type: string title: |- A human readable message indicating details about the transition. This field may be empty. +optional x-order: !!float 5 type: description: |- 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. type: string x-order: !!float 0 status: type: string x-order: !!float 1 description: Status of the condition, one of True, False, Unknown. severity: type: string title: |- Severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. +optional x-order: !!float 2 lastTransitionTime: x-order: !!float 3 $ref: '#/definitions/v1Time' description: |- Last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. appsv1beta1ObjectMeta: description: |- 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. type: object properties: labels: title: |- Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels +optional additionalProperties: type: string x-order: !!float 0 type: object annotations: type: object title: |- Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations +optional additionalProperties: type: string x-order: !!float 1 v1GetSecretResponse: type: object properties: userID: x-order: !!float 0 type: string expires: type: string format: int64 x-order: !!float 4 status: x-order: !!float 5 type: integer format: int32 createdAt: x-order: !!float 7 type: string format: date-time updatedAt: type: string format: date-time x-order: !!float 8 name: type: string x-order: !!float 1 secretID: type: string x-order: !!float 2 secretKey: type: string x-order: !!float 3 description: type: string x-order: !!float 6 v1ListMinerSetResponse: type: object properties: totalCount: format: int64 x-order: !!float 0 type: string MinerSets: type: array items: $ref: '#/definitions/gatewayv1MinerSet' x-order: !!float 1 v1ManagedFieldsEntry: properties: subresource: description: |- 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. type: string x-order: !!float 6 manager: x-order: !!float 0 description: Manager is an identifier of the workflow managing these fields. type: string operation: description: |- Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'. type: string x-order: !!float 1 apiVersion: description: |- 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. type: string x-order: !!float 2 time: title: |- Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over. +optional x-order: !!float 3 $ref: '#/definitions/v1Time' fieldsType: type: string title: |- FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1" x-order: !!float 4 fieldsV1: $ref: '#/definitions/v1FieldsV1' title: |- FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. +optional x-order: !!float 5 description: |- ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. type: object v1RefreshTokenRequest: type: object tags: - name: UserCenter - name: FakeServer - name: Gateway - name: CacheServer