Skip to content

Commit 06ce67e

Browse files
authored
Merge pull request #151 from kloeckner-i/METAL-3554/instance_name_from_spec
METAL-3554 read instance name from spec
2 parents 84576ca + 6c8e6a0 commit 06ce67e

4 files changed

Lines changed: 4 additions & 11 deletions

File tree

api/v1alpha1/database_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ type DatabaseStatus struct {
5858
ProxyStatus DatabaseProxyStatus `json:"proxyStatus,omitempty"`
5959
DatabaseName string `json:"database"`
6060
UserName string `json:"user"`
61-
InstanceName string `json:"instanceName"`
6261
}
6362

6463
// DatabaseProxyStatus defines whether proxy for database is enabled or not
@@ -81,7 +80,7 @@ type DatabaseBackup struct {
8180
//+kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="current db phase"
8281
//+kubebuilder:printcolumn:name="Status",type=boolean,JSONPath=`.status.status`,description="current db status"
8382
//+kubebuilder:printcolumn:name="Protected",type=boolean,JSONPath=`.spec.deletionProtected`,description="If database is protected to not get deleted."
84-
//+kubebuilder:printcolumn:name="DBInstance",type=string,JSONPath=`.status.instanceName`,description="instance reference"
83+
//+kubebuilder:printcolumn:name="DBInstance",type=string,JSONPath=`.spec.instance`,description="instance reference"
8584
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="time since creation of resource"
8685

8786
// Database is the Schema for the databases API

charts/db-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ kubeVersion: ">= 1.19-prerelease <= 1.23-prerelease"
44
appVersion: "1.6.4"
55
description: A Database Operator
66
name: db-operator
7-
version: 1.2.4
7+
version: 1.2.5

charts/db-operator/crds/kci.rocks_databases.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
name: Protected
3333
type: boolean
3434
- description: instance reference
35-
jsonPath: .status.instanceName
35+
jsonPath: .spec.instance
3636
name: DBInstance
3737
type: string
3838
- description: time since creation of resource
@@ -115,8 +115,6 @@ spec:
115115
properties:
116116
database:
117117
type: string
118-
instanceName:
119-
type: string
120118
instanceRef:
121119
description: DbInstance is the Schema for the dbinstances API
122120
properties:
@@ -305,7 +303,6 @@ spec:
305303
type: string
306304
required:
307305
- database
308-
- instanceName
309306
- instanceRef
310307
- phase
311308
- status

config/crd/bases/kci.rocks_databases.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
name: Protected
3333
type: boolean
3434
- description: instance reference
35-
jsonPath: .status.instanceName
35+
jsonPath: .spec.instance
3636
name: DBInstance
3737
type: string
3838
- description: time since creation of resource
@@ -115,8 +115,6 @@ spec:
115115
properties:
116116
database:
117117
type: string
118-
instanceName:
119-
type: string
120118
instanceRef:
121119
description: DbInstance is the Schema for the dbinstances API
122120
properties:
@@ -305,7 +303,6 @@ spec:
305303
type: string
306304
required:
307305
- database
308-
- instanceName
309306
- instanceRef
310307
- phase
311308
- status

0 commit comments

Comments
 (0)