Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
7c99865c
Commit
7c99865c
authored
Apr 28, 2015
by
nikhiljindal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing hooks/description to catch API fields without description tags
parent
a4316aa6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
28 deletions
+28
-28
description.sh
hooks/description.sh
+1
-1
types.go
pkg/api/v1/types.go
+18
-18
types.go
pkg/api/v1beta3/types.go
+9
-9
No files found.
hooks/description.sh
View file @
7c99865c
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
# Print 1 if the file in $1 is not in need of additional field descriptions, 0 otherwise.
# Print 1 if the file in $1 is not in need of additional field descriptions, 0 otherwise.
FILE
=
"
$1
"
FILE
=
"
$1
"
if
grep
json:
"
${
FILE
}
"
|
grep
-v
,inline |
grep
-v
-q
description: |
grep
-v
//
;
then
if
grep
json:
"
${
FILE
}
"
|
grep
-v
// |
grep
-v
,inline |
grep
-v
-q
description:
;
then
echo
"0"
echo
"0"
else
else
echo
"1"
echo
"1"
...
...
pkg/api/v1/types.go
View file @
7c99865c
...
@@ -251,7 +251,7 @@ type PersistentVolumeSource struct {
...
@@ -251,7 +251,7 @@ type PersistentVolumeSource struct {
type
PersistentVolume
struct
{
type
PersistentVolume
struct
{
TypeMeta
`json:",inline"`
TypeMeta
`json:",inline"`
ObjectMeta
`json:"metadata,omitempty"`
ObjectMeta
`json:"metadata,omitempty"
description:"standard object metadata; see http://docs.k8s.io/api-conventions.md#metadata"
`
//Spec defines a persistent volume owned by the cluster
//Spec defines a persistent volume owned by the cluster
Spec
PersistentVolumeSpec
`json:"spec,omitempty" description:"specification of a persistent volume as provisioned by an administrator"`
Spec
PersistentVolumeSpec
`json:"spec,omitempty" description:"specification of a persistent volume as provisioned by an administrator"`
...
@@ -278,14 +278,14 @@ type PersistentVolumeStatus struct {
...
@@ -278,14 +278,14 @@ type PersistentVolumeStatus struct {
type
PersistentVolumeList
struct
{
type
PersistentVolumeList
struct
{
TypeMeta
`json:",inline"`
TypeMeta
`json:",inline"`
ListMeta
`json:"metadata,omitempty"`
ListMeta
`json:"metadata,omitempty"
description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds
`
Items
[]
PersistentVolume
`json:"items,omitempty" description:"list of persistent volumes"`
Items
[]
PersistentVolume
`json:"items,omitempty" description:"list of persistent volumes"`
}
}
// PersistentVolumeClaim is a user's request for and claim to a persistent volume
// PersistentVolumeClaim is a user's request for and claim to a persistent volume
type
PersistentVolumeClaim
struct
{
type
PersistentVolumeClaim
struct
{
TypeMeta
`json:",inline"`
TypeMeta
`json:",inline"`
ObjectMeta
`json:"metadata,omitempty"`
ObjectMeta
`json:"metadata,omitempty"
description:"standard object metadata; see http://docs.k8s.io/api-conventions.md#metadata"
`
// Spec defines the volume requested by a pod author
// Spec defines the volume requested by a pod author
Spec
PersistentVolumeClaimSpec
`json:"spec,omitempty" description: "the desired characteristics of a volume"`
Spec
PersistentVolumeClaimSpec
`json:"spec,omitempty" description: "the desired characteristics of a volume"`
...
@@ -296,7 +296,7 @@ type PersistentVolumeClaim struct {
...
@@ -296,7 +296,7 @@ type PersistentVolumeClaim struct {
type
PersistentVolumeClaimList
struct
{
type
PersistentVolumeClaimList
struct
{
TypeMeta
`json:",inline"`
TypeMeta
`json:",inline"`
ListMeta
`json:"metadata,omitempty"`
ListMeta
`json:"metadata,omitempty"
description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds
`
Items
[]
PersistentVolumeClaim
`json:"items,omitempty" description: "a list of persistent volume claims"`
Items
[]
PersistentVolumeClaim
`json:"items,omitempty" description: "a list of persistent volume claims"`
}
}
...
@@ -519,25 +519,25 @@ type VolumeMount struct {
...
@@ -519,25 +519,25 @@ type VolumeMount struct {
type
EnvVar
struct
{
type
EnvVar
struct
{
// Required: This must be a C_IDENTIFIER.
// Required: This must be a C_IDENTIFIER.
Name
string
`json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"`
Name
string
`json:"name" description:"name of the environment variable; must be a C_IDENTIFIER"`
// Optional: defaults to "".
// Optional: No more than one of the following may be set.
// Optional: Defaults to ""
Value
string
`json:"value,omitempty" description:"value of the environment variable; defaults to empty string"`
Value
string
`json:"value,omitempty" description:"value of the environment variable; defaults to empty string"`
// Optional:
specify
a source the value of this var should come from.
// Optional:
Specifies
a source the value of this var should come from.
ValueFrom
*
EnvVarSource
`json:"valueFrom,omitempty" description:"source for the environment variable's value; cannot be used if value is not empty"`
ValueFrom
*
EnvVarSource
`json:"valueFrom,omitempty" description:"source for the environment variable's value; cannot be used if value is not empty"`
}
}
// EnvVarSource represents a source for the value of an EnvVar.
// EnvVarSource represents a source for the value of an EnvVar.
// Only one of its members may be specified.
type
EnvVarSource
struct
{
type
EnvVarSource
struct
{
// Selects a field of the pod; only name and namespace are supported.
//
Required:
Selects a field of the pod; only name and namespace are supported.
FieldPath
*
ObjectFieldSelector
`json:"fieldPath
,omitempty
" description:"selects a field of the pod; only name and namespace are supported"`
FieldPath
*
ObjectFieldSelector
`json:"fieldPath" description:"selects a field of the pod; only name and namespace are supported"`
}
}
// ObjectFieldSelector selects an APIVersioned field of an object.
// ObjectFieldSelector selects an APIVersioned field of an object.
type
ObjectFieldSelector
struct
{
type
ObjectFieldSelector
struct
{
//
The API version the FieldPath is written in terms of.
//
Optional: Version of the schema the FieldPath is written in terms of, defaults to "v1"
APIVersion
string
`json:"apiVersion,omitempty" description
="The API version that FieldPath is written in terms of
"`
APIVersion
string
`json:"apiVersion,omitempty" description
:"version of the schema that fieldPath is written in terms of; defaults to v1
"`
//
The p
ath of the field to select in the specified API version
//
Required: P
ath of the field to select in the specified API version
FieldPath
string
`json:"fieldPath
,omitempty" description="The
path of the field to select in the specified API version"`
FieldPath
string
`json:"fieldPath
" description:"
path of the field to select in the specified API version"`
}
}
// HTTPGetAction describes an action based on HTTP Get requests.
// HTTPGetAction describes an action based on HTTP Get requests.
...
@@ -1101,9 +1101,9 @@ type NodeSpec struct {
...
@@ -1101,9 +1101,9 @@ type NodeSpec struct {
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
type
NodeSystemInfo
struct
{
type
NodeSystemInfo
struct
{
// MachineID is the machine-id reported by the node
// MachineID is the machine-id reported by the node
MachineID
string
`json:"machineID"`
MachineID
string
`json:"machineID"
description:"machine-id reported by the node"
`
// SystemUUID is the system-uuid reported by the node
// SystemUUID is the system-uuid reported by the node
SystemUUID
string
`json:"systemUUID"`
SystemUUID
string
`json:"systemUUID"
description:"system-uuid reported by the node"
`
// BootID is the boot-id reported by the node
// BootID is the boot-id reported by the node
BootID
string
`json:"bootID" description:"boot id is the boot-id reported by the node"`
BootID
string
`json:"bootID" description:"boot id is the boot-id reported by the node"`
// Kernel version reported by the node
// Kernel version reported by the node
...
@@ -1130,7 +1130,7 @@ type NodeStatus struct {
...
@@ -1130,7 +1130,7 @@ type NodeStatus struct {
// Queried from cloud provider, if available.
// Queried from cloud provider, if available.
Addresses
[]
NodeAddress
`json:"addresses,omitempty" description:"list of addresses reachable to the node" patchStrategy:"merge" patchMergeKey:"type"`
Addresses
[]
NodeAddress
`json:"addresses,omitempty" description:"list of addresses reachable to the node" patchStrategy:"merge" patchMergeKey:"type"`
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node
NodeInfo
NodeSystemInfo
`json:"nodeInfo,omitempty"`
NodeInfo
NodeSystemInfo
`json:"nodeInfo,omitempty"
description:"set of ids/uuids to uniquely identify the node"
`
}
}
type
NodePhase
string
type
NodePhase
string
...
@@ -1174,8 +1174,8 @@ const (
...
@@ -1174,8 +1174,8 @@ const (
)
)
type
NodeAddress
struct
{
type
NodeAddress
struct
{
Type
NodeAddressType
`json:"type"`
Type
NodeAddressType
`json:"type"
description:"node address type, one of Hostname, ExternalIP or InternalIP"
`
Address
string
`json:"address"`
Address
string
`json:"address"
description:"the node address"
`
}
}
// ResourceName is the name identifying various resources in a ResourceList.
// ResourceName is the name identifying various resources in a ResourceList.
...
...
pkg/api/v1beta3/types.go
View file @
7c99865c
...
@@ -251,7 +251,7 @@ type PersistentVolumeSource struct {
...
@@ -251,7 +251,7 @@ type PersistentVolumeSource struct {
type
PersistentVolume
struct
{
type
PersistentVolume
struct
{
TypeMeta
`json:",inline"`
TypeMeta
`json:",inline"`
ObjectMeta
`json:"metadata,omitempty"`
ObjectMeta
`json:"metadata,omitempty"
description:"standard object metadata; see http://docs.k8s.io/api-conventions.md#metadata"
`
//Spec defines a persistent volume owned by the cluster
//Spec defines a persistent volume owned by the cluster
Spec
PersistentVolumeSpec
`json:"spec,omitempty" description:"specification of a persistent volume as provisioned by an administrator"`
Spec
PersistentVolumeSpec
`json:"spec,omitempty" description:"specification of a persistent volume as provisioned by an administrator"`
...
@@ -278,14 +278,14 @@ type PersistentVolumeStatus struct {
...
@@ -278,14 +278,14 @@ type PersistentVolumeStatus struct {
type
PersistentVolumeList
struct
{
type
PersistentVolumeList
struct
{
TypeMeta
`json:",inline"`
TypeMeta
`json:",inline"`
ListMeta
`json:"metadata,omitempty"`
ListMeta
`json:"metadata,omitempty"
description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds
`
Items
[]
PersistentVolume
`json:"items,omitempty" description:"list of persistent volumes"`
Items
[]
PersistentVolume
`json:"items,omitempty" description:"list of persistent volumes"`
}
}
// PersistentVolumeClaim is a user's request for and claim to a persistent volume
// PersistentVolumeClaim is a user's request for and claim to a persistent volume
type
PersistentVolumeClaim
struct
{
type
PersistentVolumeClaim
struct
{
TypeMeta
`json:",inline"`
TypeMeta
`json:",inline"`
ObjectMeta
`json:"metadata,omitempty"`
ObjectMeta
`json:"metadata,omitempty"
description:"standard object metadata; see http://docs.k8s.io/api-conventions.md#metadata"
`
// Spec defines the volume requested by a pod author
// Spec defines the volume requested by a pod author
Spec
PersistentVolumeClaimSpec
`json:"spec,omitempty" description: "the desired characteristics of a volume"`
Spec
PersistentVolumeClaimSpec
`json:"spec,omitempty" description: "the desired characteristics of a volume"`
...
@@ -296,7 +296,7 @@ type PersistentVolumeClaim struct {
...
@@ -296,7 +296,7 @@ type PersistentVolumeClaim struct {
type
PersistentVolumeClaimList
struct
{
type
PersistentVolumeClaimList
struct
{
TypeMeta
`json:",inline"`
TypeMeta
`json:",inline"`
ListMeta
`json:"metadata,omitempty"`
ListMeta
`json:"metadata,omitempty"
description:"standard list metadata; see http://docs.k8s.io/api-conventions.md#types-kinds
`
Items
[]
PersistentVolumeClaim
`json:"items,omitempty" description: "a list of persistent volume claims"`
Items
[]
PersistentVolumeClaim
`json:"items,omitempty" description: "a list of persistent volume claims"`
}
}
...
@@ -1101,9 +1101,9 @@ type NodeSpec struct {
...
@@ -1101,9 +1101,9 @@ type NodeSpec struct {
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
type
NodeSystemInfo
struct
{
type
NodeSystemInfo
struct
{
// MachineID is the machine-id reported by the node
// MachineID is the machine-id reported by the node
MachineID
string
`json:"machineID"`
MachineID
string
`json:"machineID"
description:"machine-id reported by the node"
`
// SystemUUID is the system-uuid reported by the node
// SystemUUID is the system-uuid reported by the node
SystemUUID
string
`json:"systemUUID"`
SystemUUID
string
`json:"systemUUID"
description:"system-uuid reported by the node"
`
// BootID is the boot-id reported by the node
// BootID is the boot-id reported by the node
BootID
string
`json:"bootID" description:"boot id is the boot-id reported by the node"`
BootID
string
`json:"bootID" description:"boot id is the boot-id reported by the node"`
// Kernel version reported by the node
// Kernel version reported by the node
...
@@ -1130,7 +1130,7 @@ type NodeStatus struct {
...
@@ -1130,7 +1130,7 @@ type NodeStatus struct {
// Queried from cloud provider, if available.
// Queried from cloud provider, if available.
Addresses
[]
NodeAddress
`json:"addresses,omitempty" description:"list of addresses reachable to the node" patchStrategy:"merge" patchMergeKey:"type"`
Addresses
[]
NodeAddress
`json:"addresses,omitempty" description:"list of addresses reachable to the node" patchStrategy:"merge" patchMergeKey:"type"`
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node
NodeInfo
NodeSystemInfo
`json:"nodeInfo,omitempty"`
NodeInfo
NodeSystemInfo
`json:"nodeInfo,omitempty"
description:"set of ids/uuids to uniquely identify the node"
`
}
}
type
NodePhase
string
type
NodePhase
string
...
@@ -1174,8 +1174,8 @@ const (
...
@@ -1174,8 +1174,8 @@ const (
)
)
type
NodeAddress
struct
{
type
NodeAddress
struct
{
Type
NodeAddressType
`json:"type"`
Type
NodeAddressType
`json:"type"
description:"node address type, one of Hostname, ExternalIP or InternalIP"
`
Address
string
`json:"address"`
Address
string
`json:"address"
description:"the node address"
`
}
}
// ResourceName is the name identifying various resources in a ResourceList.
// ResourceName is the name identifying various resources in a ResourceList.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment