diff --git a/src/tech/avroid/kube/PodTemplates.groovy b/src/tech/avroid/kube/PodTemplates.groovy index 038e2aa..e22be82 100644 --- a/src/tech/avroid/kube/PodTemplates.groovy +++ b/src/tech/avroid/kube/PodTemplates.groovy @@ -272,6 +272,35 @@ class PodTemplates implements Serializable { } } + public void alpine(imageVersion='3.18.5', body) { + this.script.podTemplate( + cloud: this.cloud, + imagePullSecrets: this.dockerCreds, + containers: [ + this.script.containerTemplate( + alwaysPullImage: true, + name: 'alpine', + image: "${this.registry}/docker-hub-proxy/library/alpine:${imageVersion}", + ttyEnabled: true, + command: "cat", + resourceRequestCpu: '100m', + resourceRequestMemory: '64Mi', + resourceLimitCpu: '100m', + resourceLimitMemory: '64Mi', + ), + ], + showRawYaml: false, + volumes: [ + this.script.emptyDirVolume(memory: false, mountPath: '/tmp'), + ], + workspaceVolume: this.script.emptyDirWorkspaceVolume(false), + ) + + { + body.call() + } + } + public void containerAurora(imageVersion='5.1.0.100-2', body) { this.script.podTemplate( runAsUser: "1000", @@ -307,4 +336,5 @@ class PodTemplates implements Serializable { body.call() } } + }