forked from kserve/modelmesh-serving
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manifest readiness for Operator v2 (#237)
* Use config/ as the manifests source for ODH operator v2 Signed-off-by: Vedant Mahabaleshwarkar <[email protected]> * move all changes into an overlay Signed-off-by: Vedant Mahabaleshwarkar <[email protected]> * restructure manifests so that kustomize does not need LoadRestrictorNone flag Signed-off-by: Vedant Mahabaleshwarkar <[email protected]> * correct label mismatch Signed-off-by: Vedant Mahabaleshwarkar <[email protected]> * final modifications Signed-off-by: Vedant Mahabaleshwarkar <[email protected]> * remove openvino variable as it is unused Signed-off-by: Vedant Mahabaleshwarkar <[email protected]> --------- Signed-off-by: Vedant Mahabaleshwarkar <[email protected]>
- Loading branch information
1 parent
e1706cf
commit a22619c
Showing
26 changed files
with
659 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,4 +55,4 @@ builtInServerTypes: | |
- triton | ||
- mlserver | ||
- ovms | ||
- torchserve | ||
- torchserve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
config/overlays/odh/crd/clusterservingruntime_patch_delete.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$patch: delete | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: clusterservingruntimes.serving.kserve.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../../../crd/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright 2021 IBM Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# These are the system defaults which users can override with a user config | ||
|
||
# OpenDataHub override : ODH config-defaults is different from upstream | ||
podsPerRuntime: 2 | ||
headlessService: true | ||
modelMeshImage: | ||
name: $(odh-modelmesh) | ||
modelMeshResources: | ||
requests: | ||
cpu: "300m" | ||
memory: "448Mi" | ||
limits: | ||
cpu: "3" | ||
memory: "448Mi" | ||
restProxy: | ||
enabled: true | ||
port: 8008 | ||
image: | ||
name: $(odh-mm-rest-proxy) | ||
resources: | ||
requests: | ||
cpu: "50m" | ||
memory: "96Mi" | ||
limits: | ||
cpu: "1" | ||
memory: "512Mi" | ||
storageHelperImage: | ||
name: $(odh-modelmesh-runtime-adapter) | ||
command: ["/opt/app/puller"] | ||
storageHelperResources: | ||
requests: | ||
cpu: "50m" | ||
memory: "96Mi" | ||
limits: | ||
cpu: "2" | ||
memory: "512Mi" | ||
serviceAccountName: "modelmesh-serving-sa" | ||
metrics: | ||
enabled: true | ||
payloadProcessors: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../crd/ | ||
- ../manager/ | ||
- ../webhook | ||
|
||
configMapGenerator: | ||
- files: | ||
- ./config-defaults.yaml | ||
name: model-serving-config-defaults | ||
|
||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
transformers: | ||
- metadataLabelTransformer.yaml | ||
|
||
configurations: | ||
- params.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2021 IBM Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
apiVersion: builtin | ||
kind: LabelTransformer | ||
metadata: | ||
name: notImportantHere | ||
labels: | ||
app.kubernetes.io/instance: modelmesh-controller | ||
app.kubernetes.io/managed-by: modelmesh-controller | ||
app.kubernetes.io/name: modelmesh-controller | ||
fieldSpecs: | ||
- path: metadata/labels | ||
create: true | ||
- path: spec/template/metadata/labels | ||
kind: Deployment | ||
create: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
varReference: | ||
- path: spec/template/spec/containers[]/image | ||
kind: Deployment | ||
apiVersion: apps/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../../prometheus | ||
- ./default | ||
- ./scripts | ||
- ./quickstart.yaml | ||
- ./rbac | ||
|
||
namespace: opendatahub | ||
configMapGenerator: | ||
- envs: | ||
- params.env | ||
name: mesh-parameters | ||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
|
||
vars: | ||
- fieldref: | ||
fieldPath: metadata.namespace | ||
name: mesh-namespace | ||
objref: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
name: mesh-parameters | ||
- fieldref: | ||
fieldPath: data.odh-modelmesh | ||
name: odh-modelmesh | ||
objref: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
name: mesh-parameters | ||
- fieldref: | ||
fieldPath: data.odh-mm-rest-proxy | ||
name: odh-mm-rest-proxy | ||
objref: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
name: mesh-parameters | ||
- fieldref: | ||
fieldPath: data.odh-modelmesh-runtime-adapter | ||
name: odh-modelmesh-runtime-adapter | ||
objref: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
name: mesh-parameters | ||
- fieldref: | ||
fieldPath: data.odh-modelmesh-controller | ||
name: odh-modelmesh-controller | ||
objref: | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
name: mesh-parameters | ||
|
||
commonLabels: | ||
app: model-mesh | ||
app.kubernetes.io/part-of: model-mesh | ||
|
||
patchesStrategicMerge: | ||
- ./crd/clusterservingruntime_patch_delete.yaml | ||
|
||
configurations: | ||
- params.yaml |
27 changes: 27 additions & 0 deletions
27
config/overlays/odh/manager/controller_manager_patch_replace.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: modelmesh-controller | ||
spec: | ||
replicas: 3 | ||
template: | ||
spec: | ||
containers: | ||
- name: manager | ||
image: $(odh-modelmesh-controller) | ||
resources: | ||
limits: | ||
memory: 2Gi | ||
ports: | ||
- containerPort: 9443 | ||
name: webhook | ||
protocol: TCP | ||
volumeMounts: | ||
- mountPath: /tmp/k8s-webhook-server/serving-certs | ||
name: modelmesh-webhook-server-cert | ||
readOnly: true | ||
volumes: | ||
- name: modelmesh-webhook-server-cert | ||
secret: | ||
defaultMode: 420 | ||
secretName: modelmesh-webhook-server-cert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../../../manager/ | ||
- ./service.yaml | ||
|
||
patches: | ||
- path: ./controller_manager_patch_replace.yaml | ||
- target: | ||
kind: Deployment | ||
name: modelmesh-controller | ||
patch: | | ||
- op: add | ||
path: /spec/template/spec/affinity/nodeAffinity | ||
value: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: | ||
- amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
varReference: | ||
- path: spec/template/spec/containers[]/image | ||
kind: Deployment | ||
apiVersion: apps/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
control-plane: modelmesh-controller | ||
app.kubernetes.io/managed-by: modelmesh-controller | ||
name: modelmesh-controller | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
type: ClusterIP | ||
selector: | ||
control-plane: modelmesh-controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
odh-mm-rest-proxy=quay.io/opendatahub/rest-proxy:fast | ||
odh-modelmesh-runtime-adapter=quay.io/opendatahub/modelmesh-runtime-adapter:fast | ||
odh-modelmesh=quay.io/opendatahub/modelmesh:fast | ||
odh-modelmesh-controller=quay.io/opendatahub/modelmesh-controller:fast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
varReference: | ||
- path: metadata/namespace | ||
kind: ServiceAccount | ||
apiVersion: v1 | ||
- path: metadata/name | ||
kind: ClusterRoleBinding | ||
apiGroup: rbac.authorization.k8s.io | ||
- path: subjects/namespace | ||
kind: RoleBinding | ||
apiGroup: rbac.authorization.k8s.io | ||
- path: spec/template/spec/containers[]/image | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
- path: data | ||
kind: ConfigMap |
Oops, something went wrong.