Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Regenerate CRDs with [email protected]
Browse files Browse the repository at this point in the history
- CRD status fields are deleted in controller-gen >= v0.9.0
  • Loading branch information
Birdrock authored and danail-branekov committed Jul 19, 2022
1 parent 3998204 commit e25dea1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
12 changes: 5 additions & 7 deletions deployment/helm/templates/core/lrp-crd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: lrps.eirini.cloudfoundry.org
spec:
Expand Down Expand Up @@ -107,6 +107,7 @@ spec:
required:
- key
type: object
x-kubernetes-map-type: atomic
fieldRef:
description: 'Selects a field of the pod: supports metadata.name,
metadata.namespace, `metadata.labels[''<KEY>'']`, `metadata.annotations[''<KEY>'']`,
Expand All @@ -124,6 +125,7 @@ spec:
required:
- fieldPath
type: object
x-kubernetes-map-type: atomic
resourceFieldRef:
description: 'Selects a resource of the container: only
resources limits and requests (limits.cpu, limits.memory,
Expand All @@ -148,6 +150,7 @@ spec:
required:
- resource
type: object
x-kubernetes-map-type: atomic
secretKeyRef:
description: Selects a key of a secret in the pod's namespace
properties:
Expand All @@ -166,6 +169,7 @@ spec:
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
required:
- name
Expand Down Expand Up @@ -266,9 +270,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
12 changes: 5 additions & 7 deletions deployment/helm/templates/core/task-crd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: tasks.eirini.cloudfoundry.org
spec:
Expand Down Expand Up @@ -104,6 +104,7 @@ spec:
required:
- key
type: object
x-kubernetes-map-type: atomic
fieldRef:
description: 'Selects a field of the pod: supports metadata.name,
metadata.namespace, `metadata.labels[''<KEY>'']`, `metadata.annotations[''<KEY>'']`,
Expand All @@ -121,6 +122,7 @@ spec:
required:
- fieldPath
type: object
x-kubernetes-map-type: atomic
resourceFieldRef:
description: 'Selects a resource of the container: only
resources limits and requests (limits.cpu, limits.memory,
Expand All @@ -145,6 +147,7 @@ spec:
required:
- resource
type: object
x-kubernetes-map-type: atomic
secretKeyRef:
description: Selects a key of a secret in the pod's namespace
properties:
Expand All @@ -163,6 +166,7 @@ spec:
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
required:
- name
Expand Down Expand Up @@ -271,9 +275,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
4 changes: 2 additions & 2 deletions hack/run-code-generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trap cleanup EXIT

rm -rf "$EIRINI_CONTROLLER_ROOT/pkg/generated"

go run sigs.k8s.io/controller-tools/cmd/controller-gen \
go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2 \
object \
object:headerFile="$EIRINI_CONTROLLER_ROOT/hack/boilerplate.go.txt" \
paths="$EIRINI_CONTROLLER_ROOT/pkg/apis/eirini/v1"
Expand All @@ -32,7 +32,7 @@ cp -R "$EIRINI_CONTROLLER_ROOT"/code.cloudfoundry.org/eirini-controller/pkg/* "$

EIRINI_TMP_CRD="$EIRINI_CONTROLLER_ROOT/code.cloudfoundry.org/crds"
mkdir -p "$EIRINI_TMP_CRD"
go run sigs.k8s.io/controller-tools/cmd/controller-gen \
go run sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2 \
crd \
output:dir="$EIRINI_TMP_CRD" \
paths="$EIRINI_CONTROLLER_ROOT"/pkg/apis/...
Expand Down

0 comments on commit e25dea1

Please sign in to comment.