-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add resources limits to linked container as required (#393)
- Loading branch information
1 parent
72bcaf0
commit 3668bc0
Showing
13 changed files
with
777 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
.../testdata/complex/service-templates/test2d-nginx-php/cronjob-cronjob-cli-drush-cron2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
annotations: | ||
lagoon.sh/branch: main | ||
lagoon.sh/version: v2.7.x | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: cronjob-cli | ||
app.kubernetes.io/managed-by: build-deploy-tool | ||
app.kubernetes.io/name: cronjob-cli-persistent | ||
lagoon.sh/buildType: branch | ||
lagoon.sh/environment: main | ||
lagoon.sh/environmentType: production | ||
lagoon.sh/project: example-project | ||
lagoon.sh/service: cli | ||
lagoon.sh/service-type: cli-persistent | ||
lagoon.sh/template: cli-persistent-0.1.0 | ||
name: cronjob-cli-drush-cron2 | ||
spec: | ||
concurrencyPolicy: Forbid | ||
failedJobsHistoryLimit: 1 | ||
jobTemplate: | ||
metadata: | ||
creationTimestamp: null | ||
spec: | ||
template: | ||
metadata: | ||
annotations: | ||
lagoon.sh/branch: main | ||
lagoon.sh/configMapSha: abcdefg1234567890 | ||
lagoon.sh/version: v2.7.x | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: cronjob-cli | ||
app.kubernetes.io/managed-by: build-deploy-tool | ||
app.kubernetes.io/name: cronjob-cli-persistent | ||
lagoon.sh/buildType: branch | ||
lagoon.sh/environment: main | ||
lagoon.sh/environmentType: production | ||
lagoon.sh/project: example-project | ||
lagoon.sh/service: cli | ||
lagoon.sh/service-type: cli-persistent | ||
lagoon.sh/template: cli-persistent-0.1.0 | ||
spec: | ||
containers: | ||
- command: | ||
- /lagoon/cronjob.sh | ||
- drush cron | ||
env: | ||
- name: LAGOON_GIT_SHA | ||
value: "0000000000000000000000000000000000000000" | ||
- name: SERVICE_NAME | ||
value: cli | ||
envFrom: | ||
- configMapRef: | ||
name: lagoon-env | ||
image: harbor.example/example-project/main/cli@sha256:b2001babafaa8128fe89aa8fd11832cade59931d14c3de5b3ca32e2a010fbaa8 | ||
imagePullPolicy: Always | ||
name: cronjob-cli-drush-cron2 | ||
resources: | ||
limits: | ||
ephemeral-storage: 160Gi | ||
memory: 16Gi | ||
requests: | ||
cpu: 10m | ||
ephemeral-storage: 1Gi | ||
memory: 10Mi | ||
securityContext: {} | ||
volumeMounts: | ||
- mountPath: /var/run/secrets/lagoon/sshkey/ | ||
name: lagoon-sshkey | ||
readOnly: true | ||
- mountPath: /app/docroot/sites/default/files//php | ||
name: nginx-php-twig | ||
- mountPath: /app/docroot/sites/default/files/ | ||
name: nginx-php | ||
dnsConfig: | ||
options: | ||
- name: timeout | ||
value: "60" | ||
- name: attempts | ||
value: "10" | ||
enableServiceLinks: false | ||
imagePullSecrets: | ||
- name: lagoon-internal-registry-secret | ||
priorityClassName: lagoon-priority-production | ||
restartPolicy: Never | ||
securityContext: | ||
fsGroup: 10001 | ||
runAsGroup: 0 | ||
runAsUser: 10000 | ||
volumes: | ||
- name: lagoon-sshkey | ||
secret: | ||
defaultMode: 420 | ||
secretName: lagoon-sshkey | ||
- emptyDir: {} | ||
name: nginx-php-twig | ||
- name: nginx-php | ||
persistentVolumeClaim: | ||
claimName: nginx-php | ||
schedule: 18,48 * * * * | ||
startingDeadlineSeconds: 240 | ||
successfulJobsHistoryLimit: 0 | ||
status: {} |
107 changes: 107 additions & 0 deletions
107
internal/testdata/complex/service-templates/test2d-nginx-php/deployment-cli.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
lagoon.sh/branch: main | ||
lagoon.sh/version: v2.7.x | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: cli | ||
app.kubernetes.io/managed-by: build-deploy-tool | ||
app.kubernetes.io/name: cli-persistent | ||
lagoon.sh/buildType: branch | ||
lagoon.sh/environment: main | ||
lagoon.sh/environmentType: production | ||
lagoon.sh/project: example-project | ||
lagoon.sh/service: cli | ||
lagoon.sh/service-type: cli-persistent | ||
lagoon.sh/template: cli-persistent-0.1.0 | ||
name: cli | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/instance: cli | ||
app.kubernetes.io/name: cli-persistent | ||
strategy: {} | ||
template: | ||
metadata: | ||
annotations: | ||
lagoon.sh/branch: main | ||
lagoon.sh/configMapSha: abcdefg1234567890 | ||
lagoon.sh/version: v2.7.x | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/instance: cli | ||
app.kubernetes.io/managed-by: build-deploy-tool | ||
app.kubernetes.io/name: cli-persistent | ||
lagoon.sh/buildType: branch | ||
lagoon.sh/environment: main | ||
lagoon.sh/environmentType: production | ||
lagoon.sh/project: example-project | ||
lagoon.sh/service: cli | ||
lagoon.sh/service-type: cli-persistent | ||
lagoon.sh/template: cli-persistent-0.1.0 | ||
spec: | ||
containers: | ||
- env: | ||
- name: LAGOON_GIT_SHA | ||
value: "0000000000000000000000000000000000000000" | ||
- name: CRONJOBS | ||
value: | | ||
3,18,33,48 * * * * drush cron | ||
- name: SERVICE_NAME | ||
value: cli | ||
envFrom: | ||
- configMapRef: | ||
name: lagoon-env | ||
image: harbor.example/example-project/main/cli@sha256:b2001babafaa8128fe89aa8fd11832cade59931d14c3de5b3ca32e2a010fbaa8 | ||
imagePullPolicy: Always | ||
name: cli | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- if [ -x /bin/entrypoint-readiness ]; then /bin/entrypoint-readiness; | ||
fi | ||
failureThreshold: 3 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 2 | ||
resources: | ||
limits: | ||
ephemeral-storage: 160Gi | ||
memory: 16Gi | ||
requests: | ||
cpu: 10m | ||
ephemeral-storage: 1Gi | ||
memory: 10Mi | ||
securityContext: {} | ||
volumeMounts: | ||
- mountPath: /var/run/secrets/lagoon/sshkey/ | ||
name: lagoon-sshkey | ||
readOnly: true | ||
- mountPath: /app/docroot/sites/default/files//php | ||
name: nginx-php-twig | ||
- mountPath: /app/docroot/sites/default/files/ | ||
name: nginx-php | ||
enableServiceLinks: false | ||
imagePullSecrets: | ||
- name: lagoon-internal-registry-secret | ||
priorityClassName: lagoon-priority-production | ||
securityContext: | ||
fsGroup: 10001 | ||
runAsGroup: 0 | ||
runAsUser: 10000 | ||
volumes: | ||
- name: lagoon-sshkey | ||
secret: | ||
defaultMode: 420 | ||
secretName: lagoon-sshkey | ||
- emptyDir: {} | ||
name: nginx-php-twig | ||
- name: nginx-php | ||
persistentVolumeClaim: | ||
claimName: nginx-php | ||
status: {} |
Oops, something went wrong.