From b4d08362021677ff67729de27fa77ffcca40f6de Mon Sep 17 00:00:00 2001 From: Boris Shestov Date: Tue, 14 Jan 2025 16:21:21 +0300 Subject: [PATCH] DO-1466--append_aurora_pod_templates (#53) [DO-1466] Co-authored-by: Boris Shestov Reviewed-on: https://git.avroid.tech/DevOps/jenkins-shared-lib/pulls/53 Reviewed-by: Aleksandr Vodyanov --- src/tech/avroid/kube/PodTemplates.groovy | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/tech/avroid/kube/PodTemplates.groovy b/src/tech/avroid/kube/PodTemplates.groovy index bfc1814..038e2aa 100644 --- a/src/tech/avroid/kube/PodTemplates.groovy +++ b/src/tech/avroid/kube/PodTemplates.groovy @@ -272,4 +272,39 @@ class PodTemplates implements Serializable { } } + public void containerAurora(imageVersion='5.1.0.100-2', body) { + this.script.podTemplate( + runAsUser: "1000", + runAsGroup: "1000", + cloud: this.cloud, + imagePullSecrets: this.dockerCreds, + containers: [ + this.script.containerTemplate( + alwaysPullImage: true, + name: 'aurora', + privileged: true, + image: "${this.registry}/container/container-build-aurora:${imageVersion}", + ttyEnabled: true, + command: "cat", + resourceRequestCpu: '15', + resourceRequestMemory: '32Gi', + resourceLimitCpu: '15', + resourceLimitMemory: '128Gi', + ), + ], + annotations: [[ + key: 'container.apparmor.security.beta.kubernetes.io/aurora', + value: 'unconfined' + ]], + showRawYaml: false, + volumes: [ + this.script.emptyDirVolume(memory: false, mountPath: '/tmp'), + ], + workspaceVolume: this.script.emptyDirWorkspaceVolume(false), + ) + + { + body.call() + } + } }