Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipelines kustomize v3 manifest #1248

Merged
merged 26 commits into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pipeline/cache/base_v3/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kubeflow-pipelines-cache-deployer-clusterrolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kubeflow-pipelines-cache-deployer-clusterrole
subjects:
- kind: ServiceAccount
name: kubeflow-pipelines-cache-deployer-sa
8 changes: 8 additions & 0 deletions pipeline/cache/base_v3/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../upstream/base/cache-deployer/cluster-scoped/cache-deployer-clusterrole.yaml
- cluster-role-binding.yaml
- ../../upstream/base/cache-deployer
- ../../upstream/base/cache
59 changes: 59 additions & 0 deletions pipeline/installs/generic/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../upstream/base/pipeline/cluster-scoped
- ../../upstream/base/pipeline
- virtual-service.yaml
- ../../metadata-writer/base_v3
- ../../cache/base_v3
images:
- name: gcr.io/ml-pipeline/api-server
newTag: 1.0.0-rc.1
- name: gcr.io/ml-pipeline/persistenceagent
newTag: 1.0.0-rc.1
- name: gcr.io/ml-pipeline/scheduledworkflow
newTag: 1.0.0-rc.1
- name: gcr.io/ml-pipeline/frontend
newTag: 1.0.0-rc.1
- name: gcr.io/ml-pipeline/viewer-crd-controller
newTag: 1.0.0-rc.1
- name: gcr.io/ml-pipeline/visualization-server
newTag: 1.0.0-rc.1
- name: gcr.io/ml-pipeline/metadata-writer
newTag: 1.0.0-rc.1
- name: gcr.io/ml-pipeline/cache-server
newTag: 1.0.0-rc.1
- name: gcr.io/ml-pipeline/cache-deployer
newTag: 1.0.0-rc.1
# Used by Kustomize
configMapGenerator:
- name: pipeline-install-config
env: params.env
secretGenerator:
- name: mysql-secret
env: params-db-secret.env
vars:
# TODO: replace BUCKET_NAME with a configmap value reference
- name: BUCKET_NAME
objref:
kind: ConfigMap
name: pipeline-install-config
apiVersion: v1
fieldref:
fieldpath: data.bucketName
- name: KFP_UI_NAMESPACE
objref:
kind: Service
name: ml-pipeline-ui
apiVersion: v1
fieldref:
fieldpath: metadata.namespace
- name: KFP_UI_SERVICE
objref:
kind: Service
name: ml-pipeline-ui
apiVersion: v1
fieldref:
fieldpath: metadata.name
configurations:
- params.yaml
2 changes: 2 additions & 0 deletions pipeline/installs/generic/params-db-secret.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
username=root
password=
1 change: 1 addition & 0 deletions pipeline/installs/generic/params.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bucketName=mlpipeline
3 changes: 3 additions & 0 deletions pipeline/installs/generic/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
varReference:
- path: spec/http/route/destination/host
kind: VirtualService
21 changes: 21 additions & 0 deletions pipeline/installs/generic/virtual-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: ml-pipeline-ui
spec:
gateways:
- kubeflow-gateway
hosts:
- '*'
http:
- match:
- uri:
prefix: /pipeline
rewrite:
uri: /pipeline
route:
- destination:
host: $(KFP_UI_SERVICE).$(KFP_UI_NAMESPACE).svc.$(clusterDomain)
port:
number: 80
timeout: 300s
8 changes: 8 additions & 0 deletions pipeline/metadata-writer/base_v3/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../upstream/base/metadata/metadata-writer-deployment.yaml
- ../../upstream/base/metadata/metadata-writer-role.yaml
- ../../upstream/base/metadata/metadata-writer-rolebinding.yaml
- ../../upstream/base/metadata/metadata-writer-sa.yaml
1 change: 1 addition & 0 deletions pipeline/mysql/installs/gcp-pd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ resources:
- ../../../upstream/env/platform-agnostic/mysql
- ../../overlays/application/application.yaml
- persistent-volume.yaml
- ../generic/configmap.yaml
patchesStrategicMerge:
- persistent-volume-claim.yaml
images:
Expand Down
10 changes: 10 additions & 0 deletions pipeline/mysql/installs/generic/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-configmap
data:
host: mysql
port: "3306"
mlmd_db: metadb
cache_db: cachedb
pipeline_db: mlpipeline
1 change: 1 addition & 0 deletions pipeline/mysql/installs/generic/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ commonLabels:
resources:
- ../../../upstream/env/platform-agnostic/mysql
- ../../overlays/application/application.yaml
- ./configmap.yaml
images:
- name: gcr.io/ml-pipeline/mysql
newTag: '5.6'
Expand Down
2 changes: 2 additions & 0 deletions stacks/generic/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ resources:
- ../../argo/base_v3
- ../../pipeline/minio/installs/generic
- ../../pipeline/mysql/installs/generic
- ../../pipeline/installs/generic
- ../../metadata/v3
# This package will create a profile resource so it needs to be installed after the profiles CR
- ../../default-install/base
configMapGenerator:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: scheduledworkflows.kubeflow.org
spec:
group: kubeflow.org
names:
kind: ScheduledWorkflow
listKind: ScheduledWorkflowList
plural: scheduledworkflows
shortNames:
- swf
singular: scheduledworkflow
scope: Namespaced
versions:
- name: v1beta1
served: true
storage: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: viewers.kubeflow.org
spec:
group: kubeflow.org
names:
kind: Viewer
listKind: ViewerList
plural: viewers
shortNames:
- vi
singular: viewer
scope: Namespaced
versions:
- name: v1beta1
served: true
storage: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: cache-deployer
name: cache-deployer-deployment
namespace: kubeflow
spec:
replicas: 1
selector:
matchLabels:
app: cache-deployer
strategy:
type: Recreate
template:
metadata:
labels:
app: cache-deployer
spec:
containers:
- env:
- name: NAMESPACE_TO_WATCH
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: gcr.io/ml-pipeline/cache-deployer:1.0.0-rc.1
imagePullPolicy: Always
name: main
restartPolicy: Always
serviceAccountName: kubeflow-pipelines-cache-deployer-sa
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: cache-server
name: cache-server
namespace: kubeflow
spec:
replicas: 1
selector:
matchLabels:
app: cache-server
template:
metadata:
labels:
app: cache-server
spec:
containers:
- args:
- --db_driver=$(DBCONFIG_DRIVER)
- --db_host=$(DBCONFIG_HOST_NAME)
- --db_port=$(DBCONFIG_PORT)
- --db_name=$(DBCONFIG_DB_NAME)
- --db_user=$(DBCONFIG_USER)
- --db_password=$(DBCONFIG_PASSWORD)
- --namespace_to_watch=$(NAMESPACE_TO_WATCH)
env:
- name: DBCONFIG_DRIVER
value: mysql
- name: DBCONFIG_DB_NAME
valueFrom:
configMapKeyRef:
key: cache_db
name: mysql-configmap
- name: DBCONFIG_HOST_NAME
valueFrom:
configMapKeyRef:
key: host
name: mysql-configmap
- name: DBCONFIG_PORT
valueFrom:
configMapKeyRef:
key: port
name: mysql-configmap
- name: DBCONFIG_USER
valueFrom:
secretKeyRef:
key: username
name: mysql-secret-fd5gktm75t
- name: DBCONFIG_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: mysql-secret-fd5gktm75t
- name: NAMESPACE_TO_WATCH
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: gcr.io/ml-pipeline/cache-server:1.0.0-rc.1
imagePullPolicy: Always
name: server
ports:
- containerPort: 8443
name: webhook-api
volumeMounts:
- mountPath: /etc/webhook/certs
name: webhook-tls-certs
readOnly: true
serviceAccountName: kubeflow-pipelines-cache
volumes:
- name: webhook-tls-certs
secret:
secretName: webhook-server-tls
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
component: db
kustomize.component: metadata
name: metadata-db
namespace: kubeflow
spec:
replicas: 1
selector:
matchLabels:
component: db
kustomize.component: metadata
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
labels:
component: db
kustomize.component: metadata
name: db
spec:
containers:
- args:
- --datadir
- /var/lib/mysql/datadir
envFrom:
- configMapRef:
name: metadata-db-parameters
- secretRef:
name: metadata-db-secrets
image: mysql:8.0.3
name: db-container
ports:
- containerPort: 3306
name: dbapi
readinessProbe:
exec:
command:
- /bin/bash
- -c
- mysql -D $$MYSQL_DATABASE -p$$MYSQL_ROOT_PASSWORD -e 'SELECT 1'
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 1
volumeMounts:
- mountPath: /var/lib/mysql
name: metadata-mysql
volumes:
- name: metadata-mysql
persistentVolumeClaim:
claimName: metadata-mysql
Loading