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
b5f0e3d0
Commit
b5f0e3d0
authored
Mar 17, 2017
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add APIService status conditions
parent
9afeabb6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
0 deletions
+78
-0
cmd.go
cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go
+1
-0
types.go
.../k8s.io/kube-aggregator/pkg/apis/apiregistration/types.go
+37
-0
types.go
...ube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go
+40
-0
No files found.
cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go
View file @
b5f0e3d0
...
...
@@ -68,6 +68,7 @@ func New() *Generator {
`+k8s.io/apimachinery/pkg/runtime`
,
`k8s.io/apimachinery/pkg/apis/meta/v1`
,
`k8s.io/apiserver/pkg/apis/example/v1`
,
`k8s.io/kube-aggregator/pkg/apis/apiregistration/v1alpha1`
,
`k8s.io/kubernetes/pkg/api/v1`
,
`k8s.io/kubernetes/pkg/apis/policy/v1beta1`
,
`k8s.io/kubernetes/pkg/apis/extensions/v1beta1`
,
...
...
staging/src/k8s.io/kube-aggregator/pkg/apis/apiregistration/types.go
View file @
b5f0e3d0
...
...
@@ -63,8 +63,45 @@ type APIServiceSpec struct {
Priority
int64
}
type
ConditionStatus
string
// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
// can't decide if a resource is in the condition or not. In the future, we could add other
// intermediate conditions, e.g. ConditionDegraded.
const
(
ConditionTrue
ConditionStatus
=
"True"
ConditionFalse
ConditionStatus
=
"False"
ConditionUnknown
ConditionStatus
=
"Unknown"
)
// APIConditionConditionType is a valid value for APIServiceCondition.Type
type
APIServiceConditionType
string
const
(
// Available indicates that the service exists and is reachable
Available
APIServiceConditionType
=
"Available"
)
// APIServiceCondition describes conditions for an APIService
type
APIServiceCondition
struct
{
// Type is the type of the condition.
Type
APIServiceConditionType
// Status is the status of the condition.
// Can be True, False, Unknown.
Status
ConditionStatus
// Last time the condition transitioned from one status to another.
LastTransitionTime
metav1
.
Time
// Unique, one-word, CamelCase reason for the condition's last transition.
Reason
string
// Human-readable message indicating details about last transition.
Message
string
}
// APIServiceStatus contains derived information about an API server
type
APIServiceStatus
struct
{
// Current service state of apiService.
Conditions
[]
APIServiceCondition
}
// +genclient=true
...
...
staging/src/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go
View file @
b5f0e3d0
...
...
@@ -63,8 +63,48 @@ type APIServiceSpec struct {
Priority
int64
`json:"priority" protobuf:"varint,6,opt,name=priority"`
}
type
ConditionStatus
string
// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
// can't decide if a resource is in the condition or not. In the future, we could add other
// intermediate conditions, e.g. ConditionDegraded.
const
(
ConditionTrue
ConditionStatus
=
"True"
ConditionFalse
ConditionStatus
=
"False"
ConditionUnknown
ConditionStatus
=
"Unknown"
)
// APIConditionConditionType is a valid value for APIServiceCondition.Type
type
APIServiceConditionType
string
const
(
// Available indicates that the service exists and is reachable
Available
APIServiceConditionType
=
"Available"
)
type
APIServiceCondition
struct
{
// Type is the type of the condition.
Type
APIServiceConditionType
`json:"type" protobuf:"bytes,1,opt,name=type,casttype=APIServiceConditionType"`
// Status is the status of the condition.
// Can be True, False, Unknown.
Status
ConditionStatus
`json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
// Last time the condition transitioned from one status to another.
// +optional
LastTransitionTime
metav1
.
Time
`json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
// Unique, one-word, CamelCase reason for the condition's last transition.
// +optional
Reason
string
`json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
// Human-readable message indicating details about last transition.
// +optional
Message
string
`json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
}
// APIServiceStatus contains derived information about an API server
type
APIServiceStatus
struct
{
// Current service state of apiService.
// +optional
Conditions
[]
APIServiceCondition
`json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}
// +genclient=true
...
...
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