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() + } + } }