Skip to content

Commit

Permalink
generate Embedded ObjectMeta in the CRDs
Browse files Browse the repository at this point in the history
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
  • Loading branch information
zhzhuang-zju committed Nov 24, 2023
1 parent cf1dbf0 commit 9d95c7e
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 34 deletions.
21 changes: 19 additions & 2 deletions charts/karmada-operator/crds/operator.karmada.io_karmadas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,27 @@ spec:
here.
properties:
metadata:
description: May contain labels and annotations
description: "May contain labels and annotations
that will be copied into the PVC when creating
it. No other fields are allowed and will be
rejected during validation.
rejected during validation. \n optional"
properties:
annotations:
additionalProperties:
type: string
type: object
finalizers:
items:
type: string
type: array
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
spec:
description: The specification for the PersistentVolumeClaim.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ spec:
properties:
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
properties:
annotations:
additionalProperties:
type: string
type: object
finalizers:
items:
type: string
type: array
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
spec:
description: 'Specification of the desired behavior of the pod.
Expand Down Expand Up @@ -6274,6 +6291,23 @@ spec:
that will be copied into the PVC when creating
it. No other fields are allowed and will be
rejected during validation.
properties:
annotations:
additionalProperties:
type: string
type: object
finalizers:
items:
type: string
type: array
labels:
additionalProperties:
type: string
type: object
name:
type: string
namespace:
type: string
type: object
spec:
description: The specification for the PersistentVolumeClaim.
Expand Down
15 changes: 8 additions & 7 deletions hack/update-crdgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ echo "Generating with controller-gen"
util::install_tools ${CONTROLLER_GEN_PKG} ${CONTROLLER_GEN_VER} >/dev/null 2>&1

# Unify the crds used by helm chart and the installation scripts
controller-gen crd paths=./pkg/apis/config/... output:crd:dir=./charts/karmada/_crds/bases/config
controller-gen crd paths=./pkg/apis/policy/... output:crd:dir=./charts/karmada/_crds/bases/policy
controller-gen crd paths=./pkg/apis/work/... output:crd:dir=./charts/karmada/_crds/bases/work
controller-gen crd paths=./pkg/apis/autoscaling/... output:crd:dir=./charts/karmada/_crds/bases/autoscaling
controller-gen crd paths=./pkg/apis/networking/... output:crd:dir=./charts/karmada/_crds/bases/networking
controller-gen crd paths=./examples/customresourceinterpreter/apis/... output:crd:dir=./examples/customresourceinterpreter/apis/
controller-gen crd paths=./operator/pkg/apis/operator/... output:crd:dir=./charts/karmada-operator/crds
controller-gen crd:generateEmbeddedObjectMeta=true paths=./pkg/apis/config/... output:crd:dir=./charts/karmada/_crds/bases/config
controller-gen crd:generateEmbeddedObjectMeta=true paths=./pkg/apis/policy/... output:crd:dir=./charts/karmada/_crds/bases/policy
controller-gen crd:generateEmbeddedObjectMeta=true paths=./pkg/apis/work/... output:crd:dir=./charts/karmada/_crds/bases/work
controller-gen crd:generateEmbeddedObjectMeta=true paths=./pkg/apis/autoscaling/... output:crd:dir=./charts/karmada/_crds/bases/autoscaling
controller-gen crd:generateEmbeddedObjectMeta=true paths=./pkg/apis/networking/... output:crd:dir=./charts/karmada/_crds/bases/networking
controller-gen crd:generateEmbeddedObjectMeta=true paths=./examples/customresourceinterpreter/apis/... output:crd:dir=./examples/customresourceinterpreter/apis/
controller-gen crd:generateEmbeddedObjectMeta=true paths=./operator/pkg/apis/operator/... output:crd:dir=./charts/karmada-operator/crds
controller-gen crd:generateEmbeddedObjectMeta=true paths=./operator/pkg/apis/operator/... output:crd:dir=./operator/config/crds
Loading

0 comments on commit 9d95c7e

Please sign in to comment.