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

[pr-into-pr] Ignore - new dummy service #4096

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ FROM --platform=${BUILDPLATFORM} golang:1.19.1-bullseye AS flytebuilder
ARG TARGETARCH
ENV GOARCH "${TARGETARCH}"
ENV GOOS linux

WORKDIR /flyteorg/build

COPY datacatalog datacatalog
Expand All @@ -20,6 +19,7 @@ COPY flytestdlib flytestdlib

COPY go.mod go.sum ./
RUN go mod download

COPY cmd cmd
COPY --from=flyteconsole /app/ cmd/single/dist
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/go/pkg/mod \
Expand Down
7 changes: 5 additions & 2 deletions charts/flyte-sandbox/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 12.1.9
digest: sha256:e7155e540bbdb98f690eb12e2bd301a19d8b36833336f6991410cb44d8d9bb5e
generated: "2023-03-31T09:25:07.80904-07:00"
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 17.15.6
digest: sha256:1bcc5f102768a19c19d444b3460dabd0f90847b2d4423134f0ce9c7aa0a256ea
generated: "2023-08-31T16:46:00.478623-07:00"
4 changes: 4 additions & 0 deletions charts/flyte-sandbox/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ dependencies:
version: 12.1.9
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: redis
version: 17.15.6
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
8 changes: 8 additions & 0 deletions charts/flyte-sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ A Helm chart for the Flyte local sandbox
| file://../flyte-binary | flyte-binary | v0.1.10 |
| https://charts.bitnami.com/bitnami | minio | 12.1.1 |
| https://charts.bitnami.com/bitnami | postgresql | 12.1.9 |
| https://charts.bitnami.com/bitnami | redis | 18.0.1 |
| https://helm.twun.io/ | docker-registry | 2.2.2 |
| https://kubernetes.github.io/dashboard/ | kubernetes-dashboard | 6.0.0 |

Expand Down Expand Up @@ -100,6 +101,13 @@ A Helm chart for the Flyte local sandbox
| postgresql.volumePermissions.enabled | bool | `true` | |
| postgresql.volumePermissions.image.pullPolicy | string | `"Never"` | |
| postgresql.volumePermissions.image.tag | string | `"sandbox"` | |
| redis.auth.enabled | bool | `false` | |
| redis.enabled | bool | `true` | |
| redis.image.pullPolicy | string | `"Never"` | |
| redis.image.tag | string | `"sandbox"` | |
| redis.master.service.nodePorts.redis | int | `30004` | |
| redis.master.service.type | string | `"NodePort"` | |
| redis.replica.replicaCount | int | `0` | |
| sandbox.buildkit.enabled | bool | `true` | |
| sandbox.buildkit.image.pullPolicy | string | `"Never"` | |
| sandbox.buildkit.image.repository | string | `"moby/buildkit"` | |
Expand Down
36 changes: 36 additions & 0 deletions charts/flyte-sandbox/templates/artifacts/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: artifact-service
name: artifact-service
spec:
replicas: 1
selector:
matchLabels:
app: artifact-service
template:
metadata:
labels:
app: artifact-service
spec:
containers:
- name: main
image: ghcr.io/unionai/artifacts:sandbox
env:
- name: DATABASE_URL
value: postgresql://postgres:[email protected]:5432/postgres
- name: REDIS_HOST
value: flyte-sandbox-redis-headless.flyte.svc.cluster.local
- name: REDIS_PORT
value: "6379"
ports:
- name: grpc
containerPort: 50051
livenessProbe:
initialDelaySeconds: 30
tcpSocket:
port: grpc
readinessProbe:
tcpSocket:
port: grpc
14 changes: 14 additions & 0 deletions charts/flyte-sandbox/templates/artifacts/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: artifact-service
labels:
app: artifact-service
spec:
ports:
- name: grpc
port: 50051
targetPort: 50051
selector:
app: artifact-service
type: ClusterIP
18 changes: 18 additions & 0 deletions charts/flyte-sandbox/templates/proxy/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ data:
prefix: "/flyteidl.service.SignalService"
route:
cluster: flyte_grpc
- match:
prefix: "/flyteidl.artifact.ArtifactRegistry"
route:
cluster: artifact
{{- end }}
{{- if index .Values "kubernetes-dashboard" "enabled" }}
- match:
Expand Down Expand Up @@ -203,5 +207,19 @@ data:
address: {{ .Release.Name }}-minio
port_value: 9001
{{- end }}
- name: artifact
connect_timeout: 0.25s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
http2_protocol_options: {}
load_assignment:
cluster_name: artifact
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: artifact-service
port_value: 50051

