Skip to content

Commit

Permalink
Update kubeflow overlay (kubeflow#1424)
Browse files Browse the repository at this point in the history
Additional resources are created when KFServing is installed as a
part of Kubeflow in the manifests repository. This commits updates the
kubeflow overlay to make it more akin to what is installed with
the manifests repo.
  • Loading branch information
pvaneck authored Mar 10, 2021
1 parent 21d6041 commit 0b9fde1
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 3 deletions.
40 changes: 40 additions & 0 deletions config/overlays/kubeflow/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: app.k8s.io/v1beta1
kind: Application
metadata:
name: kfserving
spec:
selector:
matchLabels:
app.kubernetes.io/name: kfserving
app.kubernetes.io/component: kfserving
componentKinds:
- group: apps
kind: StatefulSet
- group: core
kind: Service
- group: core
kind: Secret
- group: core
kind: ConfigMap
- group: rbac.authorization.k8s.io/v1
kind: Role
- group: rbac.authorization.k8s.io/v1
kind: RoleBinding
descriptor:
type: kfserving
version: v1beta1
description: |-
KFServing provides a Kubernetes Custom Resource Definition for serving ML Models on arbitrary frameworks
maintainers:
- name: KFServing
url: https://github.com/kubeflow/kfserving
owners:
- name: KFServing
url: https://github.com/kubeflow/kfserving
keywords:
- kfserving
- inference
links:
- description: About
url: https://github.com/kubeflow/kfserving
addOwnerRef: true
49 changes: 49 additions & 0 deletions config/overlays/kubeflow/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kubeflow-kfserving-admin
labels:
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
aggregationRule:
clusterRoleSelectors:
- matchLabels:
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-kfserving-admin: "true"
rules: []
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kubeflow-kfserving-edit
labels:
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true"
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-kfserving-admin: "true"
rules:
- apiGroups:
- serving.kubeflow.org
resources:
- inferenceservices
verbs:
- get
- list
- watch
- create
- delete
- deletecollection
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kubeflow-kfserving-view
labels:
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true"
rules:
- apiGroups:
- serving.kubeflow.org
resources:
- inferenceservices
verbs:
- get
- list
- watch
15 changes: 12 additions & 3 deletions config/overlays/kubeflow/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ kind: Kustomization
namespace: kubeflow

# Labels to add to all resources and selectors.
#commonLabels:
# someName: someValue
commonLabels:
app: kfserving
kustomize.component: kfserving
app.kubernetes.io/component: kfserving
app.kubernetes.io/name: kfserving

bases:
- ../../default
- cluster-role.yaml
- application.yaml

patchesStrategicMerge:
- statefulset-patch.yaml
- namespace-patch.yaml

generatorOptions:
disableNameSuffixHash: true
Expand All @@ -20,5 +29,5 @@ generatorOptions:
configMapGenerator:
- name: kfserving-config
behavior: replace
envs:
envs:
- params.env
6 changes: 6 additions & 0 deletions config/overlays/kubeflow/namespace-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Remove namespace resource as namespace will already exist.
$patch: delete
apiVersion: v1
kind: Namespace
metadata:
name: kfserving-system
10 changes: 10 additions & 0 deletions config/overlays/kubeflow/statefulset-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: kfserving-controller-manager
namespace: kfserving-system
spec:
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"

0 comments on commit 0b9fde1

Please sign in to comment.