add more columns to postgresql CRD
This commit is contained in:
		
							parent
							
								
									a22d510595
								
							
						
					
					
						commit
						25feb4053e
					
				|  | @ -23,10 +23,10 @@ spec: | ||||||
|     type: string |     type: string | ||||||
|     description: Team responsible for Postgres CLuster |     description: Team responsible for Postgres CLuster | ||||||
|     JSONPath: .spec.teamId |     JSONPath: .spec.teamId | ||||||
|   - name: Status |   - name: Version | ||||||
|     type: string |     type: string | ||||||
|     description: Current status of Postgres cluster |     description: PostgreSQL version | ||||||
|     JSONPath: .status.PostgresClusterStatus |     JSONPath: .spec.postgresql.version | ||||||
|   - name: Instances |   - name: Instances | ||||||
|     type: integer |     type: integer | ||||||
|     description: Number of instances per Postgres cluster |     description: Number of instances per Postgres cluster | ||||||
|  | @ -35,9 +35,21 @@ spec: | ||||||
|     type: string |     type: string | ||||||
|     description: Size of the bound volume |     description: Size of the bound volume | ||||||
|     JSONPath: .spec.volume.size |     JSONPath: .spec.volume.size | ||||||
|  |   - name: CPU-Request | ||||||
|  |     type: string | ||||||
|  |     description: Requested CPU for Postgres containers | ||||||
|  |     JSONPath: .spec.resources.requests.cpu | ||||||
|  |   - name: Memory-Request | ||||||
|  |     type: string | ||||||
|  |     description: Requested memory for Postgres containers | ||||||
|  |     JSONPath: .spec.resources.requests.memory | ||||||
|   - name: Age |   - name: Age | ||||||
|     type: date |     type: date | ||||||
|     JSONPath: .metadata.creationTimestamp |     JSONPath: .metadata.creationTimestamp | ||||||
|  |   - name: Status | ||||||
|  |     type: string | ||||||
|  |     description: Current sync status of postgresql resource | ||||||
|  |     JSONPath: .status.PostgresClusterStatus | ||||||
|   scope: Namespaced |   scope: Namespaced | ||||||
|   subresources: |   subresources: | ||||||
|     status: {} |     status: {} | ||||||
|  |  | ||||||
|  | @ -28,10 +28,10 @@ var PostgresCRDResourceColumns = []apiextv1beta1.CustomResourceColumnDefinition{ | ||||||
| 		JSONPath:    ".spec.teamId", | 		JSONPath:    ".spec.teamId", | ||||||
| 	}, | 	}, | ||||||
| 	apiextv1beta1.CustomResourceColumnDefinition{ | 	apiextv1beta1.CustomResourceColumnDefinition{ | ||||||
| 		Name:        "Status", | 		Name:        "Version", | ||||||
| 		Type:        "string", | 		Type:        "string", | ||||||
| 		Description: "Current status of Postgres cluster", | 		Description: "PostgreSQL version", | ||||||
| 		JSONPath:    ".status.PostgresClusterStatus", | 		JSONPath:    ".spec.postgresql.version", | ||||||
| 	}, | 	}, | ||||||
| 	apiextv1beta1.CustomResourceColumnDefinition{ | 	apiextv1beta1.CustomResourceColumnDefinition{ | ||||||
| 		Name:        "Instances", | 		Name:        "Instances", | ||||||
|  | @ -45,11 +45,29 @@ var PostgresCRDResourceColumns = []apiextv1beta1.CustomResourceColumnDefinition{ | ||||||
| 		Description: "Size of the bound volume", | 		Description: "Size of the bound volume", | ||||||
| 		JSONPath:    ".spec.volume.size", | 		JSONPath:    ".spec.volume.size", | ||||||
| 	}, | 	}, | ||||||
|  | 	apiextv1beta1.CustomResourceColumnDefinition{ | ||||||
|  | 		Name:        "CPU-Request", | ||||||
|  | 		Type:        "string", | ||||||
|  | 		Description: "Requested CPU for Postgres containers", | ||||||
|  | 		JSONPath:    ".spec.resources.requests.cpu", | ||||||
|  | 	}, | ||||||
|  | 	apiextv1beta1.CustomResourceColumnDefinition{ | ||||||
|  | 		Name:        "Memory-Request", | ||||||
|  | 		Type:        "string", | ||||||
|  | 		Description: "Requested memory for Postgres containers", | ||||||
|  | 		JSONPath:    ".spec.resources.requests.memory", | ||||||
|  | 	}, | ||||||
| 	apiextv1beta1.CustomResourceColumnDefinition{ | 	apiextv1beta1.CustomResourceColumnDefinition{ | ||||||
| 		Name:     "Age", | 		Name:     "Age", | ||||||
| 		Type:     "date", | 		Type:     "date", | ||||||
| 		JSONPath: ".metadata.creationTimestamp", | 		JSONPath: ".metadata.creationTimestamp", | ||||||
| 	}, | 	}, | ||||||
|  | 	apiextv1beta1.CustomResourceColumnDefinition{ | ||||||
|  | 		Name:        "Status", | ||||||
|  | 		Type:        "string", | ||||||
|  | 		Description: "Current sync status of postgresql resource", | ||||||
|  | 		JSONPath:    ".status.PostgresClusterStatus", | ||||||
|  | 	}, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // OperatorConfigCRDResourceColumns definition of AdditionalPrinterColumns for OperatorConfiguration CRD
 | // OperatorConfigCRDResourceColumns definition of AdditionalPrinterColumns for OperatorConfiguration CRD
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue