Skip to content

Commit

Permalink
Add missing status message to Redis resource CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
abays committed Nov 5, 2024
1 parent 1ea50ac commit a72917a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
11 changes: 10 additions & 1 deletion apis/bases/redis.openstack.org_redises.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ spec:
singular: redis
scope: Namespaced
versions:
- name: v1beta1
- additionalPrinterColumns:
- description: Status
jsonPath: .status.conditions[0].status
name: Status
type: string
- description: Message
jsonPath: .status.conditions[0].message
name: Message
type: string
name: v1beta1
schema:
openAPIV3Schema:
description: Redis is the Schema for the redises API
Expand Down
10 changes: 6 additions & 4 deletions apis/redis/v1beta1/redis_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ const (
// RedisContainerImage is the fall-back container image for Redis
RedisContainerImage = "quay.io/podified-antelope-centos9/openstack-redis:current-podified"

// CrMaxLengthCorrection - DNS1123LabelMaxLength (63) - CrMaxLengthCorrection used in validation to
// omit issue with statefulset pod label "controller-revision-hash": "<statefulset_name>-<hash>"
// Int32 is a 10 character + hyphen = 11
CrMaxLengthCorrection = 11
// CrMaxLengthCorrection - DNS1123LabelMaxLength (63) - CrMaxLengthCorrection used in validation to
// omit issue with statefulset pod label "controller-revision-hash": "<statefulset_name>-<hash>"
// Int32 is a 10 character + hyphen = 11
CrMaxLengthCorrection = 11
)

// RedisSpec defines the desired state of Redis
Expand Down Expand Up @@ -73,6 +73,8 @@ type RedisStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:path=redises
//+kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status"
//+kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[0].message",description="Message"

// Redis is the Schema for the redises API
type Redis struct {
Expand Down
11 changes: 10 additions & 1 deletion config/crd/bases/redis.openstack.org_redises.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ spec:
singular: redis
scope: Namespaced
versions:
- name: v1beta1
- additionalPrinterColumns:
- description: Status
jsonPath: .status.conditions[0].status
name: Status
type: string
- description: Message
jsonPath: .status.conditions[0].message
name: Message
type: string
name: v1beta1
schema:
openAPIV3Schema:
description: Redis is the Schema for the redises API
Expand Down

0 comments on commit a72917a

Please sign in to comment.