{{- end }}
27 changes: 26 additions & 1 deletion charts/flyte-sandbox/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,23 @@ flyte-binary:
accessKey: minio
secretKey: miniostorage
logging:
level: 6
level: 5
plugins:
kubernetes:
enabled: true
templateUri: |-
http://localhost:30080/kubernetes-dashboard/#/log/{{.namespace }}/{{ .podName }}/pod?namespace={{ .namespace }}
inline:
cloudEvents:
enable: true
transformToCloudEvents: true
type: redis
redis:
addr: "flyte-sandbox-redis-headless.flyte.svc.cluster.local:6379"
artifacts:
host: artifact-service.flyte.svc.cluster.local
port: 50051
insecure: true
task_resources:
defaults:
cpu: 500m
Expand Down Expand Up @@ -149,6 +159,21 @@ postgresql:
tag: sandbox
pullPolicy: Never

redis:
enabled: true
image:
tag: sandbox
pullPolicy: Never
auth:
enabled: false
master:
service:
type: NodePort
nodePorts:
redis: 30004
replica:
replicaCount: 0

sandbox:
# dev Routes requests to an instance of Flyte running locally on a developer's
# development environment. This is only usable if the flyte-binary chart is disabled.
Expand Down
15 changes: 13 additions & 2 deletions docker/sandbox-bundled/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
define FLYTE_BINARY_BUILD
mkdir -p images/tar/$(1)

docker buildx build \
docker buildx build --ssh default \
--build-arg FLYTECONSOLE_VERSION=$(FLYTECONSOLE_VERSION) \
--platform linux/$(1) \
--tag flyte-binary:sandbox \
Expand Down Expand Up @@ -35,9 +35,20 @@ build: flyte manifests
--driver docker-container --driver-opt image=moby/buildkit:master \
--buildkitd-flags '--allow-insecure-entitlement security.insecure' \
--platform linux/arm64,linux/amd64
docker buildx build --builder flyte-sandbox --allow security.insecure --load \
docker buildx build --ssh default --builder flyte-sandbox --allow security.insecure --load \
--tag flyte-sandbox:latest .

# This is here because we want to be able to push locally, not depend on GH actions
.PHONY: build_push
build_push: flyte manifests
[ -n "$(shell docker buildx ls | awk '/^flyte-sandbox / {print $$1}')" ] || \
docker buildx create --name flyte-sandbox \
--driver docker-container --driver-opt image=moby/buildkit:master \
--buildkitd-flags '--allow-insecure-entitlement security.insecure' \
--platform linux/arm64,linux/amd64
docker buildx build --ssh default --builder flyte-sandbox --allow security.insecure --push \
--tag ghcr.io/flyteorg/flyte-sandbox:a_v0.1.1 .

# Port map
# 6443 - k8s API server
# 30000 - Docker Registry
Expand Down
1 change: 1 addition & 0 deletions docker/sandbox-bundled/images/manifest.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
docker.io/bitnami/bitnami-shell:sandbox=bitnami/bitnami-shell:11-debian-11-r76
docker.io/bitnami/minio:sandbox=bitnami/minio:2023.1.25-debian-11-r0
docker.io/bitnami/postgresql:sandbox=bitnami/postgresql:15.1.0-debian-11-r20
docker.io/bitnami/redis:sandbox=bitnami/redis:7.2.0-debian-11-r3
docker.io/envoyproxy/envoy:sandbox=envoyproxy/envoy:v1.23-latest
docker.io/kubernetesui/dashboard:sandbox=kubernetesui/dashboard:v2.7.0
docker.io/library/registry:sandbox=registry:2.8.1
Expand Down
Loading
Loading