mirror of
https://github.com/hanzo-ml/kserve.git
synced 2026-07-27 06:55:14 +00:00
Deprecation warnings for v1beta1 webhook and crd (#1837)
* 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 <dsun20@bloomberg.net>
This commit is contained in:
co-authored by
Dan Sun
parent
0651075dc4
commit
ec2df4e978
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
domain: serving.kserve.io
|
||||
repo: github.com/kserve/kserve
|
||||
version: "2"
|
||||
version: "3"
|
||||
|
||||
@@ -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:
|
||||
@@ -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
|
||||
@@ -410,6 +407,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -985,6 +983,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -1790,6 +1789,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -2440,6 +2440,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -3015,6 +3016,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -3820,6 +3822,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -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
|
||||
@@ -4751,6 +4756,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -5294,6 +5300,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -5837,6 +5844,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -6396,6 +6404,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -8132,6 +8141,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -8720,6 +8730,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -9280,6 +9291,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -9827,6 +9839,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -10366,6 +10379,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -10914,6 +10928,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -11538,6 +11553,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -12079,6 +12095,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -12683,6 +12700,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -13894,6 +13912,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -14721,6 +14740,7 @@ spec:
|
||||
type: string
|
||||
protocol:
|
||||
type: string
|
||||
default: TCP
|
||||
required:
|
||||
- containerPort
|
||||
type: object
|
||||
@@ -15976,6 +15996,8 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
|
||||
@@ -1,23 +1,13 @@
|
||||
|
||||
---
|
||||
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: trainedmodels.serving.kserve.io
|
||||
spec:
|
||||
additionalPrinterColumns:
|
||||
- JSONPath: .status.url
|
||||
name: URL
|
||||
type: string
|
||||
- JSONPath: .status.conditions[?(@.type=='Ready')].status
|
||||
name: Ready
|
||||
type: string
|
||||
- JSONPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
group: serving.kserve.io
|
||||
names:
|
||||
kind: TrainedModel
|
||||
@@ -27,85 +17,94 @@ spec:
|
||||
- tm
|
||||
singular: trainedmodel
|
||||
scope: Namespaced
|
||||
subresources:
|
||||
status: {}
|
||||
validation:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
inferenceService:
|
||||
type: string
|
||||
model:
|
||||
properties:
|
||||
framework:
|
||||
type: string
|
||||
memory:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
storageUri:
|
||||
type: string
|
||||
required:
|
||||
- framework
|
||||
- memory
|
||||
- storageUri
|
||||
type: object
|
||||
required:
|
||||
- inferenceService
|
||||
- model
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
address:
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
type: object
|
||||
annotations:
|
||||
additionalProperties:
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.url
|
||||
name: URL
|
||||
type: string
|
||||
- jsonPath: .status.conditions[?(@.type=='Ready')].status
|
||||
name: Ready
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
inferenceService:
|
||||
type: string
|
||||
type: object
|
||||
conditions:
|
||||
items:
|
||||
model:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
framework:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
severity:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
memory:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
storageUri:
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
- framework
|
||||
- memory
|
||||
- storageUri
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
url:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
required:
|
||||
- inferenceService
|
||||
- model
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
address:
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
type: object
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
severity:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
url:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# The following patch adds a directive for certmanager to inject CA into the CRD
|
||||
# CRD conversion requires k8s 1.13 or later.
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# The following patch enables conversion webhook for CRD
|
||||
# CRD conversion requires k8s 1.13 or later.
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: inferenceservices.serving.kserve.io
|
||||
@@ -8,12 +8,13 @@ spec:
|
||||
preserveUnknownFields: false
|
||||
conversion:
|
||||
strategy: Webhook
|
||||
conversionReviewVersions: ["v1alpha2","v1beta1"]
|
||||
webhookClientConfig:
|
||||
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
|
||||
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
|
||||
caBundle: Cg==
|
||||
service:
|
||||
namespace: $(kserveNamespace)
|
||||
name: $(webhookServiceName)
|
||||
path: /convert
|
||||
webhook:
|
||||
conversionReviewVersions: ["v1beta1"]
|
||||
clientConfig:
|
||||
# this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
|
||||
# but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
|
||||
caBundle: Cg==
|
||||
service:
|
||||
namespace: $(kserveNamespace)
|
||||
name: $(webhookServiceName)
|
||||
path: /convert
|
||||
|
||||
@@ -53,7 +53,7 @@ vars:
|
||||
fieldref:
|
||||
fieldpath: data.ingressGateway
|
||||
- fieldref:
|
||||
fieldPath: metadata.name
|
||||
fieldpath: metadata.name
|
||||
name: webhookServiceName
|
||||
objref:
|
||||
apiVersion: v1
|
||||
|
||||
@@ -7,9 +7,9 @@ varReference:
|
||||
kind: ValidatingWebhookConfiguration
|
||||
- path: webhooks/clientConfig/service/namespace
|
||||
kind: ValidatingWebhookConfiguration
|
||||
- path: spec/conversion/webhookClientConfig/service/name
|
||||
- path: spec/conversion/webhook/clientConfig/service/name
|
||||
kind: CustomResourceDefinition
|
||||
- path: spec/conversion/webhookClientConfig/service/namespace
|
||||
- path: spec/conversion/webhook/clientConfig/service/namespace
|
||||
kind: CustomResourceDefinition
|
||||
- path: data/ingress
|
||||
kind: ConfigMap
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This patch add annotation to admission webhook config and
|
||||
# the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize.
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: inferenceservice.serving.kserve.io
|
||||
@@ -9,7 +9,7 @@ metadata:
|
||||
webhooks:
|
||||
- name: inferenceservice.kserve-webhook-server.defaulter
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: inferenceservice.serving.kserve.io
|
||||
@@ -18,7 +18,7 @@ metadata:
|
||||
webhooks:
|
||||
- name: inferenceservice.kserve-webhook-server.validator
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: trainedmodel.serving.kserve.io
|
||||
|
||||
@@ -1,28 +1,10 @@
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: inferenceservice.serving.kserve.io
|
||||
webhooks:
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: $(webhookServiceName)
|
||||
namespace: $(kserveNamespace)
|
||||
path: /mutate-serving-kserve-io-v1alpha2-inferenceservice
|
||||
failurePolicy: Fail
|
||||
name: inferenceservice.kserve-webhook-server.defaulter
|
||||
rules:
|
||||
- apiGroups:
|
||||
- serving.kserve.io
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- inferenceservices
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
@@ -30,7 +12,9 @@ webhooks:
|
||||
namespace: $(kserveNamespace)
|
||||
path: /mutate-serving-kserve-io-v1beta1-inferenceservice
|
||||
failurePolicy: Fail
|
||||
name: inferenceservice.kserve-webhook-server.v1beta1.defaulter
|
||||
name: inferenceservice.kserve-webhook-server.defaulter
|
||||
sideEffects: None
|
||||
admissionReviewVersions: ["v1beta1"]
|
||||
rules:
|
||||
- apiGroups:
|
||||
- serving.kserve.io
|
||||
@@ -49,6 +33,8 @@ webhooks:
|
||||
path: /mutate-pods
|
||||
failurePolicy: Fail
|
||||
name: inferenceservice.kserve-webhook-server.pod-mutator
|
||||
sideEffects: None
|
||||
admissionReviewVersions: ["v1beta1"]
|
||||
namespaceSelector:
|
||||
matchExpressions:
|
||||
- key: control-plane
|
||||
@@ -69,30 +55,12 @@ webhooks:
|
||||
- pods
|
||||
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: inferenceservice.serving.kserve.io
|
||||
webhooks:
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
name: $(webhookServiceName)
|
||||
namespace: $(kserveNamespace)
|
||||
path: /validate-serving-kserve-io-v1alpha2-inferenceservice
|
||||
failurePolicy: Fail
|
||||
name: inferenceservice.kserve-webhook-server.validator
|
||||
rules:
|
||||
- apiGroups:
|
||||
- serving.kserve.io
|
||||
apiVersions:
|
||||
- v1alpha2
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- inferenceservices
|
||||
- clientConfig:
|
||||
caBundle: Cg==
|
||||
service:
|
||||
@@ -100,7 +68,9 @@ webhooks:
|
||||
namespace: $(kserveNamespace)
|
||||
path: /validate-serving-kserve-io-v1beta1-inferenceservice
|
||||
failurePolicy: Fail
|
||||
name: inferenceservice.kserve-webhook-server.v1beta1.validator
|
||||
name: inferenceservice.kserve-webhook-server.validator
|
||||
sideEffects: None
|
||||
admissionReviewVersions: ["v1beta1"]
|
||||
rules:
|
||||
- apiGroups:
|
||||
- serving.kserve.io
|
||||
@@ -112,7 +82,7 @@ webhooks:
|
||||
resources:
|
||||
- inferenceservices
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
@@ -126,6 +96,8 @@ webhooks:
|
||||
path: /validate-serving-kserve-io-v1alpha1-trainedmodel
|
||||
failurePolicy: Fail
|
||||
name: trainedmodel.kserve-webhook-server.validator
|
||||
sideEffects: None
|
||||
admissionReviewVersions: ["v1beta1"]
|
||||
rules:
|
||||
- apiGroups:
|
||||
- serving.kserve.io
|
||||
|
||||
+16
-2
@@ -4,9 +4,18 @@ export ISTIO_VERSION=1.9.0
|
||||
export KNATIVE_VERSION=v0.22.0
|
||||
export KSERVE_VERSION=v0.7.0-rc0
|
||||
export CERT_MANAGER_VERSION=v1.3.0
|
||||
|
||||
KUBE_VERSION=$(kubectl version --short=true)
|
||||
|
||||
echo ${KUBE_VERSION:43:2}
|
||||
|
||||
if [ ${KUBE_VERSION:43:2} -gt 21 ]; then export ISTIO_VERSION=1.10.3; export KNATIVE_VERSION=v0.23.2; fi
|
||||
|
||||
curl -L https://git.io/getLatestIstio | sh -
|
||||
cd istio-${ISTIO_VERSION}
|
||||
|
||||
|
||||
|
||||
# Create istio-system namespace
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: v1
|
||||
@@ -18,7 +27,7 @@ metadata:
|
||||
EOF
|
||||
|
||||
cat << EOF > ./istio-minimal-operator.yaml
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
apiVersion: install.istio.io/v1beta1
|
||||
kind: IstioOperator
|
||||
spec:
|
||||
values:
|
||||
@@ -43,7 +52,12 @@ spec:
|
||||
enabled: true
|
||||
EOF
|
||||
|
||||
bin/istioctl manifest apply -f istio-minimal-operator.yaml -y
|
||||
if [ ${ISTIO_VERSION:2:-2} -gt 9 ]
|
||||
then
|
||||
bin/istioctl install --set profile=demo -y;
|
||||
else
|
||||
bin/istioctl manifest apply -f istio-minimal-operator.yaml -y;
|
||||
fi
|
||||
|
||||
# Install Knative
|
||||
kubectl apply --filename https://github.com/knative/serving/releases/download/${KNATIVE_VERSION}/serving-crds.yaml
|
||||
|
||||
@@ -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:
|
||||
@@ -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
|
||||
@@ -409,10 +406,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -985,10 +982,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -1791,10 +1788,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -2442,10 +2439,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -3018,10 +3015,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -3824,10 +3821,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -4176,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
|
||||
@@ -4756,10 +4755,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -5300,10 +5299,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -5844,10 +5843,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -6404,10 +6403,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -8141,10 +8140,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -8730,10 +8729,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -9291,10 +9290,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -9839,10 +9838,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -10379,10 +10378,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -10928,10 +10927,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -11553,10 +11552,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -12095,10 +12094,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -12700,10 +12699,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -13912,10 +13911,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -14740,10 +14739,10 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
protocol:
|
||||
default: TCP
|
||||
type: string
|
||||
required:
|
||||
- containerPort
|
||||
- protocol
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-map-keys:
|
||||
@@ -15997,6 +15996,8 @@ spec:
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
@@ -16004,24 +16005,14 @@ status:
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
---
|
||||
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: trainedmodels.serving.kserve.io
|
||||
spec:
|
||||
additionalPrinterColumns:
|
||||
- JSONPath: .status.url
|
||||
name: URL
|
||||
type: string
|
||||
- JSONPath: .status.conditions[?(@.type=='Ready')].status
|
||||
name: Ready
|
||||
type: string
|
||||
- JSONPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
group: serving.kserve.io
|
||||
names:
|
||||
kind: TrainedModel
|
||||
@@ -16031,85 +16022,94 @@ spec:
|
||||
- tm
|
||||
singular: trainedmodel
|
||||
scope: Namespaced
|
||||
subresources:
|
||||
status: {}
|
||||
validation:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
inferenceService:
|
||||
type: string
|
||||
model:
|
||||
properties:
|
||||
framework:
|
||||
type: string
|
||||
memory:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
storageUri:
|
||||
type: string
|
||||
required:
|
||||
- framework
|
||||
- memory
|
||||
- storageUri
|
||||
type: object
|
||||
required:
|
||||
- inferenceService
|
||||
- model
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
address:
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
type: object
|
||||
annotations:
|
||||
additionalProperties:
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.url
|
||||
name: URL
|
||||
type: string
|
||||
- jsonPath: .status.conditions[?(@.type=='Ready')].status
|
||||
name: Ready
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
inferenceService:
|
||||
type: string
|
||||
type: object
|
||||
conditions:
|
||||
items:
|
||||
model:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
framework:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
severity:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
memory:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
storageUri:
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
- framework
|
||||
- memory
|
||||
- storageUri
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
url:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
required:
|
||||
- inferenceService
|
||||
- model
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
address:
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
type: object
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
conditions:
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
severity:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
url:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
|
||||
@@ -36,6 +36,12 @@ echo "Configuring kubectl ..."
|
||||
pip3 install awscli --upgrade --user
|
||||
aws eks update-kubeconfig --region=${AWS_REGION} --name=${CLUSTER_NAME}
|
||||
|
||||
echo "Updating kustomize"
|
||||
KUSTOMIZE_PATH=$(which kustomize)
|
||||
rm -rf ${KUSTOMIZE_PATH}
|
||||
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- 4.2.0 ${KUSTOMIZE_PATH::-10}
|
||||
|
||||
|
||||
echo "Install istio ..."
|
||||
mkdir istio_tmp
|
||||
pushd istio_tmp >/dev/null
|
||||
|
||||
Reference in New Issue
Block a user