Skip to content

Commit

Permalink
Fix kubeflow overlay kustomization (kubeflow#3083)
Browse files Browse the repository at this point in the history
* Fix kserve kubeflow crd

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

* Generate kubeflow release artifact

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>

---------

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
  • Loading branch information
sivanantha321 authored Aug 18, 2023
1 parent 7dd55c1 commit faabcdb
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 8 deletions.
84 changes: 84 additions & 0 deletions config/overlays/kubeflow/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,90 @@ generatorOptions:
configurations:
- params.yaml

replacements:
- source:
group: cert-manager.io
kind: Certificate
name: serving-cert
version: v1
fieldPath: metadata.namespace
targets:
- select:
kind: CustomResourceDefinition
name: inferenceservices.serving.kserve.io
fieldPaths:
- spec.conversion.webhook.clientConfig.service.namespace
- select:
kind: MutatingWebhookConfiguration
name: inferenceservice.serving.kserve.io
fieldPaths:
- webhooks.*.clientConfig.service.namespace
- select:
kind: ValidatingWebhookConfiguration
name: inferenceservice.serving.kserve.io
fieldPaths:
- webhooks.*.clientConfig.service.namespace
- select:
kind: ValidatingWebhookConfiguration
name: trainedmodel.serving.kserve.io
fieldPaths:
- webhooks.*.clientConfig.service.namespace
- select:
kind: ValidatingWebhookConfiguration
name: inferencegraph.serving.kserve.io
fieldPaths:
- webhooks.*.clientConfig.service.namespace
- select:
kind: Certificate
name: serving-cert
namespace: kserve
fieldPaths:
- spec.commonName
- spec.dnsNames.0
options:
delimiter: '.'
index: 1
- select:
kind: CustomResourceDefinition
name: inferenceservices.serving.kserve.io
fieldPaths:
- metadata.annotations.[cert-manager.io/inject-ca-from]
options:
delimiter: '/'
index: 0
- select:
kind: MutatingWebhookConfiguration
name: inferenceservice.serving.kserve.io
fieldPaths:
- metadata.annotations.[cert-manager.io/inject-ca-from]
options:
delimiter: '/'
index: 0
- select:
kind: ValidatingWebhookConfiguration
name: inferenceservice.serving.kserve.io
fieldPaths:
- metadata.annotations.[cert-manager.io/inject-ca-from]
options:
delimiter: '/'
index: 0
- select:
kind: ValidatingWebhookConfiguration
name: trainedmodel.serving.kserve.io
fieldPaths:
- metadata.annotations.[cert-manager.io/inject-ca-from]
options:
delimiter: '/'
index: 0
- select:
kind: ValidatingWebhookConfiguration
name: inferencegraph.serving.kserve.io
fieldPaths:
- metadata.annotations.[cert-manager.io/inject-ca-from]
options:
delimiter: '/'
index: 0

patches:
- path: patches/statefulset.yaml
- path: patches/namespace.yaml
2 changes: 1 addition & 1 deletion hack/generate-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ RUNTIMES_INSTALL_PATH=$INSTALL_DIR/kserve-runtimes.yaml
mkdir -p $INSTALL_DIR
kustomize build config/default | sed s/:latest/:$TAG/ > $INSTALL_PATH
kustomize build config/overlays/kubeflow | sed s/:latest/:$TAG/ > $KUBEFLOW_INSTALL_PATH
kustomize build config/runtimes | sed s/:latest/:$TAG/ >> $RUNTIMES_INSTALL_PATH
kustomize build config/runtimes | sed s/:latest/:$TAG/ > $RUNTIMES_INSTALL_PATH

# Update ingressGateway in inferenceservice configmap as 'kubeflow/kubeflow-gateway'
yq -i 'select(.metadata.name == "inferenceservice-config").data.ingress |= (fromjson | .ingressGateway = "kubeflow/kubeflow-gateway" | tojson)' $KUBEFLOW_INSTALL_PATH
Expand Down
14 changes: 7 additions & 7 deletions install/v0.11.0/kserve_kubeflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2394,7 +2394,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: kserve/serving-cert
cert-manager.io/inject-ca-from: kubeflow/serving-cert
controller-gen.kubebuilder.io/version: v0.12.0
labels:
app: kserve
Expand Down Expand Up @@ -20607,9 +20607,9 @@ metadata:
name: serving-cert
namespace: kubeflow
spec:
commonName: kserve-webhook-server-service.kserve.svc
commonName: kserve-webhook-server-service.kubeflow.svc
dnsNames:
- kserve-webhook-server-service.kserve.svc
- kserve-webhook-server-service.kubeflow.svc
issuerRef:
kind: Issuer
name: selfsigned-issuer
Expand All @@ -20630,7 +20630,7 @@ apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: kserve/serving-cert
cert-manager.io/inject-ca-from: kubeflow/serving-cert
creationTimestamp: null
labels:
app: kserve
Expand Down Expand Up @@ -20692,7 +20692,7 @@ apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: kserve/serving-cert
cert-manager.io/inject-ca-from: kubeflow/serving-cert
creationTimestamp: null
labels:
app: kserve
Expand Down Expand Up @@ -20725,7 +20725,7 @@ apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: kserve/serving-cert
cert-manager.io/inject-ca-from: kubeflow/serving-cert
creationTimestamp: null
labels:
app: kserve
Expand Down Expand Up @@ -20758,7 +20758,7 @@ apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: kserve/serving-cert
cert-manager.io/inject-ca-from: kubeflow/serving-cert
creationTimestamp: null
labels:
app: kserve
Expand Down

0 comments on commit faabcdb

Please sign in to comment.