From faabcdb92ba08a5676ce895976129c9b7276bf49 Mon Sep 17 00:00:00 2001 From: Sivanantham <90966311+sivanantha321@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:25:28 +0530 Subject: [PATCH] Fix kubeflow overlay kustomization (#3083) * Fix kserve kubeflow crd Signed-off-by: Sivanantham Chinnaiyan * Generate kubeflow release artifact Signed-off-by: Sivanantham Chinnaiyan --------- Signed-off-by: Sivanantham Chinnaiyan --- config/overlays/kubeflow/kustomization.yaml | 84 +++++++++++++++++++++ hack/generate-install.sh | 2 +- install/v0.11.0/kserve_kubeflow.yaml | 14 ++-- 3 files changed, 92 insertions(+), 8 deletions(-) diff --git a/config/overlays/kubeflow/kustomization.yaml b/config/overlays/kubeflow/kustomization.yaml index 72808fda620..7d820e9f177 100644 --- a/config/overlays/kubeflow/kustomization.yaml +++ b/config/overlays/kubeflow/kustomization.yaml @@ -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 diff --git a/hack/generate-install.sh b/hack/generate-install.sh index 7c278b0af5a..c3e6c0405df 100755 --- a/hack/generate-install.sh +++ b/hack/generate-install.sh @@ -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 diff --git a/install/v0.11.0/kserve_kubeflow.yaml b/install/v0.11.0/kserve_kubeflow.yaml index f33c533ec47..53d73a2b2b2 100644 --- a/install/v0.11.0/kserve_kubeflow.yaml +++ b/install/v0.11.0/kserve_kubeflow.yaml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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