Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vars/coreos.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// kvm: bool
// runAsUser: int
// privileged: bool (deprecated, equivalent to `runAsUser: 0`)
// memory: amount of RAM to request
def pod(params, body) {
def podJSON = libraryResource 'com/github/coreos/pod.json'
def podObj = readJSON text: podJSON
Expand All @@ -23,6 +24,10 @@ def pod(params, body) {
podObj['spec']['nodeSelector'] = [oci_kvm_hook: "allowed"]
}

if (params['memory']) {
podObj['spec']['containers'][1]['resources'] = [requests: [memory: params['memory']]]
}

// XXX: look into converting to a YAML string instead
def label = "pod-${UUID.randomUUID().toString()}"
def podYAML
Expand Down