Remove bogus API documentation.

pull/6/head
Brian Grant 2014-11-06 00:27:09 +00:00
parent e88e490614
commit bb7ac11eaa
6 changed files with 11 additions and 1295 deletions

View File

@ -1,54 +0,0 @@
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"required": false,
"description": "A replicationController resource. A replicationController helps to create and manage a set of pods. It acts as a factory to create new pods based on a template. It ensures that there are a specific number of pods running. If fewer pods are running than `replicas` then the needed pods are generated using `podTemplate`. If more pods are running than `replicas`, then excess pods are deleted.",
"properties": {
"kind": {
"type": "string",
"required": false
},
"id": {
"type": "string",
"required": false
},
"namespace": {
"type": "string",
"required": false
},
"creationTimestamp": {
"type": "string",
"required": false
},
"selfLink": {
"type": "string",
"required": false
},
"desiredState": {
"type": "object",
"required": false,
"description": "The desired configuration of the replicationController",
"properties": {
"replicas": {
"type": "number",
"required": false,
"description": "Number of pods desired in the set"
},
"replicaSelector": {
"type": "object",
"required": false,
"description": "Required labels used to identify pods in the set"
},
"podTemplate": {
"type": "object",
"required": false,
"description": "Template from which to create new pods, as necessary. Identical to pod schema."
}
}
},
"labels": {
"type": "object",
"required": false
}
}
}

View File

@ -1,127 +0,0 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"description": "Manifest describing group of [Docker containers](http://docker.io); also used by [Google Cloud Platform's container-vm images](https://developers.google.com/compute/docs/containers).",
"properties": {
"version": {
"type": "string",
"description": "The version of the manifest.",
"enum": [
"v1beta1"
]
},
"containers": {
"type": "array",
"description": "The list of containers to launch.",
"items": {
"type": "object",
"required": [
"name",
"image"
],
"properties": {
"name": {
"type": "string",
"description" : "A symbolic name used to create and track the container. Must be an RFC1035 compatible value (a single segment of a DNS name). All containers must have unique names."
},
"image": {
"type": "string",
"description" : "The container image to run."
},
"command": {
"type": "array",
"description" : "The command line to run. If this is omitted, the container is assumed to have a command embedded in it.",
"items": {
"type": "string"
}
},
"workingDir": {
"type": "string",
"description" : "The initial working directory for the command. Default is the containers embedded working directory or else the Docker default."
},
"volumeMounts": {
"type": "array",
"description" : "Data volumes to expose into the container.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description" : "The name of the volume to mount. This must match the name of a volume defined in volumes[]."
},
"mountPath": {
"type": "string",
"description" : "The path at which to mount the volume inside the container. This must be an absolute path and no longer than 512 characters."
},
"readOnly": {
"type": "boolean",
"description" : "Whether this volume should be read-only. Default is false (read-write)."
}
}
}
},
"ports": {
"type": "array",
"description" : "Ports to expose from the container. All of these are exposed out through the public interface of the VM.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description" : "A symbolic name used to create and track the port. Must be an RFC1035 compatible value (a single segment of a DNS name)."
},
"containerPort": {
"type": "integer",
"description" : "The port on which the container is listening."
},
"hostPort": {
"type": "integer",
"description" : "The port on the host which maps to the containerPort. Default is auto-allocated."
},
"protocol": {
"type": "string",
"description" : "The protocol for this port. Valid options are TCP and UDP. Default is TCP."
}
}
}
},
"env": {
"type": "array",
"description" : "Environment variables to set before the container runs.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description" : "The name of the environment variable."
},
"value": {
"type": "string",
"description" : "The value of the environment variable."
}
}
}
}
}
}
},
"volumes": {
"type": "array",
"description" : "A list of volumes to share between containers.",
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description" : "The name of the volume. Must be an RFC1035 compatible value (a single segment of a DNS name). All volumes must have unique names. These are referenced by `containers[].volumeMounts[].name`.",
"pattern": "^[a-z]([-a-z0-9]*[a-z0-9])*"
}
}
}
}
}
}

View File

@ -1,91 +0,0 @@
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"required": false,
"description": "Pod resource. A pod corresponds to a co-located group of [Docker containers](http://docker.io).",
"properties": {
"kind": {
"type": "string",
"required": false
},
"id": {
"type": "string",
"required": false
},
"namespace": {
"type": "string",
"required": false
},
"creationTimestamp": {
"type": "string",
"required": false
},
"selfLink": {
"type": "string",
"required": false
},
"desiredState": {
"type": "object",
"required": false,
"description": "The desired configuration of the pod",
"properties": {
"manifest": {
"type": "object",
"required": false,
"description": "Manifest describing group of [Docker containers](http://docker.io); compatible with format used by [Google Cloud Platform's container-vm images](https://developers.google.com/compute/docs/containers)"
},
"status": {
"type": "string",
"required": false,
"description": ""
},
"host": {
"type": "string",
"required": false,
"description": ""
},
"hostIP": {
"type": "string",
"required": false,
"description": ""
},
"info": {
"type": "object",
"required": false,
"description": ""
}
}
},
"currentState": {
"type": "object",
"required": false,
"description": "The current configuration and status of the pod. Fields in common with desiredState have the same meaning.",
"properties": {
"manifest": {
"type": "object",
"required": false
},
"status": {
"type": "string",
"required": false
},
"host": {
"type": "string",
"required": false
},
"hostIP": {
"type": "string",
"required": false
},
"info": {
"type": "object",
"required": false
}
}
},
"labels": {
"type": "object",
"required": false
}
}
}

