mirror of
https://github.com/autistic-symposium/ml-quantum-tensorflow-py.git
synced 2025-08-13 16:35:23 -04:00
kustomize
This commit is contained in:
parent
ae72757665
commit
aa0e248a45
330 changed files with 27690 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: cluster-role-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: cluster-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: service-account
|
|
@ -0,0 +1,41 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: cluster-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- create
|
||||
- delete
|
||||
- apiGroups:
|
||||
- kubeflow.org
|
||||
resources:
|
||||
- notebooks
|
||||
- poddefaults
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- create
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- storageclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
143
kubeflow/kfapp/kustomize/jupyter-web-app/base/config-map.yaml
Normal file
143
kubeflow/kfapp/kustomize/jupyter-web-app/base/config-map.yaml
Normal file
|
@ -0,0 +1,143 @@
|
|||
apiVersion: v1
|
||||
data:
|
||||
spawner_ui_config.yaml: |
|
||||
# Configuration file for the Jupyter UI.
|
||||
#
|
||||
# Each Jupyter UI option is configured by two keys: 'value' and 'readOnly'
|
||||
# - The 'value' key contains the default value
|
||||
# - The 'readOnly' key determines if the option will be available to users
|
||||
#
|
||||
# If the 'readOnly' key is present and set to 'true', the respective option
|
||||
# will be disabled for users and only set by the admin. Also when a
|
||||
# Notebook is POSTED to the API if a necessary field is not present then
|
||||
# the value from the config will be used.
|
||||
#
|
||||
# If the 'readOnly' key is missing (defaults to 'false'), the respective option
|
||||
# will be available for users to edit.
|
||||
#
|
||||
# Note that some values can be templated. Such values are the names of the
|
||||
# Volumes as well as their StorageClass
|
||||
spawnerFormDefaults:
|
||||
image:
|
||||
# The container Image for the user's Jupyter Notebook
|
||||
# If readonly, this value must be a member of the list below
|
||||
value: gcr.io/kubeflow-images-public/tensorflow-1.13.1-notebook-cpu:v0.5.0
|
||||
# The list of available standard container Images
|
||||
options:
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.5.1-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.5.1-notebook-gpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.6.0-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.6.0-notebook-gpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.7.0-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.7.0-notebook-gpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.8.0-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.8.0-notebook-gpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.9.0-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.9.0-notebook-gpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.10.1-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.10.1-notebook-gpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.11.0-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.11.0-notebook-gpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.12.0-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.12.0-notebook-gpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.13.1-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-1.13.1-notebook-gpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-2.0.0a-notebook-cpu:v0.5.0
|
||||
- gcr.io/kubeflow-images-public/tensorflow-2.0.0a-notebook-gpu:v0.5.0
|
||||
# By default, custom container Images are allowed
|
||||
# Uncomment the following line to only enable standard container Images
|
||||
readOnly: false
|
||||
cpu:
|
||||
# CPU for user's Notebook
|
||||
value: '0.5'
|
||||
readOnly: false
|
||||
memory:
|
||||
# Memory for user's Notebook
|
||||
value: 1.0Gi
|
||||
readOnly: false
|
||||
workspaceVolume:
|
||||
# Workspace Volume to be attached to user's Notebook
|
||||
# Each Workspace Volume is declared with the following attributes:
|
||||
# Type, Name, Size, MountPath and Access Mode
|
||||
value:
|
||||
type:
|
||||
# The Type of the Workspace Volume
|
||||
# Supported values: 'New', 'Existing'
|
||||
value: New
|
||||
name:
|
||||
# The Name of the Workspace Volume
|
||||
# Note that this is a templated value. Special values:
|
||||
# {notebook-name}: Replaced with the name of the Notebook. The frontend
|
||||
# will replace this value as the user types the name
|
||||
value: 'workspace-{notebook-name}'
|
||||
size:
|
||||
# The Size of the Workspace Volume (in Gi)
|
||||
value: '10Gi'
|
||||
mountPath:
|
||||
# The Path that the Workspace Volume will be mounted
|
||||
value: /home/jovyan
|
||||
accessModes:
|
||||
# The Access Mode of the Workspace Volume
|
||||
# Supported values: 'ReadWriteOnce', 'ReadWriteMany', 'ReadOnlyMany'
|
||||
value: ReadWriteOnce
|
||||
class:
|
||||
# The StrageClass the PVC will use if type is New. Special values are:
|
||||
# {none}: default StorageClass
|
||||
# {empty}: empty string ""
|
||||
value: '{none}'
|
||||
readOnly: false
|
||||
dataVolumes:
|
||||
# List of additional Data Volumes to be attached to the user's Notebook
|
||||
value: []
|
||||
# Each Data Volume is declared with the following attributes:
|
||||
# Type, Name, Size, MountPath and Access Mode
|
||||
#
|
||||
# For example, a list with 2 Data Volumes:
|
||||
# value:
|
||||
# - value:
|
||||
# type:
|
||||
# value: New
|
||||
# name:
|
||||
# value: '{notebook-name}-vol-1'
|
||||
# size:
|
||||
# value: '10Gi'
|
||||
# class:
|
||||
# value: standard
|
||||
# mountPath:
|
||||
# value: /home/jovyan/vol-1
|
||||
# accessModes:
|
||||
# value: ReadWriteOnce
|
||||
# class:
|
||||
# value: {none}
|
||||
# - value:
|
||||
# type:
|
||||
# value: New
|
||||
# name:
|
||||
# value: '{notebook-name}-vol-2'
|
||||
# size:
|
||||
# value: '10Gi'
|
||||
# mountPath:
|
||||
# value: /home/jovyan/vol-2
|
||||
# accessModes:
|
||||
# value: ReadWriteMany
|
||||
# class:
|
||||
# value: {none}
|
||||
readOnly: false
|
||||
extraResources:
|
||||
# Extra Resource Limits for user's Notebook
|
||||
# e.x. "{'nvidia.com/gpu': 2}"
|
||||
value: "{}"
|
||||
readOnly: false
|
||||
shm:
|
||||
value: true
|
||||
readOnly: false
|
||||
configurations:
|
||||
# List of labels to be selected, these are the labels from PodDefaults
|
||||
# value:
|
||||
# - add-gcp-secret
|
||||
# - default-editor
|
||||
value: []
|
||||
readOnly: false
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: config
|
|
@ -0,0 +1,37 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: ROK_SECRET_NAME
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: parameters
|
||||
key: ROK_SECRET_NAME
|
||||
- name: UI
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: parameters
|
||||
key: UI
|
||||
- name: USERID_HEADER
|
||||
value: $(userid-header)
|
||||
- name: USERID_PREFIX
|
||||
value: $(userid-prefix)
|
||||
image: gcr.io/kubeflow-images-public/jupyter-web-app:v0.5.0
|
||||
imagePullPolicy: $(policy)
|
||||
name: jupyter-web-app
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
volumeMounts:
|
||||
- mountPath: /etc/config
|
||||
name: config-volume
|
||||
serviceAccountName: service-account
|
||||
volumes:
|
||||
- configMap:
|
||||
name: config
|
||||
name: config-volume
|
|
@ -0,0 +1,70 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- cluster-role-binding.yaml
|
||||
- cluster-role.yaml
|
||||
- config-map.yaml
|
||||
- deployment.yaml
|
||||
- role-binding.yaml
|
||||
- role.yaml
|
||||
- service-account.yaml
|
||||
- service.yaml
|
||||
namePrefix: jupyter-web-app-
|
||||
namespace: kubeflow
|
||||
commonLabels:
|
||||
app: jupyter-web-app
|
||||
kustomize.component: jupyter-web-app
|
||||
images:
|
||||
- name: gcr.io/kubeflow-images-public/jupyter-web-app
|
||||
newName: gcr.io/kubeflow-images-public/jupyter-web-app
|
||||
newTag: 9419d4d
|
||||
configMapGenerator:
|
||||
- name: parameters
|
||||
env: params.env
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
vars:
|
||||
- name: policy
|
||||
objref:
|
||||
kind: ConfigMap
|
||||
name: parameters
|
||||
apiVersion: v1
|
||||
fieldref:
|
||||
fieldpath: data.policy
|
||||
- name: prefix
|
||||
objref:
|
||||
kind: ConfigMap
|
||||
name: parameters
|
||||
apiVersion: v1
|
||||
fieldref:
|
||||
fieldpath: data.prefix
|
||||
- name: clusterDomain
|
||||
objref:
|
||||
kind: ConfigMap
|
||||
name: parameters
|
||||
apiVersion: v1
|
||||
fieldref:
|
||||
fieldpath: data.clusterDomain
|
||||
- name: namespace
|
||||
objref:
|
||||
kind: Service
|
||||
name: service
|
||||
apiVersion: v1
|
||||
fieldref:
|
||||
fieldpath: metadata.namespace
|
||||
- name: userid-header
|
||||
objref:
|
||||
kind: ConfigMap
|
||||
name: parameters
|
||||
apiVersion: v1
|
||||
fieldref:
|
||||
fieldpath: data.userid-header
|
||||
- name: userid-prefix
|
||||
objref:
|
||||
kind: ConfigMap
|
||||
name: parameters
|
||||
apiVersion: v1
|
||||
fieldref:
|
||||
fieldpath: data.userid-prefix
|
||||
configurations:
|
||||
- params.yaml
|
7
kubeflow/kfapp/kustomize/jupyter-web-app/base/params.env
Normal file
7
kubeflow/kfapp/kustomize/jupyter-web-app/base/params.env
Normal file
|
@ -0,0 +1,7 @@
|
|||
UI=default
|
||||
ROK_SECRET_NAME=secret-rok-{username}
|
||||
policy=Always
|
||||
prefix=jupyter
|
||||
clusterDomain=cluster.local
|
||||
userid-header=
|
||||
userid-prefix=
|
|
@ -0,0 +1,9 @@
|
|||
varReference:
|
||||
- path: spec/template/spec/containers/imagePullPolicy
|
||||
kind: Deployment
|
||||
- path: metadata/annotations/getambassador.io\/config
|
||||
kind: Service
|
||||
- path: spec/template/spec/containers/0/env/2/value
|
||||
kind: Deployment
|
||||
- path: spec/template/spec/containers/0/env/3/value
|
||||
kind: Deployment
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: jupyter-notebook-role-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: jupyter-notebook-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: jupyter-notebook
|
35
kubeflow/kfapp/kustomize/jupyter-web-app/base/role.yaml
Normal file
35
kubeflow/kfapp/kustomize/jupyter-web-app/base/role.yaml
Normal file
|
@ -0,0 +1,35 @@
|
|||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: jupyter-notebook-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/log
|
||||
- secrets
|
||||
- services
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
- apps
|
||||
- extensions
|
||||
resources:
|
||||
- deployments
|
||||
- replicasets
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- kubeflow.org
|
||||
resources:
|
||||
- '*'
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- jobs
|
||||
verbs:
|
||||
- '*'
|
|
@ -0,0 +1,4 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: service-account
|
23
kubeflow/kfapp/kustomize/jupyter-web-app/base/service.yaml
Normal file
23
kubeflow/kfapp/kustomize/jupyter-web-app/base/service.yaml
Normal file
|
@ -0,0 +1,23 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
getambassador.io/config: |-
|
||||
---
|
||||
apiVersion: ambassador/v0
|
||||
kind: Mapping
|
||||
name: webapp_mapping
|
||||
prefix: /$(prefix)/
|
||||
service: jupyter-web-app-service.$(namespace)
|
||||
add_request_headers:
|
||||
x-forwarded-prefix: /jupyter
|
||||
labels:
|
||||
run: jupyter-web-app
|
||||
name: service
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 5000
|
||||
type: ClusterIP
|
15
kubeflow/kfapp/kustomize/jupyter-web-app/kustomization.yaml
Normal file
15
kubeflow/kfapp/kustomize/jupyter-web-app/kustomization.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
bases:
|
||||
- base
|
||||
- overlays/istio
|
||||
commonLabels:
|
||||
app.kubernetes.io/component: jupyter
|
||||
app.kubernetes.io/instance: jupyter-web-app
|
||||
app.kubernetes.io/managed-by: kfctl
|
||||
app.kubernetes.io/name: jupyter-web-app
|
||||
app.kubernetes.io/part-of: kubeflow
|
||||
app.kubernetes.io/version: v0.6
|
||||
kind: Kustomization
|
||||
namespace: kubeflow
|
||||
resources:
|
||||
- overlays/application/application.yaml
|
|
@ -0,0 +1,47 @@
|
|||
apiVersion: app.k8s.io/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: jupyter-web-app
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: jupyter-web-app
|
||||
app.kubernetes.io/instance: jupyter-web-app
|
||||
app.kubernetes.io/managed-by: kfctl
|
||||
app.kubernetes.io/component: jupyter
|
||||
app.kubernetes.io/part-of: kubeflow
|
||||
app.kubernetes.io/version: v0.6
|
||||
componentKinds:
|
||||
- group: core
|
||||
kind: ConfigMap
|
||||
- group: apps
|
||||
kind: Deployment
|
||||
- group: rbac.authorization.k8s.io
|
||||
kind: RoleBinding
|
||||
- group: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
- group: core
|
||||
kind: ServiceAccount
|
||||
- group: networking.istio.io
|
||||
kind: VirtualService
|
||||
descriptor:
|
||||
type: jupyter-web-app
|
||||
version: v0.6.2
|
||||
description: Provides a UI which allows the user to create/conect/delete jupyter notebooks.
|
||||
maintainers:
|
||||
- name: Kimonas Sotirchos
|
||||
email: kimwnasptd@arrikto.com
|
||||
owners:
|
||||
- name: Kimonas Sotirchos
|
||||
email: kimwnasptd@arrikto.com
|
||||
keywords:
|
||||
- jupyterhub
|
||||
- jupyter ui
|
||||
- notebooks
|
||||
links:
|
||||
- description: About
|
||||
url: https://github.com/kubeflow/kubeflow/tree/master/components/jupyter-web-app
|
||||
- description: Docs
|
||||
url: https://www.kubeflow.org/docs/notebooks
|
||||
addOwnerRef: true
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
bases:
|
||||
- ../../base
|
||||
resources:
|
||||
- application.yaml
|
||||
commonLabels:
|
||||
app.kubernetes.io/name: jupyter-web-app
|
||||
app.kubernetes.io/instance: jupyter-web-app
|
||||
app.kubernetes.io/managed-by: kfctl
|
||||
app.kubernetes.io/component: jupyter
|
||||
app.kubernetes.io/part-of: kubeflow
|
||||
app.kubernetes.io/version: v0.6
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- virtual-service.yaml
|
||||
configurations:
|
||||
- params.yaml
|
|
@ -0,0 +1,3 @@
|
|||
varReference:
|
||||
- path: spec/http/route/destination/host
|
||||
kind: VirtualService
|
|
@ -0,0 +1,24 @@
|
|||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: jupyter-web-app
|
||||
spec:
|
||||
gateways:
|
||||
- kubeflow-gateway
|
||||
hosts:
|
||||
- '*'
|
||||
http:
|
||||
- headers:
|
||||
request:
|
||||
add:
|
||||
x-forwarded-prefix: /jupyter
|
||||
match:
|
||||
- uri:
|
||||
prefix: /jupyter/
|
||||
rewrite:
|
||||
uri: /
|
||||
route:
|
||||
- destination:
|
||||
host: jupyter-web-app-service.$(namespace).svc.$(clusterDomain)
|
||||
port:
|
||||
number: 80
|
Loading…
Add table
Add a link
Reference in a new issue