mirror of https://github.com/k3s-io/k3s
340 lines
18 KiB
JSON
340 lines
18 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "Kubernetes",
|
|
"version": "v1.9.0"
|
|
},
|
|
"paths": {},
|
|
"definitions": {
|
|
"io.k8s.api.core.v1.Container": {
|
|
"description": "A single application container that you want to run within a pod.",
|
|
"required": [
|
|
"name",
|
|
"image"
|
|
],
|
|
"properties": {
|
|
"image": {
|
|
"description": "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.",
|
|
"type": "string"
|
|
},
|
|
"ports": {
|
|
"description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/io.k8s.api.core.v1.ContainerPort"
|
|
},
|
|
"x-kubernetes-patch-merge-key": "containerPort,protocol",
|
|
"x-kubernetes-patch-strategy": "merge"
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.api.core.v1.ContainerPort": {
|
|
"description": "ContainerPort represents a network port in a single container.",
|
|
"required": [
|
|
"containerPort"
|
|
],
|
|
"properties": {
|
|
"containerPort": {
|
|
"description": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.",
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"hostIP": {
|
|
"description": "What host IP to bind the external port to.",
|
|
"type": "string"
|
|
},
|
|
"hostPort": {
|
|
"description": "Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.",
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"name": {
|
|
"description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.",
|
|
"type": "string"
|
|
},
|
|
"protocol": {
|
|
"description": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.api.apps.v1.Deployment": {
|
|
"description": "Deployment enables declarative updates for Pods and ReplicaSets.",
|
|
"properties": {
|
|
"apiVersion": {
|
|
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"description": "Standard object metadata.",
|
|
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
|
|
},
|
|
"spec": {
|
|
"description": "Specification of the desired behavior of the Deployment.",
|
|
"$ref": "#/definitions/io.k8s.api.apps.v1.DeploymentSpec"
|
|
}
|
|
},
|
|
"x-kubernetes-group-version-kind": [
|
|
{
|
|
"group": "apps",
|
|
"kind": "Deployment",
|
|
"version": "v1"
|
|
}
|
|
]
|
|
},
|
|
"io.k8s.api.apps.v1.DeploymentSpec": {
|
|
"description": "DeploymentSpec is the specification of the desired behavior of the Deployment.",
|
|
"required": [
|
|
"selector",
|
|
"template"
|
|
],
|
|
"properties": {
|
|
"minReadySeconds": {
|
|
"description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"paused": {
|
|
"description": "Indicates that the deployment is paused.",
|
|
"type": "boolean"
|
|
},
|
|
"progressDeadlineSeconds": {
|
|
"description": "The maximum time in seconds for a deployment 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"
|
|
},
|
|
"replicas": {
|
|
"description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"revisionHistoryLimit": {
|
|
"description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.",
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"selector": {
|
|
"description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.",
|
|
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
|
|
},
|
|
"strategy": {
|
|
"description": "The deployment strategy to use to replace existing pods with new ones.",
|
|
"x-kubernetes-patch-strategy": "retainKeys",
|
|
"$ref": "#/definitions/io.k8s.api.apps.v1.DeploymentStrategy"
|
|
},
|
|
"template": {
|
|
"description": "Template describes the pods that will be created.",
|
|
"$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec"
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.api.apps.v1.DeploymentStrategy": {
|
|
"description": "DeploymentStrategy describes how to replace existing pods with new ones.",
|
|
"properties": {
|
|
"rollingUpdate": {
|
|
"description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.",
|
|
"$ref": "#/definitions/io.k8s.api.apps.v1.RollingUpdateDeployment"
|
|
},
|
|
"type": {
|
|
"description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.api.apps.v1.RollingUpdateDeployment": {
|
|
"description": "Spec to control the desired behavior of rolling update.",
|
|
"properties": {
|
|
"maxSurge": {
|
|
"description": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.",
|
|
"$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString"
|
|
},
|
|
"maxUnavailable": {
|
|
"description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
|
|
"$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString"
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.apimachinery.pkg.util.intstr.IntOrString": {
|
|
"description": "IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.",
|
|
"type": "string",
|
|
"format": "int-or-string"
|
|
},
|
|
"io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": {
|
|
"description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.",
|
|
"properties": {
|
|
"annotations": {
|
|
"description": "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",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"labels": {
|
|
"description": "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",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"name": {
|
|
"description": "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: http://kubernetes.io/docs/user-guide/identifiers#names",
|
|
"type": "string"
|
|
},
|
|
"namespace": {
|
|
"description": "Namespace defines the space within 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.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.api.core.v1.PodTemplateSpec": {
|
|
"description": "PodTemplateSpec describes the data a pod should have when created from a template",
|
|
"properties": {
|
|
"metadata": {
|
|
"description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
|
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
|
|
},
|
|
"spec": {
|
|
"description": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
|
|
"$ref": "#/definitions/io.k8s.api.core.v1.PodSpec"
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.api.core.v1.PodSpec": {
|
|
"description": "PodSpec is a description of a pod.",
|
|
"required": [
|
|
"containers"
|
|
],
|
|
"properties": {
|
|
"containers": {
|
|
"description": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/io.k8s.api.core.v1.Container"
|
|
},
|
|
"x-kubernetes-patch-merge-key": "name",
|
|
"x-kubernetes-patch-strategy": "merge"
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.api.apps.v1.ReplicaSet": {
|
|
"description": "ReplicaSet ensures that a specified number of pod replicas are running at any given time.",
|
|
"properties": {
|
|
"apiVersion": {
|
|
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"description": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
|
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
|
|
},
|
|
"spec": {
|
|
"description": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
|
|
"$ref": "#/definitions/io.k8s.api.apps.v1.ReplicaSetSpec"
|
|
}
|
|
},
|
|
"x-kubernetes-group-version-kind": [
|
|
{
|
|
"group": "apps",
|
|
"kind": "ReplicaSet",
|
|
"version": "v1"
|
|
}
|
|
]
|
|
},
|
|
"io.k8s.api.apps.v1.ReplicaSetSpec": {
|
|
"description": "ReplicaSetSpec is the specification of a ReplicaSet.",
|
|
"required": [
|
|
"selector"
|
|
],
|
|
"properties": {
|
|
"minReadySeconds": {
|
|
"description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"replicas": {
|
|
"description": "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",
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"selector": {
|
|
"description": "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
|
|
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"
|
|
},
|
|
"template": {
|
|
"description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
|
|
"$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec"
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector": {
|
|
"description": "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.",
|
|
"properties": {
|
|
"matchExpressions": {
|
|
"description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement"
|
|
}
|
|
},
|
|
"matchLabels": {
|
|
"description": "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.",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement": {
|
|
"description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
|
|
"required": [
|
|
"key",
|
|
"operator"
|
|
],
|
|
"properties": {
|
|
"key": {
|
|
"description": "key is the label key that the selector applies to.",
|
|
"type": "string",
|
|
"x-kubernetes-patch-merge-key": "key",
|
|
"x-kubernetes-patch-strategy": "merge"
|
|
},
|
|
"operator": {
|
|
"description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
|
|
"type": "string"
|
|
},
|
|
"values": {
|
|
"description": "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.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"BearerToken": {
|
|
"description": "Bearer Token authentication",
|
|
"type": "apiKey",
|
|
"name": "authorization",
|
|
"in": "header"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"BearerToken": []
|
|
}
|
|
]
|
|
} |