tryretool / retool-helm

MIT License
45 stars 57 forks source link

merge in retool-workflows-helm #118

Closed avimoondra closed 1 year ago

avimoondra commented 1 year ago

Merges in https://github.com/tryretool/retool-workflows-helm to have a single chart for Retool deployments (including Workflows)

Pairs with:

avimoondra commented 1 year ago

@ryanartecona seeing an issue with chart-testing, maybe i can give the action or kind cluster more juice?

==> Description of pod retool-2e5kvn7v3h-workflow-worker-745d54b587-k9ht4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> kubectl --request-timeout=30s describe pod retool-2e5kvn7v3h-workflow-worker-745d54b587-k9ht4 --namespace retool-2e5kvn7v3h
Name:           retool-2e5kvn7v3h-workflow-worker-745d54b587-k9ht4
Namespace:      retool-2e5kvn7v3h
Priority:       0
Node:           <none>
Labels:         pod-template-hash=745d54b587
                retoolService=retool-2e5kvn7v3h-workflow-worker
Annotations:    prometheus.io/job: retool-2e5kvn7v3h-workflow-worker
                prometheus.io/port: 9090
                prometheus.io/scrape: true
Status:         Pending
IP:             
IPs:            <none>
Controlled By:  ReplicaSet/retool-2e5kvn7v3h-workflow-worker-745d54b587
Containers:
  retool:
    Image:       tryretool/backend:latest
    Ports:       3005/TCP, 9090/TCP
    Host Ports:  0/TCP, 0/TCP
    Args:
      bash
      -c
      chmod -R +x ./docker_scripts; sync; ./docker_scripts/wait-for-it.sh -t 0 "retool-2e5kvn7v3h-postgresql":"5432"; ./docker_scripts/start_api.sh
    Limits:
      cpu:     2
      memory:  8Gi
    Requests:
      cpu:      1
      memory:   2Gi
    Liveness:   http-get http://:3005/api/checkHealth delay=30s timeout=30s period=10s #success=1 #failure=3
    Readiness:  http-get http://:3005/api/checkHealth delay=30s timeout=30s period=5s #success=5 #failure=3
    Environment:
      NODE_ENV:                            production
      NODE_OPTIONS:                        --max_old_space_size=1024
      SERVICE_TYPE:                        WORKFLOW_TEMPORAL_WORKER
      DBCONNECTOR_POSTGRES_POOL_MAX_SIZE:  100
      DBCONNECTOR_QUERY_TIMEOUT_MS:        5400000
      DISABLE_DATABASE_MIGRATIONS:         true
      WORKFLOW_WORKER_HEALTHCHECK_PORT:    3005
      WORKFLOW_BACKEND_HOST:               http://retool-2e5kvn7v3h-workflow-backend
      CLIENT_ID:                           
      COOKIE_INSECURE:                     false
      RESTRICTED_DOMAIN:                   
      POSTGRES_HOST:                       retool-2e5kvn7v3h-postgresql
      POSTGRES_PORT:                       5432
      POSTGRES_DB:                         hammerhead_production
      POSTGRES_USER:                       postgres
      POSTGRES_SSL_ENABLED:                false
      LICENSE_KEY:                         <set to the key 'license-key' in secret 'retool-2e5kvn7v3h'>                   Optional: false
      JWT_SECRET:                          <set to the key 'jwt-secret' in secret 'retool-2e5kvn7v3h'>                    Optional: false
      ENCRYPTION_KEY:                      <set to the key 'encryption-key' in secret 'retool-2e5kvn7v3h'>                Optional: false
      POSTGRES_PASSWORD:                   <set to the key 'postgres-password' in secret 'retool-2e5kvn7v3h-postgresql'>  Optional: false
      CLIENT_SECRET:                       <set to the key 'google-client-secret' in secret 'retool-2e5kvn7v3h'>          Optional: false
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-kjtjj (ro)
Conditions:
  Type           Status
  PodScheduled   False 
Volumes:
  kube-api-access-kjtjj:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason            Age                   From               Message
  ----     ------            ----                  ----               -------
  Warning  FailedScheduling  4m58s (x2 over 5m2s)  default-scheduler  0/1 nodes are available: 1 Insufficient cpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<== Description of pod retool-2e5kvn7v3h-workflow-worker-745d54b587-k9ht4
ryanartecona commented 1 year ago

Ahhh that's a bummer. I think the kind cluster just automatically detects the resources on its host and uses those for its node limits. So to fit this new pod in the install-chart test we'd have to either lower the requests or run them on a bigger actions host. I'll help set that up in org settings.

avimoondra commented 1 year ago

looks good! the only thing I'm a little lost on is why retool-temporal-services chart is nested under the main chart, instead of in the top level charts/. that might be related to my question inline about why the chart is referenced by file path rather than registry URL + name.

i believe it's because it's a dependent chart. https://helm.sh/docs/helm/helm_dependency/#synopsis, which mentions how you can reference by file.

i don't follow how no repository is included here: https://github.com/tryretool/retool-workflows-helm/blob/main/Chart.yaml#L14-L16

also i don't really follow why retool/ is nested under charts/ -- i would think the directory structure would follow this: https://helm.sh/docs/topics/charts/#the-chart-file-structure

ryanartecona commented 1 year ago

also i don't really follow why retool/ is nested under charts/ -- i would think the directory structure would follow this: https://helm.sh/docs/topics/charts/#the-chart-file-structure

I know that part at least. when I set up the linting/testing CI stuff in here I couldn't get some of the tools to work unless I moved the chart under charts/. that's pretty much the only reason. same for why both values files have to be manually kept in sync, because the "real" one is the one in charts/retool/, but we have some docs that link to the top level values file in the repo, and I didn't want to break links.

on the rest about the file reference to dependency charts, idk. seems weird, but if it's been working then probably no harm to just keep as is.