Skip to content

Commit

Permalink
Fix podview schema
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed May 20, 2024
1 parent d558ba9 commit a62f9a6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,13 @@ gen-crds:
output:crd:artifacts:config=crds

.PHONY: manifests
manifests: gen-crds
manifests: gen-crds patch-schema

.PHONY: patch-schema
patch-schema: $(BUILD_DIRS)
@echo "patching crds/core.k8s.appscode.com_podviews.yaml"
@kubectl patch -f crds/core.k8s.appscode.com_podviews.yaml -p "$$(cat hack/podview-schema-patch.json)" --type=json --local=true -o yaml > bin/core.k8s.appscode.com_podviews.yaml
@mv bin/core.k8s.appscode.com_podviews.yaml crds/core.k8s.appscode.com_podviews.yaml

.PHONY: gen
gen: clientset manifests openapi
Expand Down
4 changes: 2 additions & 2 deletions crds/core.k8s.appscode.com_podviews.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -2199,6 +2197,8 @@ spec:
ip:
description: IP is the IP address assigned to the pod
type: string
required:
- ip
type: object
type: array
qosClass:
Expand Down
9 changes: 9 additions & 0 deletions hack/podview-schema-patch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"op": "add",
"path": "/spec/versions/0/schema/openAPIV3Schema/properties/status/properties/podIPs/items/required",
"value": [
"ip"
]
}
]

0 comments on commit a62f9a6

Please sign in to comment.