Skip to content

Commit

Permalink
fix charts
Browse files Browse the repository at this point in the history
  • Loading branch information
yashgorana committed Jun 30, 2024
1 parent e95af15 commit c2ab102
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 180 deletions.
126 changes: 61 additions & 65 deletions packages/grid/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ images:
context: ./seaweedfs
tags:
- dev-${DEVSPACE_TIMESTAMP}
rathole:
image: "${CONTAINER_REGISTRY}/${DOCKER_IMAGE_RATHOLE}"
buildKit:
args: ["--platform", "linux/${PLATFORM}"]
dockerfile: ./rathole/rathole.dockerfile
context: ./rathole
tags:
- dev-${DEVSPACE_TIMESTAMP}

# This is a list of `deployments` that DevSpace can create for this project
deployments:
Expand All @@ -76,20 +68,16 @@ deployments:
releaseName: syft-dev
chart:
name: ./helm/syft
# anything that does not need devspace $env vars should go in values.dev.yaml
valuesFiles:
- ./helm/syft/values.yaml
- ./helm/values.dev.yaml
# values that need to be templated go here
values:
global:
registry: ${CONTAINER_REGISTRY}
version: dev-${DEVSPACE_TIMESTAMP}
node:
type: domain # required for the gateway profile
rtunnel:
mode: client
proxy:
enabled: true # required for the gateway profile
node: {}
# anything that does not need templating should go in helm/examples/dev/base.yaml
# or profile specific values files
valuesFiles:
- ./helm/examples/dev/base.yaml

dev:
mongo:
Expand Down Expand Up @@ -127,95 +115,112 @@ dev:
- path: ../syft:/root/app/syft
ssh:
localPort: 3480
rathole:
labelSelector:
app.kubernetes.io/name: syft
app.kubernetes.io/component: rathole
ports:
- port: "2333" # reverse_tunnel

profiles:
- name: dev-low
- name: domain-low
description: "Deploy a low-side domain"
patches:
- op: add
path: deployments.syft.helm.values.node
value:
side: low
- name: dev-high

- name: domain-tunnel
description: "Deploy a domain with tunneling enabled"
patches:
# enable rathole image
- op: add
path: deployments.syft.helm.values.node
path: images
value:
side: high
rathole:
image: "${CONTAINER_REGISTRY}/${DOCKER_IMAGE_RATHOLE}"
buildKit:
args: ["--platform", "linux/${PLATFORM}"]
dockerfile: ./rathole/rathole.dockerfile
context: ./rathole
tags:
- dev-${DEVSPACE_TIMESTAMP}
# use rathole client-specific chart values
- op: add
path: deployments.syft.helm.valuesFiles
value: ./helm/examples/dev/domain.tunnel.yaml

- name: gateway
description: "Deploy a Gateway Node with tunnel enabled"
patches:
- op: replace
path: deployments.syft.helm.values.node.type
value: "gateway"
# enable rathole image
- op: add
path: images
value:
rathole:
image: "${CONTAINER_REGISTRY}/${DOCKER_IMAGE_RATHOLE}"
buildKit:
args: ["--platform", "linux/${PLATFORM}"]
dockerfile: ./rathole/rathole.dockerfile
context: ./rathole
tags:
- dev-${DEVSPACE_TIMESTAMP}
# enable rathole `devspace dev` config
- op: add
path: dev
value:
rathole:
labelSelector:
app.kubernetes.io/name: syft
app.kubernetes.io/component: rathole
ports:
- port: "2333"
# use gateway-specific chart values
- op: add
path: deployments.syft.helm.valuesFiles
value: ./helm/examples/dev/gateway.yaml
# remove unused images
- op: remove
path: images.seaweedfs
- op: remove
path: dev.seaweedfs

# Patch mode to server
- op: replace
path: deployments.syft.helm.values.rtunnel.mode
value: server

# Enable proxy for gateway
- op: replace
path: deployments.syft.helm.values.proxy.enabled
value: true

# Port Re-Mapping
# Mongo
- op: replace
path: dev.mongo.ports[0].port
value: 27018:27017

# Backend
- op: replace
path: dev.backend.ports[0].port
value: 5679:5678

