From f6cb59ea7bcf18832b0a6f05bda277bfc06ca64e Mon Sep 17 00:00:00 2001 From: devthejo Date: Wed, 22 May 2024 13:42:14 +0200 Subject: [PATCH] feat: opa --- .../tests/__snapshots__/app-sidecar.dev.yaml | 12 +- .../__snapshots__/app-simple-options.dev.yaml | 72 +++-------- .../tests/__snapshots__/app-simple.dev.yaml | 8 +- .../tests/__snapshots__/app-simple.prod.yaml | 8 +- .../tests/__snapshots__/chart-group.dev.yaml | 16 +-- .../tests/__snapshots__/chart-groups.dev.yaml | 16 +-- .../chart-not-in-values.dev.yaml | 8 +- .../tests/__snapshots__/charts.dev.yaml | 4 - .../tests/__snapshots__/daemon.dev.yaml | 8 +- .../tests/__snapshots__/deactivate.dev.yaml | 16 +-- .../tests/__snapshots__/extends-ovh.dev.yaml | 40 ++---- .../tests/__snapshots__/extends-ovh.prod.yaml | 40 ++---- .../__snapshots__/hasura-no-ing.prod.yaml | 8 +- .../tests/__snapshots__/if-env.dev.yaml | 8 +- .../tests/__snapshots__/if-env.local.yaml | 8 +- .../tests/__snapshots__/include-file.dev.yaml | 16 +-- .../__snapshots__/inline-values.dev.yaml | 8 +- .../tests/__snapshots__/job-builds.dev.yaml | 16 +-- .../__snapshots__/job-no-affinity.dev.yaml | 8 +- .../__snapshots__/jobs-build-options.dev.yaml | 16 +-- .../__snapshots__/jobs-build-stage.dev.yaml | 64 +++------- .../tests/__snapshots__/jobs-build.dev.yaml | 64 +++------- .../__snapshots__/jobs-runs-map.dev.yaml | 32 ++--- .../__snapshots__/jobs-uses-relative.dev.yaml | 32 ++--- .../__snapshots__/jobs-uses-self-ref.dev.yaml | 32 ++--- .../long-branch-host-patch.dev.yaml | 8 +- .../__snapshots__/long-branch-host.dev.yaml | 8 +- .../tests/__snapshots__/maildev.dev.yaml | 5 +- .../tests/__snapshots__/maildev.prod.yaml | 5 +- .../tests/__snapshots__/meta-log.dev.yaml | 40 ++---- .../tests/__snapshots__/output.dev.yaml | 32 ++--- .../override-env-default.dev.yaml | 16 +-- .../tests/__snapshots__/persist.dev.yaml | 8 +- .../tests/__snapshots__/pg.prod.yaml | 24 +--- .../tests/__snapshots__/pgweb.dev.yaml | 5 +- .../__snapshots__/post-renderer.dev.yaml | 8 +- .../tests/__snapshots__/private-mode.dev.yaml | 8 +- .../project-chart-implicit-enabled.dev.yaml | 4 - .../tests/__snapshots__/repo.domifa.dev.yaml | 120 +++++------------- .../__snapshots__/repo.domifa.preprod.yaml | 48 ++----- .../tests/__snapshots__/repo.domifa.prod.yaml | 48 ++----- .../tests/__snapshots__/sample-1.dev.yaml | 29 +---- .../tests/__snapshots__/sample-1.preprod.yaml | 29 +---- .../tests/__snapshots__/sample-1.prod.yaml | 29 +---- .../socialgouv-autodevops-override.dev.yaml | 16 +-- .../socialgouv-autodevops.dev.yaml | 16 +-- .../__snapshots__/standalone-charts.dev.yaml | 4 - .../__snapshots__/values-extends.dev.yaml | 24 +--- .../__snapshots__/values-extends.preprod.yaml | 24 +--- .../tests/__snapshots__/values-js.dev.yaml | 8 +- .../{autoscaler.yaml => autoscale.hpa.yaml} | 6 +- .../charts/app/templates/autoscale.opa.yaml | 47 +++++++ .../charts/app/templates/autoscale.vpa.yaml | 17 +++ .../charts/app/templates/deployment.yaml | 4 + plugins/contrib/charts/app/values.yaml | 26 +++- plugins/fabrique/kontinuous.yaml | 1 + 56 files changed, 371 insertions(+), 856 deletions(-) rename plugins/contrib/charts/app/templates/{autoscaler.yaml => autoscale.hpa.yaml} (81%) create mode 100644 plugins/contrib/charts/app/templates/autoscale.opa.yaml create mode 100644 plugins/contrib/charts/app/templates/autoscale.vpa.yaml diff --git a/packages/kontinuous/tests/__snapshots__/app-sidecar.dev.yaml b/packages/kontinuous/tests/__snapshots__/app-sidecar.dev.yaml index 2cd59d303f..21da1a43b0 100644 --- a/packages/kontinuous/tests/__snapshots__/app-sidecar.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/app-sidecar.dev.yaml @@ -179,12 +179,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 41m - memory: 131Mi + limits: {} + requests: {} - name: cronjob image: test/background-cronjob command: @@ -194,10 +190,6 @@ spec: run-background-cronjob securityContext: runAsUser: 1000 - resources: - requests: - cpu: 41m - memory: 131Mi --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/app-simple-options.dev.yaml b/packages/kontinuous/tests/__snapshots__/app-simple-options.dev.yaml index 539fbdb944..62c88446ea 100644 --- a/packages/kontinuous/tests/__snapshots__/app-simple-options.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/app-simple-options.dev.yaml @@ -147,12 +147,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -201,12 +197,8 @@ spec: set -e /action/ensure-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -310,12 +302,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -351,12 +339,8 @@ spec: set -e /action/create-secret.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -473,12 +457,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: harbor.fabrique.social.gouv.fr/test-app-simple-options/app:sha-ffac537e6cbbf934b08745a378932722df287a53 @@ -498,12 +478,8 @@ spec: set -e yarn seed resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -611,12 +587,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} - name: degit-action image: ghcr.io/socialgouv/kontinuous/degit:v1.176.2 command: @@ -631,12 +603,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:7.0.0 @@ -658,12 +626,8 @@ spec: set -e /action/seed-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/app-simple.dev.yaml b/packages/kontinuous/tests/__snapshots__/app-simple.dev.yaml index 83450a5859..5e6bb78c71 100644 --- a/packages/kontinuous/tests/__snapshots__/app-simple.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/app-simple.dev.yaml @@ -179,12 +179,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/app-simple.prod.yaml b/packages/kontinuous/tests/__snapshots__/app-simple.prod.yaml index 5709cbcaff..345f86155a 100644 --- a/packages/kontinuous/tests/__snapshots__/app-simple.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/app-simple.prod.yaml @@ -178,12 +178,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/chart-group.dev.yaml b/packages/kontinuous/tests/__snapshots__/chart-group.dev.yaml index 8c3e97404d..0cb3ba7af6 100644 --- a/packages/kontinuous/tests/__snapshots__/chart-group.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/chart-group.dev.yaml @@ -102,12 +102,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: apps/v1 kind: Deployment @@ -210,12 +206,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/chart-groups.dev.yaml b/packages/kontinuous/tests/__snapshots__/chart-groups.dev.yaml index 6f662dd2e3..0432d81cf7 100644 --- a/packages/kontinuous/tests/__snapshots__/chart-groups.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/chart-groups.dev.yaml @@ -102,12 +102,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: apps/v1 kind: Deployment @@ -210,12 +206,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/chart-not-in-values.dev.yaml b/packages/kontinuous/tests/__snapshots__/chart-not-in-values.dev.yaml index 6e18806f99..f28e738f31 100644 --- a/packages/kontinuous/tests/__snapshots__/chart-not-in-values.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/chart-not-in-values.dev.yaml @@ -101,12 +101,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/charts.dev.yaml b/packages/kontinuous/tests/__snapshots__/charts.dev.yaml index 03962dce64..b7790c4045 100644 --- a/packages/kontinuous/tests/__snapshots__/charts.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/charts.dev.yaml @@ -157,10 +157,6 @@ spec: set -e echo Hello World FOO=\\"barjo\\"\\" - resources: - requests: - cpu: 81m - memory: 262Mi affinity: nodeAffinity: preferredDuringSchedulingIgnoredDuringExecution: diff --git a/packages/kontinuous/tests/__snapshots__/daemon.dev.yaml b/packages/kontinuous/tests/__snapshots__/daemon.dev.yaml index 3791add487..cb9a2a0569 100644 --- a/packages/kontinuous/tests/__snapshots__/daemon.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/daemon.dev.yaml @@ -152,11 +152,7 @@ spec: - image: harbor.fabrique.social.gouv.fr/test-daemon/daemon:sha-ffac537e6cbbf934b08745a378932722df287a53 name: app resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} " `; diff --git a/packages/kontinuous/tests/__snapshots__/deactivate.dev.yaml b/packages/kontinuous/tests/__snapshots__/deactivate.dev.yaml index 75b77297d3..269c476e51 100644 --- a/packages/kontinuous/tests/__snapshots__/deactivate.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/deactivate.dev.yaml @@ -68,12 +68,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -96,12 +92,8 @@ spec: kubectl delete namespace \\"$NAMESPACE\\" --now=true --wait=false fi resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/extends-ovh.dev.yaml b/packages/kontinuous/tests/__snapshots__/extends-ovh.dev.yaml index bc0f85fa78..4c50b6a904 100644 --- a/packages/kontinuous/tests/__snapshots__/extends-ovh.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/extends-ovh.dev.yaml @@ -147,12 +147,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -191,12 +187,8 @@ spec: set -e /action/create-secrets.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -310,12 +302,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -354,12 +342,8 @@ spec: set -e /action/create-secrets.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -505,12 +489,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml b/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml index 86c92695b9..5546fb5967 100644 --- a/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml @@ -308,12 +308,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -352,12 +348,8 @@ spec: set -e /action/create-secrets.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -471,12 +463,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -515,12 +503,8 @@ spec: set -e /action/create-secrets.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -666,12 +650,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/hasura-no-ing.prod.yaml b/packages/kontinuous/tests/__snapshots__/hasura-no-ing.prod.yaml index 33c186d1e4..977622ddbb 100644 --- a/packages/kontinuous/tests/__snapshots__/hasura-no-ing.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/hasura-no-ing.prod.yaml @@ -153,12 +153,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} startupProbe: failureThreshold: 30 httpGet: diff --git a/packages/kontinuous/tests/__snapshots__/if-env.dev.yaml b/packages/kontinuous/tests/__snapshots__/if-env.dev.yaml index 9a65510a6e..d0f7de38a5 100644 --- a/packages/kontinuous/tests/__snapshots__/if-env.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/if-env.dev.yaml @@ -179,12 +179,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/if-env.local.yaml b/packages/kontinuous/tests/__snapshots__/if-env.local.yaml index f09c9649e1..62ca0f9c96 100644 --- a/packages/kontinuous/tests/__snapshots__/if-env.local.yaml +++ b/packages/kontinuous/tests/__snapshots__/if-env.local.yaml @@ -176,12 +176,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/include-file.dev.yaml b/packages/kontinuous/tests/__snapshots__/include-file.dev.yaml index 35651a8ea3..988544101c 100644 --- a/packages/kontinuous/tests/__snapshots__/include-file.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/include-file.dev.yaml @@ -148,12 +148,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: debian:stable @@ -171,12 +167,8 @@ spec: set -e Hello World ! resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/inline-values.dev.yaml b/packages/kontinuous/tests/__snapshots__/inline-values.dev.yaml index 8498218a39..7f38d226a5 100644 --- a/packages/kontinuous/tests/__snapshots__/inline-values.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/inline-values.dev.yaml @@ -179,12 +179,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml b/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml index b59e7bf158..aaf320e745 100644 --- a/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml @@ -149,12 +149,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 8192Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -432,12 +428,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless diff --git a/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml b/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml index 8842fc3e31..af289b7ee7 100644 --- a/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml @@ -149,12 +149,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml index 9d9e691462..ba8597869d 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml @@ -150,12 +150,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -464,12 +460,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} envFrom: - secretRef: name: pg-user diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml index a92fd7a4a0..165b17d78f 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml @@ -147,12 +147,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -201,12 +197,8 @@ spec: set -e /action/ensure-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -310,12 +302,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -351,12 +339,8 @@ spec: set -e /action/create-secret.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -474,12 +458,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -757,12 +737,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1069,12 +1045,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} envFrom: - secretRef: name: pg-user @@ -1159,12 +1131,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} startupProbe: failureThreshold: 30 httpGet: diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml index fb1ecf16d1..44b392867d 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml @@ -147,12 +147,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -201,12 +197,8 @@ spec: set -e /action/ensure-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -310,12 +302,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -351,12 +339,8 @@ spec: set -e /action/create-secret.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -473,12 +457,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -755,12 +735,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1067,12 +1043,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} envFrom: - secretRef: name: pg-user @@ -1157,12 +1129,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} startupProbe: failureThreshold: 30 httpGet: diff --git a/packages/kontinuous/tests/__snapshots__/jobs-runs-map.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-runs-map.dev.yaml index 3a0bacbb5c..1645b4473c 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-runs-map.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-runs-map.dev.yaml @@ -146,12 +146,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -200,12 +196,8 @@ spec: set -e /action/ensure-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -309,12 +301,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -350,12 +338,8 @@ spec: set -e /action/create-secret.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/jobs-uses-relative.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-uses-relative.dev.yaml index 0b48c570ac..ca7c1f6b67 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-uses-relative.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-uses-relative.dev.yaml @@ -146,12 +146,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -200,12 +196,8 @@ spec: set -e /action/ensure-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -309,12 +301,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -350,12 +338,8 @@ spec: set -e /action/create-secret.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/jobs-uses-self-ref.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-uses-self-ref.dev.yaml index bf5980cf3a..8376bba83b 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-uses-self-ref.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-uses-self-ref.dev.yaml @@ -146,12 +146,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -200,12 +196,8 @@ spec: set -e /action/ensure-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -309,12 +301,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -350,12 +338,8 @@ spec: set -e /action/create-secret.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/long-branch-host-patch.dev.yaml b/packages/kontinuous/tests/__snapshots__/long-branch-host-patch.dev.yaml index f453f2a9b2..feb539c75d 100644 --- a/packages/kontinuous/tests/__snapshots__/long-branch-host-patch.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/long-branch-host-patch.dev.yaml @@ -179,12 +179,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/long-branch-host.dev.yaml b/packages/kontinuous/tests/__snapshots__/long-branch-host.dev.yaml index 848ea6f241..07294d4a30 100644 --- a/packages/kontinuous/tests/__snapshots__/long-branch-host.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/long-branch-host.dev.yaml @@ -179,12 +179,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/maildev.dev.yaml b/packages/kontinuous/tests/__snapshots__/maildev.dev.yaml index 714983f9ef..9f8359166a 100644 --- a/packages/kontinuous/tests/__snapshots__/maildev.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/maildev.dev.yaml @@ -157,10 +157,7 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 1000 - resources: - requests: - cpu: 81m - memory: 262Mi + resources: {} volumes: - name: data emptyDir: {} diff --git a/packages/kontinuous/tests/__snapshots__/maildev.prod.yaml b/packages/kontinuous/tests/__snapshots__/maildev.prod.yaml index bb3183aeac..d5b677b822 100644 --- a/packages/kontinuous/tests/__snapshots__/maildev.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/maildev.prod.yaml @@ -156,10 +156,7 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 1000 - resources: - requests: - cpu: 81m - memory: 262Mi + resources: {} volumes: - name: data emptyDir: {} diff --git a/packages/kontinuous/tests/__snapshots__/meta-log.dev.yaml b/packages/kontinuous/tests/__snapshots__/meta-log.dev.yaml index 88869c8787..0501facba0 100644 --- a/packages/kontinuous/tests/__snapshots__/meta-log.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/meta-log.dev.yaml @@ -149,12 +149,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: debian:stable @@ -166,12 +162,8 @@ spec: - name: KONTINUOUS_INPUT value: /kontinuous-input resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -278,12 +270,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: debian:stable @@ -295,12 +283,8 @@ spec: - name: KONTINUOUS_INPUT value: /kontinuous-input resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -437,12 +421,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/output.dev.yaml b/packages/kontinuous/tests/__snapshots__/output.dev.yaml index 69dcab75c9..aea6352812 100644 --- a/packages/kontinuous/tests/__snapshots__/output.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/output.dev.yaml @@ -173,12 +173,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: debian:stable @@ -196,12 +192,8 @@ spec: set -e echo earth>$KONTINUOUS_OUTPUT/WORLD resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -310,12 +302,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: debian:stable @@ -335,12 +323,8 @@ spec: echo \\"Hello $PLANET !\\" sleep 10 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/override-env-default.dev.yaml b/packages/kontinuous/tests/__snapshots__/override-env-default.dev.yaml index 4705b148ad..ada57bb533 100644 --- a/packages/kontinuous/tests/__snapshots__/override-env-default.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/override-env-default.dev.yaml @@ -227,12 +227,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -271,12 +267,8 @@ spec: set -e /action/create-secrets.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/persist.dev.yaml b/packages/kontinuous/tests/__snapshots__/persist.dev.yaml index ee6a34b08b..8fabce90f1 100644 --- a/packages/kontinuous/tests/__snapshots__/persist.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/persist.dev.yaml @@ -179,12 +179,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/pg.prod.yaml b/packages/kontinuous/tests/__snapshots__/pg.prod.yaml index c4adb13540..471115b61a 100644 --- a/packages/kontinuous/tests/__snapshots__/pg.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/pg.prod.yaml @@ -227,12 +227,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -271,12 +267,8 @@ spec: set -e /action/create-secrets.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -398,12 +390,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} startupProbe: failureThreshold: 30 httpGet: diff --git a/packages/kontinuous/tests/__snapshots__/pgweb.dev.yaml b/packages/kontinuous/tests/__snapshots__/pgweb.dev.yaml index 629c08b3e3..94ddf45572 100644 --- a/packages/kontinuous/tests/__snapshots__/pgweb.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/pgweb.dev.yaml @@ -179,10 +179,7 @@ spec: httpGet: path: / port: http - resources: - requests: - cpu: 81m - memory: 262Mi + resources: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/post-renderer.dev.yaml b/packages/kontinuous/tests/__snapshots__/post-renderer.dev.yaml index 6209f3799a..b8157f5a4e 100644 --- a/packages/kontinuous/tests/__snapshots__/post-renderer.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/post-renderer.dev.yaml @@ -180,12 +180,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/private-mode.dev.yaml b/packages/kontinuous/tests/__snapshots__/private-mode.dev.yaml index 602a530ad1..b0000c957d 100644 --- a/packages/kontinuous/tests/__snapshots__/private-mode.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/private-mode.dev.yaml @@ -179,12 +179,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} imagePullSecrets: - name: harbor-pull-secret --- diff --git a/packages/kontinuous/tests/__snapshots__/project-chart-implicit-enabled.dev.yaml b/packages/kontinuous/tests/__snapshots__/project-chart-implicit-enabled.dev.yaml index bfe2f743f3..e3db6b191d 100644 --- a/packages/kontinuous/tests/__snapshots__/project-chart-implicit-enabled.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/project-chart-implicit-enabled.dev.yaml @@ -132,9 +132,5 @@ spec: image: nginx:1.14.2 ports: - containerPort: 80 - resources: - requests: - cpu: 81m - memory: 262Mi " `; diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml index 9d208e0f34..923f0bdf60 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml @@ -186,12 +186,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -473,12 +469,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -761,12 +753,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1045,12 +1033,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1327,12 +1311,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -1381,12 +1361,8 @@ spec: set -e /action/ensure-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -1491,12 +1467,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: bitnami/kubectl:latest @@ -1532,12 +1504,8 @@ spec: set -e /action/create-secret.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -1650,12 +1618,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:7.0.0 @@ -1679,12 +1643,8 @@ spec: set -e /action/drop-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -1792,12 +1752,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} - name: degit-action image: ghcr.io/socialgouv/kontinuous/degit:v1.176.2 command: @@ -1812,12 +1768,8 @@ spec: - name: action mountPath: /action resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: ghcr.io/socialgouv/docker/psql:7.0.0 @@ -1839,12 +1791,8 @@ spec: set -e /action/seed-db.sh resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -2370,12 +2318,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: apps/v1 kind: Deployment @@ -2478,12 +2422,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml index 48d1a36bce..ce57a6d970 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml @@ -185,12 +185,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -468,12 +464,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -756,12 +748,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1040,12 +1028,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1746,12 +1730,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: apps/v1 kind: Deployment @@ -1854,12 +1834,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml index e302a34fc9..d6e27e9f2c 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml @@ -240,12 +240,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -526,12 +522,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -814,12 +806,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1099,12 +1087,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1817,12 +1801,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: apps/v1 kind: Deployment @@ -1925,12 +1905,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/sample-1.dev.yaml b/packages/kontinuous/tests/__snapshots__/sample-1.dev.yaml index 1362867205..c1f1a36ca3 100644 --- a/packages/kontinuous/tests/__snapshots__/sample-1.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/sample-1.dev.yaml @@ -258,12 +258,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} envFrom: - secretRef: name: pg-user @@ -379,12 +375,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} envFrom: - secretRef: name: pg-user @@ -474,12 +466,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} startupProbe: failureThreshold: 30 httpGet: @@ -573,10 +561,7 @@ spec: httpGet: path: / port: http - resources: - requests: - cpu: 81m - memory: 262Mi + resources: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/sample-1.preprod.yaml b/packages/kontinuous/tests/__snapshots__/sample-1.preprod.yaml index 28f5257cf3..30c2689c0a 100644 --- a/packages/kontinuous/tests/__snapshots__/sample-1.preprod.yaml +++ b/packages/kontinuous/tests/__snapshots__/sample-1.preprod.yaml @@ -257,12 +257,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} envFrom: - secretRef: name: pg-user @@ -371,12 +367,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} envFrom: - secretRef: name: pg-user @@ -460,12 +452,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} startupProbe: failureThreshold: 30 httpGet: @@ -558,10 +546,7 @@ spec: httpGet: path: / port: http - resources: - requests: - cpu: 81m - memory: 262Mi + resources: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/sample-1.prod.yaml b/packages/kontinuous/tests/__snapshots__/sample-1.prod.yaml index 50235d7d70..351a18aa54 100644 --- a/packages/kontinuous/tests/__snapshots__/sample-1.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/sample-1.prod.yaml @@ -253,12 +253,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} envFrom: - secretRef: name: pg-user @@ -367,12 +363,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} envFrom: - secretRef: name: pg-user @@ -456,12 +448,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} startupProbe: failureThreshold: 30 httpGet: @@ -554,10 +542,7 @@ spec: httpGet: path: / port: http - resources: - requests: - cpu: 81m - memory: 262Mi + resources: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml index f149fe61f1..37c09a2d5d 100644 --- a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml @@ -150,12 +150,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -463,12 +459,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml index 9b19685471..b9cdc368ad 100644 --- a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml @@ -150,12 +150,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 2000m - memory: 4096Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -462,12 +458,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/standalone-charts.dev.yaml b/packages/kontinuous/tests/__snapshots__/standalone-charts.dev.yaml index add18df18c..a89c4e4ea3 100644 --- a/packages/kontinuous/tests/__snapshots__/standalone-charts.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/standalone-charts.dev.yaml @@ -59,10 +59,6 @@ spec: - | set -e echo Hello World - resources: - requests: - cpu: 81m - memory: 262Mi affinity: nodeAffinity: preferredDuringSchedulingIgnoredDuringExecution: diff --git a/packages/kontinuous/tests/__snapshots__/values-extends.dev.yaml b/packages/kontinuous/tests/__snapshots__/values-extends.dev.yaml index 618865d75c..4b31a11741 100644 --- a/packages/kontinuous/tests/__snapshots__/values-extends.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/values-extends.dev.yaml @@ -149,12 +149,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: harbor.fabrique.social.gouv.fr/test-values-extends/app:sha-ffac537e6cbbf934b08745a378932722df287a53 @@ -171,12 +167,8 @@ spec: set -e yarn seed resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -314,12 +306,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/values-extends.preprod.yaml b/packages/kontinuous/tests/__snapshots__/values-extends.preprod.yaml index 8bbb09715b..15c3218480 100644 --- a/packages/kontinuous/tests/__snapshots__/values-extends.preprod.yaml +++ b/packages/kontinuous/tests/__snapshots__/values-extends.preprod.yaml @@ -149,12 +149,8 @@ spec: - name: workspace mountPath: /workspace resources: - limits: - cpu: 1000m - memory: 1024Mi - requests: - cpu: \\"0\\" - memory: \\"0\\" + limits: {} + requests: {} containers: - name: job image: harbor.fabrique.social.gouv.fr/test-values-extends/app:preprod-ffac537e6cbbf934b08745a378932722df287a53 @@ -171,12 +167,8 @@ spec: set -e yarn seed resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -314,12 +306,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/packages/kontinuous/tests/__snapshots__/values-js.dev.yaml b/packages/kontinuous/tests/__snapshots__/values-js.dev.yaml index c911f90047..13b484d769 100644 --- a/packages/kontinuous/tests/__snapshots__/values-js.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/values-js.dev.yaml @@ -178,12 +178,8 @@ spec: port: http periodSeconds: 5 resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 81m - memory: 262Mi + limits: {} + requests: {} --- apiVersion: v1 kind: Service diff --git a/plugins/contrib/charts/app/templates/autoscaler.yaml b/plugins/contrib/charts/app/templates/autoscale.hpa.yaml similarity index 81% rename from plugins/contrib/charts/app/templates/autoscaler.yaml rename to plugins/contrib/charts/app/templates/autoscale.hpa.yaml index 64df84b067..5d723abef8 100644 --- a/plugins/contrib/charts/app/templates/autoscaler.yaml +++ b/plugins/contrib/charts/app/templates/autoscale.hpa.yaml @@ -1,4 +1,4 @@ -{{ if .Values.autoscale.enabled }} +{{ if and .Values.autoscale.enabled (eq .Values.autoscale.mode "horizontal") }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: @@ -13,13 +13,13 @@ spec: - resource: name: cpu target: - averageUtilization: {{ .Values.autoscale.averageUtilization.cpu }} + averageUtilization: {{ .Values.autoscale.hpa.averageUtilization.cpu }} type: Utilization type: Resource - resource: name: memory target: - averageUtilization: {{ .Values.autoscale.averageUtilization.memory }} + averageUtilization: {{ .Values.autoscale.hpa.averageUtilization.memory }} type: Utilization type: Resource scaleTargetRef: diff --git a/plugins/contrib/charts/app/templates/autoscale.opa.yaml b/plugins/contrib/charts/app/templates/autoscale.opa.yaml new file mode 100644 index 0000000000..53f044fc70 --- /dev/null +++ b/plugins/contrib/charts/app/templates/autoscale.opa.yaml @@ -0,0 +1,47 @@ +{{ if and .Values.autoscale.enabled (eq .Values.autoscale.mode "oblik") }} +apiVersion: socialgouv.io/v1 +kind: OblikPodAutoscaler +metadata: + name: {{ (or .Values.component .Chart.Name) | lower }} +spec: + defaultLimit: {{ .Values.autoscale.opa.defaultLimit }} + enforceLimit: {{ .Values.autoscale.opa.enforceLimit }} + limitRatio: + cpu: {{ .Values.autoscale.opa.limitRatio.cpu }} + memory: {{ .Values.autoscale.opa.limitRatio.memory }} + minReplicas: {{ .Values.autoscale.minReplicas }} + baseResource: + cpu: {{ .Values.autoscale.opa.baseResource.cpu | quote }} + memory: {{ .Values.autoscale.opa.baseResource.memory | quote }} + cursorMode: {{ .Values.autoscale.opa.cursorMode | quote }} + podCursor: + cpu: {{ .Values.autoscale.opa.podCursor.cpu | quote }} + memory: {{ .Values.autoscale.opa.podCursor.memory | quote }} + containerCursors: {{ toYaml .Values.autoscale.opa.containerCursors | nindent 4 }} + targetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ (or .Values.component .Chart.Name) | lower }} + hpa: + minReplicas: {{ .Values.autoscale.minReplicas }} + maxReplicas: {{ .Values.autoscale.maxReplicas }} + metrics: + - resource: + name: cpu + target: + averageUtilization: {{ .Values.autoscale.hpa.averageUtilization.cpu }} + type: Utilization + type: Resource + - resource: + name: memory + target: + averageUtilization: {{ .Values.autoscale.hpa.averageUtilization.memory }} + type: Utilization + type: Resource + vpa: + updatePolicy: + updateMode: {{ .Values.autoscale.vpa.updateMode | quote }} + {{ if .Values.autoscale.vpa.spec }} + {{ .Values.autoscale.vpa.spec | toYaml | nindent 4 }} + {{ end }} +{{ end }} \ No newline at end of file diff --git a/plugins/contrib/charts/app/templates/autoscale.vpa.yaml b/plugins/contrib/charts/app/templates/autoscale.vpa.yaml new file mode 100644 index 0000000000..52b30acc6d --- /dev/null +++ b/plugins/contrib/charts/app/templates/autoscale.vpa.yaml @@ -0,0 +1,17 @@ +{{ if and .Values.autoscale.enabled (eq .Values.autoscale.mode "vertical") }} +apiVersion: autoscaling.k8s.io/v1 +kind: VerticalPodAutoscaler +metadata: + name: {{ (or .Values.component .Chart.Name) | lower }} + namespace: {{ or .Values.namespace .Values.global.namespace }} +spec: + targetRef: + apiVersion: "apps/v1" + kind: Deployment + name: {{ (or .Values.component .Chart.Name) | lower }} + updatePolicy: + updateMode: {{ .Values.vpa.updateMode | quote }} + {{ if .Values.autoscale.vpa.spec }} + {{ .Values.autoscale.vpa.spec | toYaml | nindent 2 }} + {{ end }} +{{ end }} \ No newline at end of file diff --git a/plugins/contrib/charts/app/templates/deployment.yaml b/plugins/contrib/charts/app/templates/deployment.yaml index 305d95f7a1..1542ec8b2f 100644 --- a/plugins/contrib/charts/app/templates/deployment.yaml +++ b/plugins/contrib/charts/app/templates/deployment.yaml @@ -28,7 +28,11 @@ metadata: namespace: {{ or .Values.namespace .Values.global.namespace }} annotations: {} spec: + {{ if and .Values.autoscale.enabled (ne .Values.autoscale.mode "horizontal") }} + replicas: {{ or .Values.autoscale.minReplicas }} + {{ else if not (and .Values.autoscale.enabled (eq .Values.autoscale.mode "horizontal")) }} replicas: {{ or .Values.replicas .Values.global.replicas 1 }} + {{ end }} selector: matchLabels: component: {{ (or .Values.component .Chart.Name) | lower }} diff --git a/plugins/contrib/charts/app/values.yaml b/plugins/contrib/charts/app/values.yaml index 35d23b9933..e732bd329f 100644 --- a/plugins/contrib/charts/app/values.yaml +++ b/plugins/contrib/charts/app/values.yaml @@ -31,11 +31,31 @@ resources: memory: autoscale: enabled: false + mode: horizontal minReplicas: 2 maxReplicas: 10 - averageUtilization: - cpu: 70 - memory: 80 + vpa: + updateMode: Auto + spec: + hpa: + averageUtilization: + cpu: 70 + memory: 80 + opa: + defaultLimit: true + enforceLimit: false + limitRatio: + cpu: 1 # Guaranteed + memory: 1 # Guaranteed + baseResource: + cpu: "10m" + memory: "10Mi" + cursorMode: "any" + podCursor: + cpu: "1" + memory: "2Gi" + containerCursors: [] + certSecretName: waitForPostgres: false addVolumes: [] diff --git a/plugins/fabrique/kontinuous.yaml b/plugins/fabrique/kontinuous.yaml index 2f2d1b6e66..ede4cffd0e 100644 --- a/plugins/fabrique/kontinuous.yaml +++ b/plugins/fabrique/kontinuous.yaml @@ -92,6 +92,7 @@ dependencies: - bitnami.com/v1alpha1/SealedSecret - monitoring.coreos.com/v1/PodMonitor - kyverno.io/v1/Policy + - socialgouv.io/v1/OblikPodAutoscaler preDeploy: importSecrets: