Skip to content

Commit 750c565

Browse files
committed
Use x-kuberentes-list-type=atomic for extraMounts
Add anootation for ExtraMounts to set x-kubernetes-list-type Ref: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/ Signed-off-by: Brendan Shephard <[email protected]>
1 parent 10f5f7e commit 750c565

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

api/bases/keystone.openstack.org_keystoneapis.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ spec:
11541154
- volumes
11551155
type: object
11561156
type: array
1157+
x-kubernetes-list-type: atomic
11571158
name:
11581159
type: string
11591160
region:

api/v1beta1/keystoneapi_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import (
2626
"github.com/openstack-k8s-operators/lib-common/modules/common/tls"
2727
"github.com/openstack-k8s-operators/lib-common/modules/common/util"
2828
"github.com/openstack-k8s-operators/lib-common/modules/storage"
29-
"k8s.io/apimachinery/pkg/util/validation/field"
3029
corev1 "k8s.io/api/core/v1"
3130
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
31+
"k8s.io/apimachinery/pkg/util/validation/field"
3232
)
3333

3434
const (
@@ -347,6 +347,7 @@ type KeystoneExtraMounts struct {
347347
// +kubebuilder:validation:Optional
348348
Region string `json:"region,omitempty"`
349349
// +kubebuilder:validation:Required
350+
// +listType=atomic
350351
VolMounts []storage.VolMounts `json:"extraVol"`
351352
}
352353

config/crd/bases/keystone.openstack.org_keystoneapis.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ spec:
11541154
- volumes
11551155
type: object
11561156
type: array
1157+
x-kubernetes-list-type: atomic
11571158
name:
11581159
type: string
11591160
region:

0 commit comments

Comments
 (0)