From c84e2258f71a7ca9867533bb90a40a978c23a799 Mon Sep 17 00:00:00 2001 From: Bruce Becker Date: Sun, 6 Nov 2022 14:33:54 +0100 Subject: [PATCH] fix(csi): update csi hostpath operator to use go 18 (#12) fix(csi): update csi hostpath operator to use go 18 fix(csi): set go version from nomad variable in env chore(csi): add explicit resource requirements to csi operator job chore(csi): remove cached git clone if retry refactor(csi): create prestart job for installing the controller refactor(csi): fix path to plugin download feat(csi): add an update strategy chore(csi): add the build command chore(csi): fix getter options for git repo fix(csi): force plugin git getter to use dir mode feat(csi): add restart strategy fix(csi): use raw_exec driver since we need elevated privileges chore(csi): add alternative build command Signed-off-by: Bruce Becker --- csi-hostpath-operator.nomad | 49 ++++++++++++++++--- csi-hostpath.nomad | 96 +++++++++++++++++++++++++++++++++---- 2 files changed, 131 insertions(+), 14 deletions(-) diff --git a/csi-hostpath-operator.nomad b/csi-hostpath-operator.nomad index 67bc9dd..6669521 100644 --- a/csi-hostpath-operator.nomad +++ b/csi-hostpath-operator.nomad @@ -1,11 +1,48 @@ +variable "go_version" { + type = string + description = "Version of Go to use for compiling the plugin" + default = "1.18.8" +} job "csi" { datacenters = ["dc1"] type = "sysbatch" - group "hostpath" { + task "go19" { + resources { + cpu = 100 + memory = 100 + } + driver = "exec" + lifecycle { + hook = "prestart" + } + env { + ARCH = attr.cpu.arch + GO_VERSION = var.go_version + PATH = "${NOMAD_ALLOC_DIR}/usr/local/go/bin:${PATH}" + } + config { + command = "local/script.sh" + } + template { + data = <