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

Trim sandbox #727

Merged
merged 12 commits into from
Feb 15, 2021
Merged
11,609 changes: 1,769 additions & 9,840 deletions deployment/sandbox/flyte_generated.yaml

Large diffs are not rendered by default.

114 changes: 71 additions & 43 deletions kustomize/overlays/sandbox/admin/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,75 @@ spec:
template:
spec:
volumes:
- name: resource-templates
configMap:
name: clusterresource-template
- name: resource-templates
configMap:
name: clusterresource-template
initContainers:
- name: check-db-ready
image: postgres:10.1
command: ['sh', '-c',
'until pg_isready -h postgres -p 5432;
do echo waiting for database; sleep 2; done;']
- name: run-migrations
image: flyteadmin:v0.3.29
imagePullPolicy: IfNotPresent
command: ["flyteadmin", "--logtostderr", "--config", "/etc/flyte/config/*.yaml",
"migrate", "run"]
volumeMounts:
- name: config-volume
mountPath: /etc/flyte/config
- name: seed-projects
image: flyteadmin:v0.3.29
imagePullPolicy: IfNotPresent
command: ["flyteadmin", "--logtostderr", "--config", "/etc/flyte/config/*.yaml",
"migrate", "seed-projects", "flytesnacks", "flytetester", "flyteexamples"]
volumeMounts:
- name: config-volume
mountPath: /etc/flyte/config
- name: sync-cluster-resources
image: flyteadmin:v0.3.29
imagePullPolicy: IfNotPresent
command: ["flyteadmin", "--logtostderr", "--config", "/etc/flyte/config/*.yaml", "clusterresource", "sync"]
volumeMounts:
- name: resource-templates
mountPath: /etc/flyte/clusterresource/templates
- name: config-volume
mountPath: /etc/flyte/config
- name: check-db-ready
image: postgres:10.16-alpine
EngHabu marked this conversation as resolved.
Show resolved Hide resolved
command: [
"sh",
"-c",
"until pg_isready -h postgres -p 5432;
do echo waiting for database; sleep 2; done;",
]
- name: run-migrations
image: flyteadmin:v0.3.29
imagePullPolicy: IfNotPresent
command:
[
"flyteadmin",
"--logtostderr",
"--config",
"/etc/flyte/config/*.yaml",
"migrate",
"run",
]
volumeMounts:
- name: config-volume
mountPath: /etc/flyte/config
- name: seed-projects
image: flyteadmin:v0.3.29
imagePullPolicy: IfNotPresent
command:
[
"flyteadmin",
"--logtostderr",
"--config",
"/etc/flyte/config/*.yaml",
"migrate",
"seed-projects",
"flytesnacks",
"flytetester",
"flyteexamples",
EngHabu marked this conversation as resolved.
Show resolved Hide resolved
]
volumeMounts:
- name: config-volume
mountPath: /etc/flyte/config
- name: sync-cluster-resources
image: flyteadmin:v0.3.29
imagePullPolicy: IfNotPresent
command:
[
"flyteadmin",
"--logtostderr",
"--config",
"/etc/flyte/config/*.yaml",
"clusterresource",
"sync",
]
volumeMounts:
- name: resource-templates
mountPath: /etc/flyte/clusterresource/templates
- name: config-volume
mountPath: /etc/flyte/config
containers:
- name: flyteadmin
resources:
limits:
memory: "200Mi"
cpu: "0.1"
ephemeral-storage: "100Mi"
- name: flyteadmin
resources:
limits:
memory: "200Mi"
cpu: "0.1"
ephemeral-storage: "100Mi"
---
apiVersion: v1
kind: Service
Expand All @@ -56,7 +84,7 @@ metadata:
namespace: flyte
spec:
ports:
- name: redoc
protocol: TCP
port: 87
targetPort: 8087
- name: redoc
protocol: TCP
port: 87
targetPort: 8087
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ tasks:
enabled-plugins:
- container
- sidecar
- spark
- k8s-array
- pytorch
default-for-task-types:
container: container
sidecar: sidecar
spark: spark
container_array: k8s-array
pytorch: pytorch
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
propeller:
resourcemanager:
type: noop
37 changes: 20 additions & 17 deletions kustomize/overlays/sandbox/dependencies/database/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,25 @@ spec:
- name: postgres-storage
emptyDir: {}
containers:
- image: "postgres:10.1"
name: postgres
ports:
- containerPort: 5432
- image: "postgres:10.16-alpine"
name: postgres
volumeMounts:
- name: postgres-storage
mountPath: /var/lib/postgresql/data
env:
- name: POSTGRES_HOST_AUTH_METHOD
value: trust
ports:
- containerPort: 5432
name: postgres
volumeMounts:
- name: postgres-storage
mountPath: /var/lib/postgresql/data
---
apiVersion: v1
kind: Service
metadata:
name: postgres
namespace: flyte
spec:
ports:
- port: 5432
selector:
app: postgres
apiVersion: v1
kind: Service
metadata:
name: postgres
namespace: flyte
spec:
ports:
- port: 5432
selector:
app: postgres
9 changes: 2 additions & 7 deletions kustomize/overlays/sandbox/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ bases:
# Contour is used to create ingress. On cloud service use the default provided ingress controllers or cloud LB's
# Add node ports for ease of use locally
resources:
- ../../base/operators/spark
- ../../base/operators/kfoperators/pytorch
- ./dependencies/database
- ./dependencies/storage
- ./dependencies/redis
- ./dependencies/contour_ingress_controller
EngHabu marked this conversation as resolved.
Show resolved Hide resolved
- ./dependencies/nodeport-services.yaml
- ../../base/namespace
EngHabu marked this conversation as resolved.
Show resolved Hide resolved

patchesStrategicMerge:
- admin/deployment.yaml
Expand All @@ -38,16 +36,13 @@ configMapGenerator:
- behavior: merge
files:
- ./config/clusterresource-templates/ac_project-copilot-dataconfig.yaml
- ./config/clusterresource-templates/ad_spark-role.yaml
- ./config/clusterresource-templates/ae_spark-service-account.yaml
- ./config/clusterresource-templates/af_spark-role-binding.yaml
name: clusterresource-template
- behavior: merge
files:
- ./config/propeller/enabled_plugins.yaml
- ./config/propeller/resource_manager.yaml
- ./config/propeller/plugins/k8s.yaml
- ./config/propeller/plugins/qubole.yaml
EngHabu marked this conversation as resolved.
Show resolved Hide resolved
- ./config/propeller/plugins/spark.yaml
- ./config/propeller/plugins/task_logs.yaml
- ./config/common/storage.yaml
- ./config/common/logger.yaml
Expand Down
78 changes: 38 additions & 40 deletions kustomize/overlays/test/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,57 @@ kind: Kustomization
namespace: flyte

bases:
- ../../base/single_cluster/headless

- ../../base/single_cluster/headless

# All the resources that make up the deployment
resources:
#############
# Dependencies to be configured
- ./dependencies/database
- ./dependencies/database
# In local we use minio, but in cloud environment use S3 / GCS / AFS / Oracle Blob store etc
- ./dependencies/storage
# This is used for Resource pooling. On cloud you can use hosted redis (e.g. AWS elasticache)
- ./dependencies/redis
# Contour is used to create ingress. On cloud service use the default provided ingress controllers or cloud LB's
- ./dependencies/contour_ingress_controller
- ./dependencies/storage
# This is used for Resource pooling. On cloud you can use hosted redis (e.g. AWS elasticache)
- ./dependencies/redis
# Contour is used to create ingress. On cloud service use the default provided ingress controllers or cloud LB's
- ./dependencies/contour_ingress_controller

patches:
- ./admin/deployment.yaml

configMapGenerator:
# the main admin configmap
- name: flyte-admin-config
behavior: merge
files:
- ./config/admin/db.yaml
- ./config/common/storage.yaml
- ./config/common/logger.yaml

# cluster resource templates
- name: clusterresource-template
behavior: merge
files:
# Files are read in alphabetical order. To ensure that we create the namespace first, prefix the file name with "aa".
- ./config/clusterresource-templates/ac_project-copilot-dataconfig.yaml
# the main admin configmap
- name: flyte-admin-config
behavior: merge
files:
- ./config/admin/db.yaml
- ./config/common/storage.yaml
- ./config/common/logger.yaml
# cluster resource templates
- name: clusterresource-template
behavior: merge
files:
# Files are read in alphabetical order. To ensure that we create the namespace first, prefix the file name with "aa".
- ./config/clusterresource-templates/ac_project-copilot-dataconfig.yaml

# Flyte Propeller Configuration
- name: flyte-propeller-config
behavior: merge
files:
- ./config/propeller/plugins/k8s.yaml
- ./config/common/storage.yaml
- ./config/common/logger.yaml
# Flyte Propeller Configuration
- name: flyte-propeller-config
behavior: merge
files:
- ./config/propeller/plugins/k8s.yaml
- ./config/common/storage.yaml
- ./config/common/logger.yaml

# TODO Flyte Console Configuration
#- name: flyte-console-config
# files:
# - ./config/console.yaml
# TODO Flyte Console Configuration
#- name: flyte-console-config
# files:
# - ./config/console.yaml

- name: datacatalog-config
behavior: merge
files:
- ./config/datacatalog/db.yaml
- ./config/common/storage.yaml
- ./config/common/logger.yaml
- name: datacatalog-config
behavior: merge
files:
- ./config/datacatalog/db.yaml
- ./config/common/storage.yaml
- ./config/common/logger.yaml

# Images that should be used
images:
Expand All @@ -68,7 +66,7 @@ images:
# FlyteConsole
- name: flyteconsole # match images with this name
newTag: v0.19.1 # override the tag
newName: ghcr.io/lyft/flyteconsole # override the namep
newName: ghcr.io/lyft/flyteconsole # override the namep
# Flyte DataCatalog
- name: datacatalog # match images with this name
newTag: v0.2.130 # override the tag
Expand Down