# Backend Container SSH
- op: replace
path: dev.backend.containers.backend-container.ssh.localPort
value: 3481

# Reverse tunnel port
- op: replace
path: dev.rtunnel.ports[0].port
value: 2334:2333

- name: gcp
description: "Deploy a high-side domain on GCP"
patches:
- op: replace
path: deployments.syft.helm.valuesFiles
value:
- ./helm/examples/gcp/gcp.high.yaml

- name: gcp-low
description: "Deploy a low-side domain on GCP"
patches:
- op: replace
path: deployments.syft.helm.valuesFiles
value:
- ./helm/examples/gcp/gcp.low.yaml

- name: azure
description: "Deploy a high-side domain on AKS"
patches:
- op: replace
path: deployments.syft.helm.valuesFiles
value:
- ./helm/examples/azure/azure.high.yaml

- name: enclave
description: "Deploy an enclave node"
patches:
- op: replace
path: deployments.syft.helm.values.node.type
value: "enclave"

# enable image build for enclave-attestation
- op: add
path: images
value:
Expand All @@ -233,29 +238,20 @@ profiles:
enclave-attestation:
sync:
- path: ./enclave/attestation/server:/app/server

# use gateway-specific chart values
- op: add
path: deployments.syft.helm.values
value:
attestation:
enabled: true

path: deployments.syft.helm.valuesFiles
value: ./helm/examples/dev/enclave.yaml
# Port Re-Mapping
# Mongo
- op: replace
path: dev.mongo.ports[0].port
value: 27019:27017

# Backend
- op: replace
path: dev.backend.ports[0].port
value: 5680:5678

# Backend Container SSH
- op: replace
path: dev.backend.containers.backend-container.ssh.localPort
value: 3482

- op: replace
path: dev.seaweedfs.ports
value:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# Helm chart values used for development and testing
# Can be used through `helm install -f values.dev.yaml` or devspace `valuesFiles`
# Base Helm chart values used for development and testing
# Can be used through `helm install -f packages/grid/helm/examples/dev/base.yaml` or devspace `valuesFiles`

global:
randomizedSecrets: false

registry:
resourcesPreset: null
resources: null

storageSize: "5Gi"

node:
rootEmail: [email protected]
associationRequestAutoApproval: true
Expand Down Expand Up @@ -44,14 +38,21 @@ frontend:
resources: null

proxy:
enabled: true

resourcesPreset: null
resources: null

rtunnel:
registry:
enabled: true
logLevel: "trace"

# attestation:
# enabled: true
# resourcesPreset: null
# resources: null
resourcesPreset: null
resources: null

storageSize: "5Gi"

rtunnel:
enabled: false

attestation:
enabled: false
11 changes: 11 additions & 0 deletions packages/grid/helm/examples/dev/domain.tunnel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Values for deploying a domain with a reverse tunnel server in client-mode
# Patched on top of patch `base.yaml`

# Proxy is required for the tunnel to work
proxy:
enabled: true

rtunnel:
enabled: true
mode: client
logLevel: debug
8 changes: 8 additions & 0 deletions packages/grid/helm/examples/dev/enclave.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Values for deploying an enclave
# Patched on top of patch `base.yaml`

node:
type: enclave

attestation:
enabled: true
14 changes: 14 additions & 0 deletions packages/grid/helm/examples/dev/gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Values for deploying a gateway with a reverse tunnel server
# Patched on top of patch `base.yaml`

node:
type: gateway

# Proxy is required for the tunnel to work
proxy:
enabled: true

rtunnel:
enabled: true
mode: server
logLevel: debug
8 changes: 5 additions & 3 deletions packages/grid/helm/syft/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ proxy:

registry:
enabled: true

# Extra environment vars
env: null

Expand Down Expand Up @@ -239,14 +240,15 @@ ingress:


rtunnel:
# Extra environment vars
env: null
enabled: false
logLevel: "info"
logLevel: info

port: 2333
mode: client

# Extra environment vars
env: null

# Pod labels & annotations
podLabels: null
podAnnotations: null
Expand Down
48 changes: 0 additions & 48 deletions packages/grid/helm/values.dev.high.yaml

This file was deleted.

Loading

0 comments on commit c2ab102

Please sign in to comment.