Skip to content

Commit

Permalink
update crd
Browse files Browse the repository at this point in the history
Signed-off-by: stoneshi-yunify <[email protected]>
  • Loading branch information
stoneshi-yunify committed Sep 11, 2024
1 parent 3ea0eca commit a2877d2
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM golang:1.22 as builder
WORKDIR /workspace
ADD . /workspace/

RUN make -f webhook.mk build-local
RUN make -f build.mk build-local

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
File renamed without changes.
136 changes: 136 additions & 0 deletions config/crd/bases/storage.kubesphere.io_initializers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1549,6 +1549,142 @@ spec:
type: object
type: array
type: object
pod:
description: Pod matches the pod which mounts the pvc
properties:
fieldSelector:
description: FieldSelector is the field selector, which
only supports "name" and "namespace" as key, and "In"
and "NotIn" as operator.
items:
description: |-
FieldSelectorRequirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the field selector key that the
requirement applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist.
The list of operators may grow in the future.
type: string
values:
description: |-
values is an array of string values.
If the operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values array must be empty.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
labelSelector:
description: LabelSelector is the label selector
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
type: object
pvc:
description: PVC matches the PVC itself
properties:
fieldSelector:
description: FieldSelector is the field selector, which
only supports "name" and "namespace" as key, and "In"
and "NotIn" as operator.
items:
description: |-
FieldSelectorRequirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the field selector key that the
requirement applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist.
The list of operators may grow in the future.
type: string
values:
description: |-
values is an array of string values.
If the operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values array must be empty.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
labelSelector:
description: LabelSelector is the label selector
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
type: object
storageClass:
description: StorageClass matches the PVC's storage class
properties:
Expand Down
13 changes: 13 additions & 0 deletions config/samples/storage.kubesphere.io_v1alpha1_initializer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ spec:
imagePullPolicy: IfNotPresent
pvcMatchers:
- name: local-1
pvc:
fieldSelector:
- key: name
operator: In
values:
- ttt-mongodb-test-0
- mongodb-mongodb-test-0
pod:
labelSelector:
- key: app
operator: In
values:
- mongodb-test
storageClass:
fieldSelector:
- key: name
Expand Down
10 changes: 10 additions & 0 deletions pkg/apis/storage/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a2877d2

Please sign in to comment.