View File

@ -1,48 +0,0 @@
{
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"required": false,
"description": "A service resource.",
"properties": {
"kind": {
"type": "string",
"required": false
},
"id": {
"type": "string",
"required": false
},
"namespace": {
"type": "string",
"required": false
},
"creationTimestamp": {
"type": "string",
"required": false
},
"selfLink": {
"type": "string",
"required": false
},
"name": {
"type": "string",
"required": false
},
"port": {
"type": "number",
"required": false
},
"containerPort": {
"type": "string",
"required": false
},
"labels": {
"type": "object",
"required": false
},
"selector": {
"type": "object",
"required": false
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -4,182 +4,7 @@ title: Kubernetes
version: v1beta1
mediaType: application/json
documentation:
- title: Overview
- title: OBSOLETE
content: |
The Kubernetes API currently manages 3 main resources: `pods`,
`replicationControllers`, and `services`. Pods correspond to
colocated groups of [Docker containers](http://docker.io) with
shared volumes, as supported by [Google Cloud Platform's
container-vm
images](https://developers.google.com/compute/docs/containers).
Singleton pods can be created directly via the `/pods`
endpoint. Sets of pods may created, maintained, and scaled using
replicationControllers. Services create load-balanced targets
for sets of pods.
- title: Resource identifiers
content: |
Each resource has a string `id` and list of key-value
`labels`. The `id` is generated by the system and is guaranteed
to be unique in space and time across all resources. `labels`
is a map of string (key) to string (value). Each resource may
have at most one label with a particular key. Individual labels
are used to specify identifying metadata that can be used to
define sets of resources by specifying required labels. Examples
of typical pod label keys include `stage`, `service`, `name`,
`tier`, `partition`, and `track`, but you are free to develop
your own conventions.
- title: Creation semantics
content: |
Creation is currently not idempotent. We plan to add a
modification token to each resource. A unique value for the token
should be provided by the user during creation. If the user
specifies a duplicate token at creation time, the system should
return an error with a pointer to the existing resource with that
token. In this way a user can deterministically recover from a
dropped connection during a resource creation request.
- title: Update semantics
content: |
Custom verbs are minimized and are used only for 'edge triggered'
actions such as a reboot. Resource descriptions are generally set
up with `desiredState` for the user provided parameters and
`currentState` for the actual system state. While consistent
terminology is used across these two stanzas they do not match
member for member.
When a new version of a resource is PUT the `desiredState` is
updated and available immediately. Over time the system will work
to bring the `currentState` into line with the `desiredState`. The
system will drive toward the most recent `desiredState` regardless
of previous versions of that stanza. In other words, if a value
is changed from 2 to 5 in one PUT and then back down to 3 in
another PUT the system isn't required to 'touch base' at 5 before
making 3 the `currentState`.
When doing an update, we assume that the entire `desiredState`
stanza is specified. If a field is omitted it is assumed that the
user is looking to delete that field. It is viable for a user to
GET the resource, modify what they like in the `desiredState` or
labels stanzas and then PUT it back. If the `currentState` is
included in the PUT it will be silently ignored.
While currently unspecified, it is intended that concurrent
modification should be accomplished with optimistic locking of
resources. We plan to add a modification token to each resource. If
this is included with the PUT operation the system will verify
that there haven't been other successful mutations to the
resource during a read/modify/write cycle. The correct client
action at this point is to GET the resource again, apply the
changes afresh and try submitting again.
Note that updates currently only work for replicationControllers
and services, but not for pods. Label updates have not yet been
implemented, either.
/pods:
get:
description: List all pods on this cluster
responses:
200:
body:
example: !include examples/pod-list.json
post:
description: Create a new pod. currentState is ignored if present.
body:
schema: !include doc/pod-schema.json
example: !include examples/pod.json
/{podId}:
get:
description: Get a specific pod
responses:
200:
body:
example: !include examples/pod.json
put:
description: Update a pod
body:
schema: !include doc/pod-schema.json
example: !include examples/pod.json
delete:
description: Delete a specific pod
responses:
200:
body:
example: |
{
"success": true
}
/replicationControllers:
get:
description: List all replicationControllers on this cluster
responses:
200:
body:
example: !include examples/controller-list.json
post:
description: Create a new controller. currentState is ignored if present.
body:
schema: !include doc/controller-schema.json
example: !include examples/controller.json
/{controllerId}:
get:
description: Get a specific controller
responses:
200:
body:
example: !include examples/controller.json
put:
description: Update a controller
body:
schema: !include doc/controller-schema.json
example: !include examples/controller.json
delete:
description: Delete a specific controller
responses:
200:
body:
example: |
{
"success": true
}
/services:
get:
description: List all services on this cluster
responses:
200:
body:
example: !include examples/service-list.json
post:
description: Create a new service
body:
schema: !include doc/service-schema.json
example: !include examples/service.json
/{serviceId}:
get:
description: Get a specific service
responses:
200:
body:
example: !include examples/service.json
put:
description: Update a service
body:
schema: !include doc/service-schema.json
example: !include examples/service.json
delete:
description: Delete a specific service
responses:
200:
body:
example: |
{
"success": true
}
We are working on new up-to-date API documentation.
Note for developers: do not regenerate kubernetes.html from this file.