Skip to content

Commit 21af8a1

Browse files
Merge pull request #141 from rabi/markers
Fix kubebuilder markers
2 parents 07f07cd + a67549d commit 21af8a1

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

api/bases/mariadb.openstack.org_mariadbs.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ spec:
4545
description: MariaDBSpec defines the desired state of MariaDB
4646
properties:
4747
adoptionRedirect:
48-
description: AdoptionRedirectSpec defines redirection to a different
49-
DB instance during Adoption
48+
description: Adoption configuration
5049
properties:
5150
host:
5251
description: MariaDB host to redirect to (IP or name)
@@ -60,11 +59,16 @@ spec:
6059
description: Secret containing a RootPassword
6160
type: string
6261
storageClass:
62+
description: Storage class to host the mariadb databases
6363
type: string
6464
storageRequest:
65+
description: Storage size allocated for the mariadb databases
6566
type: string
6667
required:
6768
- containerImage
69+
- secret
70+
- storageClass
71+
- storageRequest
6872
type: object
6973
status:
7074
description: MariaDBStatus defines the observed state of MariaDB

api/v1beta1/galera_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ type GaleraSpec struct {
3838
// +kubebuilder:validation:Required
3939
StorageRequest string `json:"storageRequest"`
4040
// Name of the galera container image to run (will be set to environmental default if empty)
41+
// +kubebuilder:validation:Required
4142
ContainerImage string `json:"containerImage"`
4243
// +kubebuilder:validation:Minimum=1
4344
// +kubebuilder:default=1

api/v1beta1/mariadb_types.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,19 @@ const (
3232
// MariaDBSpec defines the desired state of MariaDB
3333
type MariaDBSpec struct {
3434
// Secret containing a RootPassword
35-
Secret string `json:"secret,omitempty"`
36-
37-
StorageClass string `json:"storageClass,omitempty"`
38-
39-
StorageRequest string `json:"storageRequest,omitempty"`
40-
35+
// +kubebuilder:validation:Required
36+
Secret string `json:"secret"`
37+
// Storage class to host the mariadb databases
38+
// +kubebuilder:validation:Required
39+
StorageClass string `json:"storageClass"`
40+
// Storage size allocated for the mariadb databases
41+
// +kubebuilder:validation:Required
42+
StorageRequest string `json:"storageRequest"`
4143
// ContainerImage - Container Image URL (will be set to environmental default if empty)
44+
// +kubebuilder:validation:Required
4245
ContainerImage string `json:"containerImage"`
43-
46+
// Adoption configuration
47+
// +kubebuilder:validation:Optional
4448
AdoptionRedirect AdoptionRedirectSpec `json:"adoptionRedirect,omitempty"`
4549
}
4650

config/crd/bases/mariadb.openstack.org_mariadbs.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ spec:
4545
description: MariaDBSpec defines the desired state of MariaDB
4646
properties:
4747
adoptionRedirect:
48-
description: AdoptionRedirectSpec defines redirection to a different
49-
DB instance during Adoption
48+
description: Adoption configuration
5049
properties:
5150
host:
5251
description: MariaDB host to redirect to (IP or name)
@@ -60,11 +59,16 @@ spec:
6059
description: Secret containing a RootPassword
6160
type: string
6261
storageClass:
62+
description: Storage class to host the mariadb databases
6363
type: string
6464
storageRequest:
65+
description: Storage size allocated for the mariadb databases
6566
type: string
6667
required:
6768
- containerImage
69+
- secret
70+
- storageClass
71+
- storageRequest
6872
type: object
6973
status:
7074
description: MariaDBStatus defines the observed state of MariaDB

0 commit comments

Comments
 (0)