diff --git a/api/v1alpha1/runner_types.go b/api/v1alpha1/runner_types.go index 806a5bdc..0f329afb 100644 --- a/api/v1alpha1/runner_types.go +++ b/api/v1alpha1/runner_types.go @@ -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 { diff --git a/config/crd/bases/actions.summerwind.dev_runners.yaml b/config/crd/bases/actions.summerwind.dev_runners.yaml index 8c34b1f5..fe9cabbb 100644 --- a/config/crd/bases/actions.summerwind.dev_runners.yaml +++ b/config/crd/bases/actions.summerwind.dev_runners.yaml @@ -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