diff --git a/packages/kontinuous/tests/__snapshots__/app-simple-options.dev.yaml b/packages/kontinuous/tests/__snapshots__/app-simple-options.dev.yaml index ced85a49e6..73305ad40f 100644 --- a/packages/kontinuous/tests/__snapshots__/app-simple-options.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/app-simple-options.dev.yaml @@ -147,8 +147,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -197,8 +201,12 @@ spec: set -e /action/ensure-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -302,8 +310,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -339,8 +351,12 @@ spec: set -e /action/create-secret.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -457,8 +473,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: harbor.fabrique.social.gouv.fr/test-app-simple-options/app:sha-ffac537e6cbbf934b08745a378932722df287a53 @@ -478,8 +498,12 @@ spec: set -e yarn seed resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -587,8 +611,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi - name: degit-action image: ghcr.io/socialgouv/kontinuous/degit:v1.181.2 command: @@ -603,8 +631,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:7.0.0 @@ -626,8 +658,12 @@ spec: set -e /action/seed-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/deactivate.dev.yaml b/packages/kontinuous/tests/__snapshots__/deactivate.dev.yaml index fa93f277cf..0ce41ae0fa 100644 --- a/packages/kontinuous/tests/__snapshots__/deactivate.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/deactivate.dev.yaml @@ -68,8 +68,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -92,8 +96,12 @@ spec: kubectl delete namespace \\"$NAMESPACE\\" --now=true --wait=false fi resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi 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 33084cdfd1..b1bd3e5103 100644 --- a/packages/kontinuous/tests/__snapshots__/extends-ovh.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/extends-ovh.dev.yaml @@ -147,8 +147,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -187,8 +191,12 @@ spec: set -e /action/create-secrets.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -302,8 +310,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -342,8 +354,12 @@ spec: set -e /action/create-secrets.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml b/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml index 6ddf03111f..2d30d84b61 100644 --- a/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml @@ -338,8 +338,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -378,8 +382,12 @@ spec: set -e /action/create-secrets.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -493,8 +501,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -533,8 +545,12 @@ spec: set -e /action/create-secrets.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/include-file.dev.yaml b/packages/kontinuous/tests/__snapshots__/include-file.dev.yaml index d076bda6f1..68c9772343 100644 --- a/packages/kontinuous/tests/__snapshots__/include-file.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/include-file.dev.yaml @@ -148,8 +148,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: debian:stable @@ -167,8 +171,12 @@ spec: set -e Hello World ! resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml b/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml index 5a300c2114..1d4a220e46 100644 --- a/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml @@ -283,17 +283,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -302,11 +291,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 8Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 4Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -561,17 +550,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -580,11 +558,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml b/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml index d58bdacc98..c1d02314a6 100644 --- a/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/job-no-affinity.dev.yaml @@ -282,17 +282,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -301,11 +290,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml index 79b3a62cb2..db38554dd0 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build-options.dev.yaml @@ -150,8 +150,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -285,17 +289,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -304,11 +297,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml index 51e9814d9a..45688004e8 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build-stage.dev.yaml @@ -147,8 +147,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -197,8 +201,12 @@ spec: set -e /action/ensure-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -302,8 +310,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -339,8 +351,12 @@ spec: set -e /action/create-secret.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -458,8 +474,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -591,17 +611,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -610,11 +619,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -737,8 +746,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -870,17 +883,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -889,11 +891,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml index 11c4e53f8c..343b9d4193 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-build.dev.yaml @@ -147,8 +147,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -197,8 +201,12 @@ spec: set -e /action/ensure-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -302,8 +310,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -339,8 +351,12 @@ spec: set -e /action/create-secret.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -457,8 +473,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -590,17 +610,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -609,11 +618,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -735,8 +744,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -868,17 +881,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -887,11 +889,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/jobs-runs-map.dev.yaml b/packages/kontinuous/tests/__snapshots__/jobs-runs-map.dev.yaml index 98f9e5f7bd..ba4f0c0a66 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-runs-map.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-runs-map.dev.yaml @@ -146,8 +146,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -196,8 +200,12 @@ spec: set -e /action/ensure-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -301,8 +309,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -338,8 +350,12 @@ spec: set -e /action/create-secret.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi 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 a407e4e14e..61c980d6bb 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-uses-relative.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-uses-relative.dev.yaml @@ -146,8 +146,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -196,8 +200,12 @@ spec: set -e /action/ensure-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -301,8 +309,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -338,8 +350,12 @@ spec: set -e /action/create-secret.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi 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 498f9c1e24..9e8319c673 100644 --- a/packages/kontinuous/tests/__snapshots__/jobs-uses-self-ref.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/jobs-uses-self-ref.dev.yaml @@ -146,8 +146,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -196,8 +200,12 @@ spec: set -e /action/ensure-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -301,8 +309,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -338,8 +350,12 @@ spec: set -e /action/create-secret.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/meta-log.dev.yaml b/packages/kontinuous/tests/__snapshots__/meta-log.dev.yaml index 459b0a2e6b..550b119b89 100644 --- a/packages/kontinuous/tests/__snapshots__/meta-log.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/meta-log.dev.yaml @@ -149,8 +149,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: debian:stable @@ -162,8 +166,12 @@ spec: - name: KONTINUOUS_INPUT value: /kontinuous-input resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -270,8 +278,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: debian:stable @@ -283,8 +295,12 @@ spec: - name: KONTINUOUS_INPUT value: /kontinuous-input resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/output.dev.yaml b/packages/kontinuous/tests/__snapshots__/output.dev.yaml index 1c748df42e..6d09766f0d 100644 --- a/packages/kontinuous/tests/__snapshots__/output.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/output.dev.yaml @@ -173,8 +173,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: debian:stable @@ -192,8 +196,12 @@ spec: set -e echo earth>$KONTINUOUS_OUTPUT/WORLD resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -302,8 +310,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: debian:stable @@ -323,8 +335,12 @@ spec: echo \\"Hello $PLANET !\\" sleep 10 resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi 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 3a605c76bf..58ca356f43 100644 --- a/packages/kontinuous/tests/__snapshots__/override-env-default.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/override-env-default.dev.yaml @@ -242,8 +242,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -282,8 +286,12 @@ spec: set -e /action/create-secrets.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/pg.preprod.yaml b/packages/kontinuous/tests/__snapshots__/pg.preprod.yaml index 24d3fb90d3..006cacecc1 100644 --- a/packages/kontinuous/tests/__snapshots__/pg.preprod.yaml +++ b/packages/kontinuous/tests/__snapshots__/pg.preprod.yaml @@ -243,8 +243,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -283,8 +287,12 @@ spec: set -e /action/create-secrets.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/pg.prod.yaml b/packages/kontinuous/tests/__snapshots__/pg.prod.yaml index a9a87ea745..0bd63da591 100644 --- a/packages/kontinuous/tests/__snapshots__/pg.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/pg.prod.yaml @@ -242,8 +242,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -282,8 +286,12 @@ spec: set -e /action/create-secrets.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml index 479ec66891..fae83159d2 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.dev.yaml @@ -186,8 +186,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -324,17 +328,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -343,11 +336,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -469,8 +462,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -608,17 +605,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -627,11 +613,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -753,8 +739,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -888,17 +878,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -907,11 +886,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -1033,8 +1012,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1169,17 +1152,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -1188,11 +1160,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -1311,8 +1283,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:6.70.0 @@ -1361,8 +1337,12 @@ spec: set -e /action/ensure-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -1467,8 +1447,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: bitnami/kubectl:latest @@ -1504,8 +1488,12 @@ spec: set -e /action/create-secret.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1001 runAsGroup: 1001 @@ -1618,8 +1606,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:7.0.0 @@ -1643,8 +1635,12 @@ spec: set -e /action/drop-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -1752,8 +1748,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi - name: degit-action image: ghcr.io/socialgouv/kontinuous/degit:v1.181.2 command: @@ -1768,8 +1768,12 @@ spec: - name: action mountPath: /action resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: ghcr.io/socialgouv/docker/psql:7.0.0 @@ -1791,8 +1795,12 @@ spec: set -e /action/seed-db.sh resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml index 014946191e..ba96497405 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.preprod.yaml @@ -185,8 +185,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -319,17 +323,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -338,11 +331,11 @@ spec: echo \\"$IMAGE_PATH:preprod-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -464,8 +457,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -603,17 +600,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -622,11 +608,11 @@ spec: echo \\"$IMAGE_PATH:preprod-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -748,8 +734,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -883,17 +873,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -902,11 +881,11 @@ spec: echo \\"$IMAGE_PATH:preprod-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -1028,8 +1007,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1164,17 +1147,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -1183,11 +1155,11 @@ spec: echo \\"$IMAGE_PATH:preprod-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml b/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml index 59c40ea197..df6e63e463 100644 --- a/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/repo.domifa.prod.yaml @@ -183,8 +183,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -320,17 +324,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -339,11 +332,11 @@ spec: echo \\"$IMAGE_PATH:prod\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -465,8 +458,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -604,17 +601,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -623,11 +609,11 @@ spec: echo \\"$IMAGE_PATH:prod\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -749,8 +735,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -885,17 +875,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -904,11 +883,11 @@ spec: echo \\"$IMAGE_PATH:prod\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 @@ -1030,8 +1009,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -1167,17 +1150,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -1186,11 +1158,11 @@ spec: echo \\"$IMAGE_PATH:prod\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml index a775b6032f..e505824dad 100644 --- a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops-override.dev.yaml @@ -150,8 +150,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -284,17 +288,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -303,11 +296,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml index 9a645d9217..187f59941e 100644 --- a/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/socialgouv-autodevops.dev.yaml @@ -150,8 +150,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: moby/buildkit:v0.13.0-rootless @@ -283,17 +287,6 @@ spec: set -e - if [ \\"$status\\" -ne 0 ]; then - echo \\"Command failed. Handling error...\\" - if grep -q -e \\"listing workers for Build: failed to list workers: Unavailable\\" -e \\"closing transport due to: connection error\\" $tempfile; then - echo \\"buildkit optimized service unavailable, fallback to local build\\" - buildctl_cmd=\\"buildctl-daemonless.sh\\" - buildctl_options_mtls=\\"\\" - runBuildkit - else - exit $status - fi - fi echo \\"build succeeded.\\" @@ -302,11 +295,11 @@ spec: echo \\"$IMAGE_PATH:sha-ffac537e6cbbf934b08745a378932722df287a53\\" >$KONTINUOUS_OUTPUT/IMAGE resources: limits: - cpu: \\"2\\" - memory: 4Gi + cpu: \\"3\\" + memory: 250Mi requests: - cpu: 500m - memory: 1Gi + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/values-extends.dev.yaml b/packages/kontinuous/tests/__snapshots__/values-extends.dev.yaml index 0af7550def..88e119f242 100644 --- a/packages/kontinuous/tests/__snapshots__/values-extends.dev.yaml +++ b/packages/kontinuous/tests/__snapshots__/values-extends.dev.yaml @@ -149,8 +149,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: harbor.fabrique.social.gouv.fr/test-values-extends/app:sha-ffac537e6cbbf934b08745a378932722df287a53 @@ -167,8 +171,12 @@ spec: set -e yarn seed resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/__snapshots__/values-extends.preprod.yaml b/packages/kontinuous/tests/__snapshots__/values-extends.preprod.yaml index a81cec7330..84c21231c8 100644 --- a/packages/kontinuous/tests/__snapshots__/values-extends.preprod.yaml +++ b/packages/kontinuous/tests/__snapshots__/values-extends.preprod.yaml @@ -149,8 +149,12 @@ spec: - name: workspace mountPath: /workspace resources: - limits: {} - requests: {} + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 64m + memory: 32Mi containers: - name: job image: harbor.fabrique.social.gouv.fr/test-values-extends/app:preprod-ffac537e6cbbf934b08745a378932722df287a53 @@ -167,8 +171,12 @@ spec: set -e yarn seed resources: - limits: {} - requests: {} + limits: + cpu: \\"3\\" + memory: 1Gi + requests: + cpu: 64m + memory: 32Mi securityContext: runAsUser: 1000 runAsGroup: 1000 diff --git a/packages/kontinuous/tests/samples/job-builds/values.yaml b/packages/kontinuous/tests/samples/job-builds/values.yaml index 638705dcfc..521c741a88 100644 --- a/packages/kontinuous/tests/samples/job-builds/values.yaml +++ b/packages/kontinuous/tests/samples/job-builds/values.yaml @@ -1,8 +1,6 @@ build-app: ~chart: job use: build - memoryLimit: 8Gi - memoryRequest: 4Gi with: imagePackage: app buildArgs: diff --git a/plugins/contrib/charts/jobs/values.yaml b/plugins/contrib/charts/jobs/values.yaml index 5dee7222d3..48d2ca92d9 100644 --- a/plugins/contrib/charts/jobs/values.yaml +++ b/plugins/contrib/charts/jobs/values.yaml @@ -14,27 +14,27 @@ priorityClassName: "" serviceAccountName: "" resources: limits: - cpu: - memory: + cpu: "3" + memory: 1Gi requests: - cpu: - memory: + cpu: 64m + memory: 32Mi degitRepository: resources: limits: - cpu: - memory: + cpu: 200m + memory: 100Mi requests: - cpu: - memory: + cpu: 64m + memory: 32Mi degitAction: resources: limits: - cpu: - memory: + cpu: 200m + memory: 100Mi requests: - cpu: - memory: + cpu: 64m + memory: 32Mi deployKey: enabled: false secretRefName: deploy-key diff --git a/plugins/contrib/jobs/build/use.yaml b/plugins/contrib/jobs/build/use.yaml index 3ebeba122b..559097d818 100644 --- a/plugins/contrib/jobs/build/use.yaml +++ b/plugins/contrib/jobs/build/use.yaml @@ -7,10 +7,10 @@ runs: image: moby/buildkit:v0.13.0-rootless # image: ghcr.io/socialgouv/buildkit:v0.13.0-rootless # kubernetes: true - cpuLimit: "2" - cpuRequest: 500m - memoryLimit: 4Gi - memoryRequest: 1Gi + cpuLimit: "3" + cpuRequest: 64m + memoryLimit: 250Mi + memoryRequest: 32Mi entrypoint: ["/bin/sh", "-c"] user: 1000 group: 1000 @@ -144,6 +144,8 @@ runs: status=$? set -e + {{ if $.with.fallbackEnabled }} + # not compatible with enforced rootless cluster, so it's disabled by default if [ "$status" -ne 0 ]; then echo "Command failed. Handling error..." if grep -q -e "listing workers for Build: failed to list workers: Unavailable" -e "closing transport due to: connection error" $tempfile; then @@ -155,6 +157,7 @@ runs: exit $status fi fi + {{ end }} echo "build succeeded."