kustomize

This commit is contained in:
Steinkirch 2020-04-06 17:23:26 -07:00
parent ae72757665
commit aa0e248a45
330 changed files with 27690 additions and 0 deletions

View file

@ -0,0 +1,28 @@
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
labels:
app: tf-job-dashboard
name: tf-job-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tf-job-dashboard
subjects:
- kind: ServiceAccount
name: tf-job-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
labels:
app: tf-job-operator
name: tf-job-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tf-job-operator
subjects:
- kind: ServiceAccount
name: tf-job-operator

View file

@ -0,0 +1,106 @@
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
labels:
app: tf-job-dashboard
name: tf-job-dashboard
rules:
- apiGroups:
- tensorflow.org
- kubeflow.org
resources:
- tfjobs
- tfjobs/status
verbs:
- '*'
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- '*'
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- '*'
- apiGroups:
- batch
resources:
- jobs
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- pods
- services
- endpoints
- persistentvolumeclaims
- events
- pods/log
- namespaces
verbs:
- '*'
- apiGroups:
- apps
- extensions
resources:
- deployments
verbs:
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
labels:
app: tf-job-operator
name: tf-job-operator
rules:
- apiGroups:
- tensorflow.org
- kubeflow.org
resources:
- tfjobs
- tfjobs/status
verbs:
- '*'
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- '*'
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- '*'
- apiGroups:
- batch
resources:
- jobs
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- pods
- services
- endpoints
- persistentvolumeclaims
- events
verbs:
- '*'
- apiGroups:
- apps
- extensions
resources:
- deployments
verbs:
- '*'

View file

@ -0,0 +1,9 @@
apiVersion: v1
data:
controller_config_file.yaml: |-
{
"grpcServerFilePath": "/opt/mlkube/grpc_tensorflow_server/grpc_tensorflow_server.py"
}
kind: ConfigMap
metadata:
name: tf-job-operator-config

View file

@ -0,0 +1,51 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: tfjobs.kubeflow.org
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[-1:].type
name: State
type: string
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
group: kubeflow.org
names:
kind: TFJob
plural: tfjobs
singular: tfjob
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
properties:
spec:
properties:
tfReplicaSpecs:
properties:
Chief:
properties:
replicas:
maximum: 1
minimum: 1
type: integer
PS:
properties:
replicas:
minimum: 1
type: integer
Worker:
properties:
replicas:
minimum: 1
type: integer
version: v1
versions:
- name: v1
served: true
storage: true
- name: v1beta2
served: true
storage: false

View file

@ -0,0 +1,60 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: tf-job-dashboard
spec:
template:
metadata:
labels:
name: tf-job-dashboard
spec:
containers:
- command:
- /opt/tensorflow_k8s/dashboard/backend
env:
- name: KUBEFLOW_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: gcr.io/kubeflow-images-public/tf_operator:v0.6.0.rc0
name: tf-job-dashboard
ports:
- containerPort: 8080
serviceAccountName: tf-job-dashboard
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: tf-job-operator
spec:
replicas: 1
template:
metadata:
labels:
name: tf-job-operator
spec:
containers:
- command:
- /opt/kubeflow/tf-operator.v1
- --alsologtostderr
- -v=1
- --monitoring-port=8443
env:
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
image: gcr.io/kubeflow-images-public/tf_operator:v0.6.0.rc0
name: tf-job-operator
volumeMounts:
- mountPath: /etc/config
name: config-volume
serviceAccountName: tf-job-operator
volumes:
- configMap:
name: tf-job-operator-config
name: config-volume

View file

@ -0,0 +1,33 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow
resources:
- cluster-role-binding.yaml
- cluster-role.yaml
- config-map.yaml
- crd.yaml
- deployment.yaml
- service-account.yaml
- service.yaml
commonLabels:
kustomize.component: tf-job-operator
configMapGenerator:
- name: parameters
env: params.env
vars:
- name: namespace
objref:
kind: Service
name: tf-job-dashboard
apiVersion: v1
fieldref:
fieldpath: metadata.namespace
- name: clusterDomain
objref:
kind: ConfigMap
name: parameters
apiVersion: v1
fieldref:
fieldpath: data.clusterDomain
configurations:
- params.yaml

View file

@ -0,0 +1,2 @@
namespace=kubeflow
clusterDomain=cluster.local

View file

@ -0,0 +1,3 @@
varReference:
- path: metadata/annotations/getambassador.io\/config
kind: Service

View file

@ -0,0 +1,14 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: tf-job-dashboard
name: tf-job-dashboard
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: tf-job-operator
name: tf-job-operator

View file

@ -0,0 +1,39 @@
apiVersion: v1
kind: Service
metadata:
annotations:
getambassador.io/config: |-
---
apiVersion: ambassador/v0
kind: Mapping
name: tfjobs-ui-mapping
prefix: /tfjobs/
rewrite: /tfjobs/
service: tf-job-dashboard.$(namespace)
name: tf-job-dashboard
spec:
ports:
- port: 80
targetPort: 8080
selector:
name: tf-job-dashboard
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/scrape: "true"
prometheus.io/port: "8443"
labels:
app: tf-job-operator
name: tf-job-operator
spec:
ports:
- name: monitoring-port
port: 8443
targetPort: 8443
selector:
name: tf-job-operator
type: ClusterIP

View file

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
bases:
- base
configurations:
- overlays/istio/params.yaml
kind: Kustomization
namespace: kubeflow
resources:
- overlays/istio/virtual-service.yaml

View file

@ -0,0 +1,44 @@
apiVersion: app.k8s.io/v1beta1
kind: Application
metadata:
name: "application"
spec:
selector:
matchLabels:
app.kubernetes.io/name: tf-job-operator
app.kubernetes.io/instance: tf-job-operator
app.kubernetes.io/managed-by: kfctl
app.kubernetes.io/component: tfjob
app.kubernetes.io/part-of: kubeflow
app.kubernetes.io/version: v0.6
componentKinds:
- group: core
kind: Service
- group: apps
kind: Deployment
- group: core
kind: ConfigMap
- group: core
kind: ServiceAccount
- group: kubeflow.org
kind: TFJob
descriptor:
type: "tf-job-operator"
version: "v1"
description: "Tf-operator allows users to create and manage the \"TFJob\" custom resource."
maintainers:
- name: Richard Liu
email: ricliu@google.com
owners:
- name: Richard Liu
email: ricliu@google.com
keywords:
- "tfjob"
- "tf-operator"
- "tf-training"
links:
- description: About
url: "https://github.com/kubeflow/tf-operator"
- description: Docs
url: "https://www.kubeflow.org/docs/reference/tfjob/v1/tensorflow/"
addOwnerRef: true

View file

@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base
resources:
- application.yaml
commonLabels:
app.kubernetes.io/name: tf-job-operator
app.kubernetes.io/instance: tf-job-operator
app.kubernetes.io/managed-by: kfctl
app.kubernetes.io/component: tfjob
app.kubernetes.io/part-of: kubeflow
app.kubernetes.io/version: v0.6

View file

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base
resources:
- virtual-service.yaml
configurations:
- params.yaml

View file

@ -0,0 +1,3 @@
varReference:
- path: spec/http/route/destination/host
kind: VirtualService

View file

@ -0,0 +1,20 @@
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: tf-job-dashboard
spec:
gateways:
- kubeflow-gateway
hosts:
- '*'
http:
- match:
- uri:
prefix: /tfjobs/
rewrite:
uri: /tfjobs/
route:
- destination:
host: tf-job-dashboard.$(namespace).svc.$(clusterDomain)
port:
number: 80