Explorar o código

Add worker_address as a requirement for env variables

sonicaj %!s(int64=3) %!d(string=hai) anos
pai
achega
70b0c8dbe5

+ 10 - 0
charts/machinaris/1.0.11/questions.yaml

@@ -28,6 +28,16 @@ questions:
       type: string
       $ref:
         - "definitions/timezone"
+
+  - variable: nodeIP
+    description: "LAN IP address of your TrueNAS server"
+    group: "Machinaris Configuration"
+    label: "Worker Address"
+    schema:
+      type: string
+      $ref:
+        - "definitions/nodeIP"
+
   - variable: machinaris_ui_port
     label: "Machinaris Web UI"
     group: "Networking"

+ 1 - 0
charts/machinaris/1.0.11/templates/deployment.yaml

@@ -44,6 +44,7 @@ spec:
               hostPort: 8927
           {{ $envList := (default list .Values.environmentVariables) }}
           {{ $envList = mustAppend $envList (dict "name" "TZ" "value" $.Values.timezone) }}
+          {{ $envList = mustAppend $envList (dict "name" "worker_address" "value" $.Values.nodeIP) }}
           {{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
       volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
       {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}

+ 1 - 0
charts/machinaris/1.0.11/test_values.yaml

@@ -12,3 +12,4 @@ image:
 machinaris_ui_port: 31003
 timezone: America/Edmonton
 updateStrategy: Recreate
+nodeIP: 127.0.0.1

+ 10 - 0
test/machinaris/1.0.11/questions.yaml

@@ -28,6 +28,16 @@ questions:
       type: string
       $ref:
         - "definitions/timezone"
+
+  - variable: nodeIP
+    description: "LAN IP address of your TrueNAS server"
+    group: "Machinaris Configuration"
+    label: "Worker Address"
+    schema:
+      type: string
+      $ref:
+        - "definitions/nodeIP"
+
   - variable: machinaris_ui_port
     label: "Machinaris Web UI"
     group: "Networking"

+ 1 - 0
test/machinaris/1.0.11/templates/deployment.yaml

@@ -44,6 +44,7 @@ spec:
               hostPort: 8927
           {{ $envList := (default list .Values.environmentVariables) }}
           {{ $envList = mustAppend $envList (dict "name" "TZ" "value" $.Values.timezone) }}
+          {{ $envList = mustAppend $envList (dict "name" "worker_address" "value" $.Values.nodeIP) }}
           {{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
       volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
       {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}

+ 1 - 0
test/machinaris/1.0.11/test_values.yaml

@@ -12,3 +12,4 @@ image:
 machinaris_ui_port: 31003
 timezone: America/Edmonton
 updateStrategy: Recreate
+nodeIP: 127.0.0.1