Add additional printer columns

This commit is contained in:
Moto Ishizawa 2020-02-03 17:37:48 +09:00
parent 13ef78ce20
commit 10f6cb5e90
2 changed files with 18 additions and 9 deletions

View File

@ -33,9 +33,9 @@ type RunnerSpec struct {
// RunnerStatus defines the observed state of Runner
type RunnerStatus struct {
Registration RunnerStatusRegistration `json:"registration"`
Phase string `json:"Phase"`
Reason string `json:"Reason"`
Message string `json:"Message"`
Phase string `json:"phase"`
Reason string `json:"reason"`
Message string `json:"message"`
}
type RunnerStatusRegistration struct {
@ -46,6 +46,8 @@ type RunnerStatusRegistration struct {
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:JSONPath=".spec.repository",name=Repository,type=string
// +kubebuilder:printcolumn:JSONPath=".status.phase",name=Status,type=string
// Runner is the Schema for the runners API
type Runner struct {

View File

@ -8,6 +8,13 @@ metadata:
creationTimestamp: null
name: runners.actions.summerwind.dev
spec:
additionalPrinterColumns:
- JSONPath: .spec.repository
name: Repository
type: string
- JSONPath: .status.phase
name: Status
type: string
group: actions.summerwind.dev
names:
kind: Runner
@ -48,11 +55,11 @@ spec:
status:
description: RunnerStatus defines the observed state of Runner
properties:
Message:
message:
type: string
Phase:
phase:
type: string
Reason:
reason:
type: string
registration:
properties:
@ -69,9 +76,9 @@ spec:
- token
type: object
required:
- Message
- Phase
- Reason
- message
- phase
- reason
- registration
type: object
type: object