add temporal to apps
ci / build (push) Waiting to run Details

This commit is contained in:
CJ_Clippy 2024-06-13 14:51:25 -08:00
parent e234a036bf
commit 11ef19b109
8 changed files with 76 additions and 158 deletions

View File

View File

View File

@ -0,0 +1,66 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: temporal
namespace: futureporn
spec:
releaseName: temporal
chart:
spec:
chart: temporal
sourceRef:
kind: HelmRepository
name: temporal
interval: 50m
install:
remediation:
retries: 3
# Default values
# https://artifacthub.io/packages/helm/lemontech/temporal?modal=values
values:
admintools:
image:
tag: "1.24.1-tctl-1.18.1-cli-0.12.0"
web:
image:
tag: "2.27.2"
config:
auth:
enabled: true
prometheus:
enabled: false
grafana:
enabled: false
elasticsearch:
enabled: false
cassandra:
enabled: false
server:
config:
persistence:
default:
driver: sql
sql:
driver: postgres12
host: postgres.futureporn.svc.cluster.local
port: 5432
visibility:
driver: sql
sql:
driver: postgres12
host: postgres.futureporn.svc.cluster.local
port: 5432
valuesFrom:
- kind: Secret
name: temporalPostgresUser
targetPath: server.config.persistence.default.sql.user
- kind: Secret
name: temporalPostgresPassword
targetPath: server.config.persistence.default.sql.password
- kind: Secret
name: temporalPostgresPassword
targetPath: server.config.persistence.visibility.sql.password
- kind: Secret
name: temporalPostgresUser
targetPath: server.config.persistence.visibility.sql.user

View File

@ -0,0 +1,8 @@
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: podinfo
namespace: futureporn
spec:
interval: 5m
url: https://stefanprodan.github.io/podinfo

View File

@ -1,5 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: futureporn
resources:
- windmill.yaml

View File

@ -1,152 +0,0 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: bitnami
namespace: futureporn
spec:
type: "oci"
interval: 24h
url: oci://registry-1.docker.io/bitnamicharts
---
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: postgresql
namespace: futureporn
spec:
interval: 24h
chart:
spec:
chart: postgresql
version: "12.3.1"
sourceRef:
kind: HelmRepository
name: bitnami
values:
fullnameOverride: windmill-postgresql
architecture: standalone
backup:
enabled: false # @todo figure out how it's done and enable @see https://github.com/bitnami/charts/tree/main/bitnami/postgresql#backup-parameters
auth:
database: windmill
existingSecret: windmill-postgresql
primary:
persistence:
# It would be $0.20/mo cheaper to use 8Gi NVMe,
# but it's not available in Vultr's DFW datacenter
# so instead we use the minimum HDD size, 40Gi
storageClass: "vultr-block-storage-hdd"
size: "40Gi"
resources:
limits:
cpu: "1"
memory: "2Gi"
requests:
cpu: "250m"
memory: "1024Mi"
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: windmill
namespace: futureporn
spec:
interval: 10m
url: https://windmill-labs.github.io/windmill-helm-charts
---
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: windmill
namespace: futureporn
spec:
interval: 60m
chart:
spec:
chart: windmill
version: "2.0.170"
sourceRef:
kind: HelmRepository
name: windmill
values:
postgresql:
# this is disabled because we spin up our own postgres with vultr HDD support (see above)
enabled: false
windmill:
# domain as shown in browser, this is used together with `baseProtocol` as part of the BASE_URL environment variable in app and worker container and in the ingress resource, if enabled
baseDomain: windmill2.sbtp.xyz
baseProtocol: https
# postgres URI, pods will crashloop if database is unreachable, sets DATABASE_URL environment variable in app and worker container
databaseUrl: postgres://postgres:blahblahblah@windmill-postgresql/windmill?sslmode=disable
# replica for the application app
appReplicas: 1
# replicas for the workers, jobs are executed on the workers
lspReplicas: 2
workerGroups:
# The default worker group is the one that will execute jobs with any taggs except the native ones. Windmill has a default worker group configuration for it
- name: "default"
replicas: 1
# -- Annotations to apply to the pods
annotations: {}
# -- Labels to apply to the pods
labels: {}
# -- Node selector to use for scheduling the pods
nodeSelector: {}
# -- Tolerations to apply to the pods
tolerations: []
# -- Affinity rules to apply to the pods
affinity: {}
# -- Resource limits and requests for the pods
resources:
requests:
memory: "1028Mi"
cpu: "500m"
limits:
memory: "2048Mi"
cpu: "1000m"
# -- Extra environment variables to apply to the pods
extraEnv: []
# -- Extra sidecar containers
extraContainers: []
# -- Mode for workers, defaults to "worker" - alternative "agent" requires Enterprise license
mode: "worker"
# Thenative worker group will only execute native jobs. Windmill has a default worker group configuration for it
- name: "native"
replicas: 1
# -- Resource limits and requests for the pods
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "200m"
# -- Extra environment variables to apply to the pods
extraEnv: []
# -- Extra sidecar containers
extraContainers: []
# -- Mode for workers, defaults to "worker" - alternative "agent" requires Enterprise license
mode: "worker"
- name: "gpu"
replicas: 0
# Use those to override the tag or image used for the app and worker containers. Windmill uses the same image for both.
# By default, if enterprise is enable, the image is set to ghcr.io/windmill-labs/windmill-ee, otherwise the image is set to ghcr.io/windmill-labs/windmill
#tag: "mytag"
#image: "ghcr.io/windmill-labs/windmill"
# enable postgres (bitnami) on kubernetes
# enable minio (bitnami) on kubernetes
minio:
enabled: false
ingress:
enabled: true
className: nginx
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt"
tls:
- secretName: windmill-tls
hosts:
- windmill2.sbtp.xyz
enterprise:
enable: false

View File

@ -3,7 +3,7 @@ kind: Kustomization
resources: resources:
- ../base/podinfo - ../base/podinfo
# - ../base/chisel # - ../base/chisel
- ../base/windmill - ../base/temporal
- ../base/fp - ../base/fp
patches: patches:
- path: podinfo-values.yaml - path: podinfo-values.yaml

View File

@ -244,6 +244,7 @@ docker_build(
## however, I don't think tilt has this capability. ## however, I don't think tilt has this capability.
sync('./packages/next', '/ignore-me'), sync('./packages/next', '/ignore-me'),
], ],
# this entrypoint is a godsend. It lets me restart the node app (fast) without having to rebuild the docker container (slow)
entrypoint='pnpm nodemon --ext js,ts,json,yaml --exec node --no-warnings=ExperimentalWarning --loader ts-node/esm ./src/temporal/worker.ts' entrypoint='pnpm nodemon --ext js,ts,json,yaml --exec node --no-warnings=ExperimentalWarning --loader ts-node/esm ./src/temporal/worker.ts'
) )
# k8s_resource( # k8s_resource(