Skip to content

Commit

Permalink
crd: Add additionalPrinterColumns. radondb#476
Browse files Browse the repository at this point in the history
New columns: SpecReplicas, ReadyNodes, Available, Leader
  • Loading branch information
runkecheng committed May 11, 2022
1 parent 4684948 commit 076bde5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 13 additions & 3 deletions charts/mysql-operator/crds/mysql.radondb.com_mysqlclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@ spec:
versions:
- additionalPrinterColumns:
- description: The cluster status
jsonPath: .status.conditions[?(@.type == 'Ready')].status
name: Ready
jsonPath: .status.state
name: State
type: string
- description: The number of desired nodes
jsonPath: .spec.replicas
name: Replicas
name: SpecReplicas
type: integer
- description: The number of ready nodes
jsonPath: .status.readyNodes
name: ReadyNodes
type: integer
- jsonPath: .status.conditions[?(@.type == 'Available')].status
name: Available
type: string
- jsonPath: .status.nodes[?(@.raftStatus.role == 'LEADER')].name
name: Leader
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
Expand Down
3 changes: 1 addition & 2 deletions config/crd/bases/mysql.radondb.com_mysqlclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1338,8 +1338,7 @@ spec:
\"Unknown\").
type: string
type:
description: Type of cluster condition, values in (\"Initializing\",
\"Ready\", \"Error\").
description: Type of cluster condition.
type: string
required:
- lastTransitionTime
Expand Down

0 comments on commit 076bde5

Please sign in to comment.