Skip to content

Commit

Permalink
Deprecation warnings for v1beta1 webhook and crd (kserve#1837)
Browse files Browse the repository at this point in the history
* Initial commit of deprecarion changes

* Updated apiextensions to v1 from v1beta1

* Added a script to fix issue with protocol default value.
Updated CRD.

* Updated manifests

* Updated params, webhook manifest and conversion webhook.

* Reverting test crds

* Updated fieldpath typo in kustomization.yaml

* Updated manifests.

* Updated make file to exclude v1alpha2 package for make test

Added a debug log, will be removed once debug is complete

Made changes to test script to update kustomize

Updated e2e script to properly install kustomize

Updated kustomize version

Fixed an issue with quick install

Fixed an issue with paddle and canary rollout.

* Remove the duplicated webhook configuration

* Fixed issue with webhook manifest.

Co-authored-by: Dan Sun <[email protected]>
  • Loading branch information
andyi2it and yuzisun authored Oct 7, 2021
1 parent 0651075 commit ec2df4e
Show file tree
Hide file tree
Showing 13 changed files with 304 additions and 284 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ all: test manager agent

# Run tests
test: fmt vet manifests kubebuilder
go test ./pkg/... ./cmd/... -coverprofile coverage.out
go test $$(go list ./pkg/... | grep -v /v1alpha2) ./cmd/... -coverprofile coverage.out

# Build manager binary
manager: generate fmt vet lint
Expand Down Expand Up @@ -130,6 +130,12 @@ manifests: controller-gen
yq d -i config/crd/serving.kserve.io_inferenceservices.yaml 'spec.versions[1].schema.openAPIV3Schema.properties.spec.properties.*.properties.*.properties.livenessProbe.properties.tcpSocket.required'
yq d -i config/crd/serving.kserve.io_inferenceservices.yaml 'spec.versions[1].schema.openAPIV3Schema.properties.spec.properties.*.properties.containers.items.properties.livenessProbe.properties.httpGet.required'
yq d -i config/crd/serving.kserve.io_inferenceservices.yaml 'spec.versions[1].schema.openAPIV3Schema.properties.spec.properties.*.properties.containers.items.properties.readinessProbe.properties.httpGet.required'
#With v1 and newer kubernetes protocol requires default
yq read config/crd/serving.kserve.io_inferenceservices.yaml spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.**.protocol -p p | awk '{print $$0".default"}' | xargs -n1 -I{} yq w -i config/crd/serving.kserve.io_inferenceservices.yaml {} TCP
yq read config/crd/serving.kserve.io_inferenceservices.yaml spec.versions[1].schema.openAPIV3Schema.properties.spec.properties.**.protocol -p p | awk '{print $$0".default"}' | xargs -n1 -I{} yq w -i config/crd/serving.kserve.io_inferenceservices.yaml {} TCP
# Added for debugging. Will be removed
kustomize version
controller-gen --version
kustomize build config/crd > test/crds/serving.kserve.io_inferenceservices.yaml

# Run go fmt against code
Expand Down Expand Up @@ -244,7 +250,7 @@ ifeq (, $(shell which controller-gen))
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@5c0c6ae3b64bccf89fb16353880376d3ce9d9128 ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
CONTROLLER_GEN=$(GOPATH)/bin/controller-gen
Expand Down
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
domain: serving.kserve.io
repo: github.com/kserve/kserve
version: "2"
version: "3"
56 changes: 39 additions & 17 deletions config/crd/serving.kserve.io_inferenceservices.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.1-0.20200528125929-5c0c6ae3b64b
controller-gen.kubebuilder.io/version: v0.4.0
creationTimestamp: null
name: inferenceservices.serving.kserve.io
spec:
Expand All @@ -15,24 +15,21 @@ spec:
- isvc
singular: inferenceservice
scope: Namespaced
subresources:
status: {}
version: v1alpha2
versions:
- additionalPrinterColumns:
- JSONPath: .status.url
- jsonPath: .status.url
name: URL
type: string
- JSONPath: .status.conditions[?(@.type=='Ready')].status
- jsonPath: .status.conditions[?(@.type=='Ready')].status
name: Ready
type: string
- JSONPath: .status.traffic
- jsonPath: .status.traffic
name: Default Traffic
type: integer
- JSONPath: .status.canaryTraffic
- jsonPath: .status.canaryTraffic
name: Canary Traffic
type: integer
- JSONPath: .metadata.creationTimestamp
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha2
Expand Down Expand Up @@ -410,6 +407,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -985,6 +983,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -1790,6 +1789,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -2440,6 +2440,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -3015,6 +3016,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -3820,6 +3822,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -4170,26 +4173,28 @@ spec:
type: object
served: true
storage: false
subresources:
status: {}
- additionalPrinterColumns:
- JSONPath: .status.url
- jsonPath: .status.url
name: URL
type: string
- JSONPath: .status.conditions[?(@.type=='Ready')].status
- jsonPath: .status.conditions[?(@.type=='Ready')].status
name: Ready
type: string
- JSONPath: .status.components.predictor.traffic[?(@.tag=='prev')].percent
- jsonPath: .status.components.predictor.traffic[?(@.tag=='prev')].percent
name: Prev
type: integer
- JSONPath: .status.components.predictor.traffic[?(@.latestRevision==true)].percent
- jsonPath: .status.components.predictor.traffic[?(@.latestRevision==true)].percent
name: Latest
type: integer
- JSONPath: .status.components.predictor.traffic[?(@.tag=='prev')].revisionName
- jsonPath: .status.components.predictor.traffic[?(@.tag=='prev')].revisionName
name: PrevRolledoutRevision
type: string
- JSONPath: .status.components.predictor.traffic[?(@.latestRevision==true)].revisionName
- jsonPath: .status.components.predictor.traffic[?(@.latestRevision==true)].revisionName
name: LatestReadyRevision
type: string
- JSONPath: .metadata.creationTimestamp
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
Expand Down Expand Up @@ -4751,6 +4756,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -5294,6 +5300,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -5837,6 +5844,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -6396,6 +6404,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -8132,6 +8141,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -8720,6 +8730,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -9280,6 +9291,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -9827,6 +9839,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -10366,6 +10379,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -10914,6 +10928,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -11538,6 +11553,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -12079,6 +12095,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -12683,6 +12700,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -13894,6 +13912,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -14721,6 +14740,7 @@ spec:
type: string
protocol:
type: string
default: TCP
required:
- containerPort
type: object
Expand Down Expand Up @@ -15976,6 +15996,8 @@ spec:
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
Loading

0 comments on commit ec2df4e

Please sign in to comment.