Playground

This commit is contained in:
Daniel Berteaud 2023-08-13 23:18:33 +02:00
parent f38ca7dc77
commit e1c14913c8
4 changed files with 44 additions and 2 deletions

View File

@ -1 +0,0 @@
../../common

View File

@ -5,7 +5,7 @@ app {
pack {
name = "democratic_csi"
description = "CSI plugin for Nomad to use storage (NFS and iSCSI) from FreeNAS / TrueNAS"
url = "https://git.lapiole.org/dani/nomad/packs/democfratic_csi"
url = "https://git.lapiole.org/dani/nomad/packs/democratic_csi"
version = "0.0.1"
}

View File

@ -67,6 +67,48 @@ iscsi:
extentBlocksize: 512
extentRpm: "SSD"
extentAvailThreshold: 0
driver: freenas-api-iscsi
instance_id:
httpConnection:
protocol: [[ .common.namespace ]]
host: {{ env "TRUENAS_API_HOST" }}
port: {{ env "TRUENAS_API_PORT" }}
apiKey: {{ with secret (printf "%skv/service/democratic-csi" (env "VAULT_PREFIX")) }}{{ .Data.data.truenas_api_key }}{{ end }}
allowInsecure: {{ env "TRUENAS_API_INSECURE" }}
apiVersion: 2
zfs:
datasetParentName: {{ env "ZFS_PARENT" }}
detachedSnapshotsDatasetParentName: {{ env "ZFS_SNAP_PARENT" }}
zvolCompression:
zvolDedup:
zvolEnableReservation: {{ env "ZFS_RESERVATION" }}
zvolBlocksize: {{ env "ZFS_BLOCKSIZE" }}
iscsi:
targetPortals:
{{ range $idx, $portal := (env "ISCSI_PORTALS" | split ",") }}
- {{ $portal }}{{ end }}
interface:
namePrefix: ""
nameSuffix: ""
targetGroups:
- targetGroupPortalGroup: 1
targetGroupInitiatorGroup: 1
targetGroupAuthType: None
targetGroupAuthGroup:
extentInsecureTpc: true
extentXenCompat: false
extentDisablePhysicalBlocksize: false
extentBlocksize: 512
extentRpm: "SSD"
extentAvailThreshold: 0
EOF
destination = "${NOMAD_SECRETS_DIR}/config.yml"

View File

@ -33,6 +33,7 @@ job "democratic-csi-controller" {
template {
data =<<-EOF
[[ template "iscsi_controller" . ]]
[[ fileContents "files/iscsi/controller.yml.tpl" ]]
EOF
destination = "${NOMAD_SECRETS_DIR}/config.yml"
}