Skip to content

Commit

Permalink
DNM:test make crd-schema-check
Browse files Browse the repository at this point in the history
  • Loading branch information
gibizer committed Nov 25, 2024
1 parent af33554 commit 5b8b582
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ repos:
entry: make
args: ['crd-schema-check']
pass_filenames: false
verbose: true

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -481,4 +481,4 @@ webhook-cleanup:
PHONY: crd-schema-check
crd-schema-check: manifests
INSTALL_DIR=$(LOCALBIN) CRD_SCHEMA_CHECKER_VERSION=release-4.16 hack/build-crd-schema-checker.sh
INSTALL_DIR=$(LOCALBIN) BRANCH=$(BRANCH) hack/crd-schema-checker.sh
INSTALL_DIR=$(LOCALBIN) BRANCH="$${PULL_BASE_SHA:-$(BRANCH)}" hack/crd-schema-checker.sh
4 changes: 4 additions & 0 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10879,6 +10879,8 @@ spec:
format: int32
minimum: 0
type: integer
foo:
type: integer
nodeSelector:
additionalProperties:
type: string
Expand Down Expand Up @@ -14696,6 +14698,8 @@ spec:
type: string
type: object
type: array
required:
- foo
type: object
type: object
type: object
Expand Down
3 changes: 3 additions & 0 deletions apis/core/v1beta1/openstackcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ type RabbitmqTemplate struct {
// +operator-sdk:csv:customresourcedefinitions:type=spec
// NodeSelector to target subset of worker nodes running this service
NodeSelector *map[string]string `json:"nodeSelector,omitempty"`

// +kubebuilder:validation:Required
Foo int `json:"foo"`
}

// OvnSection defines the desired state of OVN services
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10879,6 +10879,8 @@ spec:
format: int32
minimum: 0
type: integer
foo:
type: integer
nodeSelector:
additionalProperties:
type: string
Expand Down Expand Up @@ -14696,6 +14698,8 @@ spec:
type: string
type: object
type: array
required:
- foo
type: object
type: object
type: object
Expand Down
6 changes: 6 additions & 0 deletions hack/crd-schema-checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ function cleanup {

trap cleanup EXIT

git remote -v || true

git --no-pager branch -lr || true

git log --oneline | head -n 10 || true


for crd in config/crd/bases/*.yaml; do
mkdir -p "$(dirname "$TMP_DIR/$crd")"
Expand Down

0 comments on commit 5b8b582

Please sign in to comment.