mirror of https://github.com/k3s-io/k3s
Adding update-federation-generated-swagger-docs to generate comment funcs for federation gvs
parent
1dfd6ab0c1
commit
a954ff18e6
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE
|
||||
var map_Cluster = map[string]string{
|
||||
"": "Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.",
|
||||
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||
"spec": "Spec defines the behavior of the Cluster.",
|
||||
"status": "Status describes the current status of a Cluster",
|
||||
}
|
||||
|
||||
func (Cluster) SwaggerDoc() map[string]string {
|
||||
return map_Cluster
|
||||
}
|
||||
|
||||
var map_ClusterCondition = map[string]string{
|
||||
"": "ClusterCondition describes current state of a cluster.",
|
||||
"type": "Type of cluster condition, Complete or Failed.",
|
||||
"status": "Status of the condition, one of True, False, Unknown.",
|
||||
"lastProbeTime": "Last time the condition was checked.",
|
||||
"lastTransitionTime": "Last time the condition transit from one status to another.",
|
||||
"reason": "(brief) reason for the condition's last transition.",
|
||||
"message": "Human readable message indicating details about last transition.",
|
||||
}
|
||||
|
||||
func (ClusterCondition) SwaggerDoc() map[string]string {
|
||||
return map_ClusterCondition
|
||||
}
|
||||
|
||||
var map_ClusterList = map[string]string{
|
||||
"": "A list of all the kubernetes clusters registered to the federation",
|
||||
"metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds",
|
||||
"items": "List of Cluster objects.",
|
||||
}
|
||||
|
||||
func (ClusterList) SwaggerDoc() map[string]string {
|
||||
return map_ClusterList
|
||||
}
|
||||
|
||||
var map_ClusterSpec = map[string]string{
|
||||
"": "ClusterSpec describes the attributes of a kubernetes cluster.",
|
||||
"serverAddressByClientCIDRs": "A map of client CIDR to server address. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR.",
|
||||
"secretRef": "Name of the secret containing kubeconfig to access this cluster. The secret is read from the kubernetes cluster that is hosting federation control plane. Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key \"kubeconfig\". This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets. This can be left empty if the cluster allows insecure access.",
|
||||
}
|
||||
|
||||
func (ClusterSpec) SwaggerDoc() map[string]string {
|
||||
return map_ClusterSpec
|
||||
}
|
||||
|
||||
var map_ClusterStatus = map[string]string{
|
||||
"": "ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.",
|
||||
"conditions": "Conditions is an array of current cluster conditions.",
|
||||
"zones": "Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. These will always be in the same region.",
|
||||
"region": "Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.",
|
||||
}
|
||||
|
||||
func (ClusterStatus) SwaggerDoc() map[string]string {
|
||||
return map_ClusterStatus
|
||||
}
|
||||
|
||||
var map_ServerAddressByClientCIDR = map[string]string{
|
||||
"": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.",
|
||||
"clientCIDR": "The CIDR with which clients can match their IP to figure out the server address that they should use.",
|
||||
"serverAddress": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.",
|
||||
}
|
||||
|
||||
func (ServerAddressByClientCIDR) SwaggerDoc() map[string]string {
|
||||
return map_ServerAddressByClientCIDR
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
|
@ -3,6 +3,10 @@
|
|||
"apiVersion": "",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/api",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/api",
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
"apiVersion": "",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/apis",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/apis",
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
"apiVersion": "",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/apis/extensions",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/apis/extensions",
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
"apiVersion": "extensions/v1beta1",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/apis/extensions/v1beta1",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses",
|
||||
|
@ -2225,6 +2229,10 @@
|
|||
"type": "string"
|
||||
},
|
||||
"description": "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."
|
||||
},
|
||||
"clusterName": {
|
||||
"type": "string",
|
||||
"description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2357,7 +2365,7 @@
|
|||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "Path is a extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend."
|
||||
"description": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend."
|
||||
},
|
||||
"backend": {
|
||||
"$ref": "v1beta1.IngressBackend",
|
||||
|
@ -2846,6 +2854,14 @@
|
|||
"vsphereVolume": {
|
||||
"$ref": "v1.VsphereVirtualDiskVolumeSource",
|
||||
"description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine"
|
||||
},
|
||||
"quobyte": {
|
||||
"$ref": "v1.QuobyteVolumeSource",
|
||||
"description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime"
|
||||
},
|
||||
"azureDisk": {
|
||||
"$ref": "v1.AzureDiskVolumeSource",
|
||||
"description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2959,6 +2975,11 @@
|
|||
"$ref": "v1.KeyToPath"
|
||||
},
|
||||
"description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'."
|
||||
},
|
||||
"defaultMode": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2977,6 +2998,11 @@
|
|||
"path": {
|
||||
"type": "string",
|
||||
"description": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'."
|
||||
},
|
||||
"mode": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3241,6 +3267,11 @@
|
|||
"$ref": "v1.DownwardAPIVolumeFile"
|
||||
},
|
||||
"description": "Items is a list of downward API volume file"
|
||||
},
|
||||
"defaultMode": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3262,6 +3293,11 @@
|
|||
"resourceFieldRef": {
|
||||
"$ref": "v1.ResourceFieldSelector",
|
||||
"description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."
|
||||
},
|
||||
"mode": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3369,6 +3405,11 @@
|
|||
"$ref": "v1.KeyToPath"
|
||||
},
|
||||
"description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'."
|
||||
},
|
||||
"defaultMode": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3389,6 +3430,70 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"v1.QuobyteVolumeSource": {
|
||||
"id": "v1.QuobyteVolumeSource",
|
||||
"description": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.",
|
||||
"required": [
|
||||
"registry",
|
||||
"volume"
|
||||
],
|
||||
"properties": {
|
||||
"registry": {
|
||||
"type": "string",
|
||||
"description": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes"
|
||||
},
|
||||
"volume": {
|
||||
"type": "string",
|
||||
"description": "Volume is a string that references an already created Quobyte volume by name."
|
||||
},
|
||||
"readOnly": {
|
||||
"type": "boolean",
|
||||
"description": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false."
|
||||
},
|
||||
"user": {
|
||||
"type": "string",
|
||||
"description": "User to map volume access to Defaults to serivceaccount user"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "Group to map volume access to Default is no group"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.AzureDiskVolumeSource": {
|
||||
"id": "v1.AzureDiskVolumeSource",
|
||||
"description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
|
||||
"required": [
|
||||
"diskName",
|
||||
"diskURI"
|
||||
],
|
||||
"properties": {
|
||||
"diskName": {
|
||||
"type": "string",
|
||||
"description": "The Name of the data disk in the blob storage"
|
||||
},
|
||||
"diskURI": {
|
||||
"type": "string",
|
||||
"description": "The URI the data disk in the blob storage"
|
||||
},
|
||||
"cachingMode": {
|
||||
"$ref": "v1.AzureDataDiskCachingMode",
|
||||
"description": "Host Caching mode: None, Read Only, Read Write."
|
||||
},
|
||||
"fsType": {
|
||||
"type": "string",
|
||||
"description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified."
|
||||
},
|
||||
"readOnly": {
|
||||
"type": "boolean",
|
||||
"description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1.AzureDataDiskCachingMode": {
|
||||
"id": "v1.AzureDataDiskCachingMode",
|
||||
"properties": {}
|
||||
},
|
||||
"v1.Container": {
|
||||
"id": "v1.Container",
|
||||
"description": "A single application container that you want to run within a pod.",
|
||||
|
@ -3543,7 +3648,7 @@
|
|||
"properties": {
|
||||
"fieldRef": {
|
||||
"$ref": "v1.ObjectFieldSelector",
|
||||
"description": "Selects a field of the pod; only name and namespace are supported."
|
||||
"description": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP."
|
||||
},
|
||||
"resourceFieldRef": {
|
||||
"$ref": "v1.ResourceFieldSelector",
|
||||
|
@ -3909,6 +4014,11 @@
|
|||
"format": "int32",
|
||||
"description": "The number of pods that have labels matching the labels of the pod template of the replicaset."
|
||||
},
|
||||
"readyReplicas": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "The number of ready replicas for this replica set."
|
||||
},
|
||||
"observedGeneration": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
"apiVersion": "",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/apis/federation",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/apis/federation",
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
"apiVersion": "federation/v1beta1",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/apis/federation/v1beta1",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/apis/federation/v1beta1/clusters",
|
||||
|
@ -639,6 +643,7 @@
|
|||
"models": {
|
||||
"v1beta1.ClusterList": {
|
||||
"id": "v1beta1.ClusterList",
|
||||
"description": "A list of all the kubernetes clusters registered to the federation",
|
||||
"required": [
|
||||
"items"
|
||||
],
|
||||
|
@ -652,13 +657,15 @@
|
|||
"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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
|
||||
},
|
||||
"metadata": {
|
||||
"$ref": "unversioned.ListMeta"
|
||||
"$ref": "unversioned.ListMeta",
|
||||
"description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1beta1.Cluster"
|
||||
}
|
||||
},
|
||||
"description": "List of Cluster objects."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -678,6 +685,7 @@
|
|||
},
|
||||
"v1beta1.Cluster": {
|
||||
"id": "v1beta1.Cluster",
|
||||
"description": "Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
|
@ -688,13 +696,16 @@
|
|||
"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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
|
||||
},
|
||||
"metadata": {
|
||||
"$ref": "v1.ObjectMeta"
|
||||
"$ref": "v1.ObjectMeta",
|
||||
"description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"
|
||||
},
|
||||
"spec": {
|
||||
"$ref": "v1beta1.ClusterSpec"
|
||||
"$ref": "v1beta1.ClusterSpec",
|
||||
"description": "Spec defines the behavior of the Cluster."
|
||||
},
|
||||
"status": {
|
||||
"$ref": "v1beta1.ClusterStatus"
|
||||
"$ref": "v1beta1.ClusterStatus",
|
||||
"description": "Status describes the current status of a Cluster"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -767,6 +778,10 @@
|
|||
"type": "string"
|
||||
},
|
||||
"description": "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."
|
||||
},
|
||||
"clusterName": {
|
||||
"type": "string",
|
||||
"description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -804,6 +819,7 @@
|
|||
},
|
||||
"v1beta1.ClusterSpec": {
|
||||
"id": "v1beta1.ClusterSpec",
|
||||
"description": "ClusterSpec describes the attributes of a kubernetes cluster.",
|
||||
"required": [
|
||||
"serverAddressByClientCIDRs"
|
||||
],
|
||||
|
@ -812,25 +828,30 @@
|
|||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1beta1.ServerAddressByClientCIDR"
|
||||
}
|
||||
},
|
||||
"description": "A map of client CIDR to server address. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR."
|
||||
},
|
||||
"secretRef": {
|
||||
"$ref": "v1.LocalObjectReference"
|
||||
"$ref": "v1.LocalObjectReference",
|
||||
"description": "Name of the secret containing kubeconfig to access this cluster. The secret is read from the kubernetes cluster that is hosting federation control plane. Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key \"kubeconfig\". This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets. This can be left empty if the cluster allows insecure access."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1beta1.ServerAddressByClientCIDR": {
|
||||
"id": "v1beta1.ServerAddressByClientCIDR",
|
||||
"description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.",
|
||||
"required": [
|
||||
"clientCIDR",
|
||||
"serverAddress"
|
||||
],
|
||||
"properties": {
|
||||
"clientCIDR": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "The CIDR with which clients can match their IP to figure out the server address that they should use."
|
||||
},
|
||||
"serverAddress": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -846,50 +867,61 @@
|
|||
},
|
||||
"v1beta1.ClusterStatus": {
|
||||
"id": "v1beta1.ClusterStatus",
|
||||
"description": "ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.",
|
||||
"properties": {
|
||||
"conditions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "v1beta1.ClusterCondition"
|
||||
}
|
||||
},
|
||||
"description": "Conditions is an array of current cluster conditions."
|
||||
},
|
||||
"zones": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": "Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. These will always be in the same region."
|
||||
},
|
||||
"region": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'."
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1beta1.ClusterCondition": {
|
||||
"id": "v1beta1.ClusterCondition",
|
||||
"description": "ClusterCondition describes current state of a cluster.",
|
||||
"required": [
|
||||
"type",
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "Type of cluster condition, Complete or Failed."
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "Status of the condition, one of True, False, Unknown."
|
||||
},
|
||||
"lastProbeTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"format": "date-time",
|
||||
"description": "Last time the condition was checked."
|
||||
},
|
||||
"lastTransitionTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
"format": "date-time",
|
||||
"description": "Last time the condition transit from one status to another."
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "(brief) reason for the condition's last transition."
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "Human readable message indicating details about last transition."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
"apiVersion": "",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/logs",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/logs/{logpath}",
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
"apiVersion": "v1",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/api/v1",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/api/v1/namespaces/{namespace}/events",
|
||||
|
@ -3404,6 +3408,10 @@
|
|||
"type": "string"
|
||||
},
|
||||
"description": "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."
|
||||
},
|
||||
"clusterName": {
|
||||
"type": "string",
|
||||
"description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3833,15 +3841,15 @@
|
|||
},
|
||||
"selector": {
|
||||
"type": "object",
|
||||
"description": "This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If not specified, endpoints must be manually specified and the system will not automatically manage them. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview"
|
||||
"description": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview"
|
||||
},
|
||||
"clusterIP": {
|
||||
"type": "string",
|
||||
"description": "ClusterIP is usually assigned by the master and is the IP address of the service. If specified, it will be allocated to the service if it is unused or else creation of the service will fail. Valid values are None, empty string (\"\"), or a valid IP address. 'None' can be specified for a headless service when proxying is not required. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies"
|
||||
"description": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer. Defaults to ClusterIP. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services"
|
||||
"description": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview"
|
||||
},
|
||||
"externalIPs": {
|
||||
"type": "array",
|
||||
|
@ -3871,6 +3879,10 @@
|
|||
"type": "string"
|
||||
},
|
||||
"description": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md"
|
||||
},
|
||||
"externalName": {
|
||||
"type": "string",
|
||||
"description": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
"apiVersion": "",
|
||||
"basePath": "https://10.10.10.10:6443",
|
||||
"resourcePath": "/version",
|
||||
"info": {
|
||||
"title": "",
|
||||
"description": ""
|
||||
},
|
||||
"apis": [
|
||||
{
|
||||
"path": "/version",
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2016 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Contains swagger related util functions.
|
||||
|
||||
# Generates types_swagger_doc_generated file for the given group version.
|
||||
# $1: Name of the group version
|
||||
# $2: Path to the directory where types.go for that group version exists. This
|
||||
# is the directory where the file will be generated.
|
||||
kube::swagger::gen_types_swagger_doc() {
|
||||
local group_version=$1
|
||||
local gv_dir=$2
|
||||
local TMPFILE="/tmp/types_swagger_doc_generated.$(date +%s).go"
|
||||
|
||||
echo "Generating swagger type docs for ${group_version} at ${gv_dir}"
|
||||
|
||||
sed 's/YEAR/2016/' hack/boilerplate/boilerplate.go.txt > "$TMPFILE"
|
||||
echo "package ${group_version##*/}" >> "$TMPFILE"
|
||||
cat >> "$TMPFILE" <<EOF
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE
|
||||
EOF
|
||||
|
||||
go run cmd/genswaggertypedocs/swagger_type_docs.go -s \
|
||||
"${gv_dir}/types.go" \
|
||||
-f - \
|
||||
>> "$TMPFILE"
|
||||
|
||||
echo "// AUTO-GENERATED FUNCTIONS END HERE" >> "$TMPFILE"
|
||||
|
||||
gofmt -w -s "$TMPFILE"
|
||||
mv "$TMPFILE" ""${gv_dir}"/types_swagger_doc_generated.go"
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Generates `types_swagger_doc_generated.go` files for federation API group
|
||||
# versions. That file contains functions on API structs that return the comments
|
||||
# that should be surfaced for the corresponding API type in our API docs.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
source "${KUBE_ROOT}/hack/lib/swagger.sh"
|
||||
|
||||
kube::golang::setup_env
|
||||
|
||||
GROUP_VERSIONS=(federation/v1beta1)
|
||||
GV_DIRS=("federation/apis/federation/v1beta1")
|
||||
# To avoid compile errors, remove the currently existing files.
|
||||
for gv_dir in "${GV_DIRS[@]}"; do
|
||||
rm -f "${gv_dir}/types_swagger_doc_generated.go"
|
||||
done
|
||||
for i in "${!GROUP_VERSIONS[@]}"; do
|
||||
kube::swagger::gen_types_swagger_doc "${GROUP_VERSIONS[i]}" "${GV_DIRS[i]}"
|
||||
done
|
|
@ -24,7 +24,8 @@ set -o pipefail
|
|||
cat << __EOF__
|
||||
Note: This assumes that the 'types_swagger_doc_generated.go' file has been
|
||||
updated for all API group versions. If you are unsure, please run
|
||||
hack/update-generated-swagger-docs.sh first.
|
||||
hack/update-generated-swagger-docs.sh and
|
||||
hack/update-federation-generated-swagger-docs.sh first.
|
||||
__EOF__
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
|
|
|
@ -14,54 +14,25 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Generates `types_swagger_doc_generated.go` files for federation API group
|
||||
# versions. That file contains functions on API structs that return the comments
|
||||
# that should be surfaced for the corresponding API type in our API docs.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
source "${KUBE_ROOT}/hack/lib/swagger.sh"
|
||||
|
||||
kube::golang::setup_env
|
||||
|
||||
function generate_version() {
|
||||
local group_version=$1
|
||||
local TMPFILE="/tmp/types_swagger_doc_generated.$(date +%s).go"
|
||||
|
||||
echo "Generating swagger type docs for ${group_version}"
|
||||
|
||||
sed 's/YEAR/2016/' hack/boilerplate/boilerplate.go.txt > "$TMPFILE"
|
||||
echo "package ${group_version##*/}" >> "$TMPFILE"
|
||||
cat >> "$TMPFILE" <<EOF
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE
|
||||
EOF
|
||||
|
||||
go run cmd/genswaggertypedocs/swagger_type_docs.go -s \
|
||||
"pkg/$(kube::util::group-version-to-pkg-path "${group_version}")/types.go" \
|
||||
-f - \
|
||||
>> "$TMPFILE"
|
||||
|
||||
echo "// AUTO-GENERATED FUNCTIONS END HERE" >> "$TMPFILE"
|
||||
|
||||
gofmt -w -s "$TMPFILE"
|
||||
mv "$TMPFILE" "pkg/$(kube::util::group-version-to-pkg-path "${group_version}")/types_swagger_doc_generated.go"
|
||||
}
|
||||
|
||||
GROUP_VERSIONS=(unversioned v1 authentication/v1beta1 authorization/v1beta1 autoscaling/v1 batch/v1 batch/v2alpha1 extensions/v1beta1 apps/v1alpha1 policy/v1alpha1 rbac/v1alpha1 certificates/v1alpha1)
|
||||
# To avoid compile errors, remove the currently existing files.
|
||||
for group_version in "${GROUP_VERSIONS[@]}"; do
|
||||
rm -f "pkg/$(kube::util::group-version-to-pkg-path "${group_version}")/types_swagger_doc_generated.go"
|
||||
done
|
||||
for group_version in "${GROUP_VERSIONS[@]}"; do
|
||||
generate_version "${group_version}"
|
||||
kube::swagger::gen_types_swagger_doc "${group_version}" "pkg/$(kube::util::group-version-to-pkg-path "${group_version}")"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue