From ea6f5d13e9627396fad716aa26af5c7d3207c19b Mon Sep 17 00:00:00 2001 From: nspmx Date: Thu, 25 Jan 2024 12:29:16 -0300 Subject: [PATCH] add playground zrch --- .../google-registry-gke-playground.yaml | 6 +- helm/playground.yaml | 86 +++++++++++++++++++ 2 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 helm/playground.yaml diff --git a/.github/workflows/google-registry-gke-playground.yaml b/.github/workflows/google-registry-gke-playground.yaml index e50299e..450605d 100644 --- a/.github/workflows/google-registry-gke-playground.yaml +++ b/.github/workflows/google-registry-gke-playground.yaml @@ -63,7 +63,7 @@ on: branches: [ "tesseract-python" ] paths: - .github/workflows/google-registry-gke-playground.yaml - - helm/development.yaml + - helm/playground.yaml - schema/** env: @@ -153,7 +153,7 @@ jobs: --set nameOverride=${{ env.GKE_APP_NAME }} \ --set fullnameOverride=${{ env.GKE_APP_NAME }} \ --set secrets.TESSERACT_BACKEND=$ENCODED_TESSERACT_BACKEND \ - ${{ env.GKE_APP_NAME }} --values=./helm/development.yaml ./helm + ${{ env.GKE_APP_NAME }} --values=./helm/playground.yaml ./helm update: runs-on: ubuntu-latest @@ -198,4 +198,4 @@ jobs: --set nameOverride=${{ env.GKE_APP_NAME }} \ --set fullnameOverride=${{ env.GKE_APP_NAME }} \ --set secrets.TESSERACT_BACKEND=$ENCODED_TESSERACT_BACKEND \ - ${{ env.GKE_APP_NAME }} --values=./helm/development.yaml ./helm \ No newline at end of file + ${{ env.GKE_APP_NAME }} --values=./helm/playground.yaml ./helm \ No newline at end of file diff --git a/helm/playground.yaml b/helm/playground.yaml new file mode 100644 index 0000000..a236313 --- /dev/null +++ b/helm/playground.yaml @@ -0,0 +1,86 @@ +image: + pullPolicy: Always + +imagePullSecrets: + - name: github + +replicaCount: 1 + +autoscaling: + enabled: true + minReplicas: 1 + maxReplicas: 4 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 120 + +resources: + requests: + cpu: 250m + memory: 1Gi + limits: + cpu: 500m + memory: 4Gi + +livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 7777 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 + successThreshold: 1 + +readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 7777 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 30 + successThreshold: 2 + +service: + type: ClusterIP + port: 7777 + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +configMap: + TESSERACT_DEBUG: "true" + TESSERACT_SCHEMA: "schema" + +# secrets: +# TESSERACT_BACKEND: + +ingress: + enabled: true + annotations: + cert-manager.io/cluster-issuer: "letsencrypt-prod" + acme.cert-manager.io/http01-edit-in-place: "true" + ingress.kubernetes.io/ssl-redirect: "true" + nginx.org/proxy-connect-timeout: "120s" + nginx.org/proxy-read-timeout: "120s" + nginx.org/proxy-buffers: "8 16k" + nginx.org/proxy-buffer-size: "16k" + nginx.org/proxy-busy-buffers-size: "64k" + nginx.org/location-snippets: | + add_header Access-Control-Allow-Origin *; + hosts: + - host: playground.api.datawheel.us + paths: + - / + tls: + - secretName: tesseract-api-ingress-tls + hosts: + - playground.api.datawheel.us