You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| CONFIG_MAP_NAME | The name of the configmap to read the config from |
20
+
| POD_IP | The IP of the controller Pod. If defined, this IP is used for the callback URL of the job pods.(should be injected via [Downward API](https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/#the-downward-api)) |
16
21
17
-
| Name | Value |
18
-
| --- | --- |
19
-
| NAMESPACE | The current namespace |
20
-
| CONFIG_MAP_NAME | The name of the configmap to read the config from |
22
+
## Configuration
21
23
22
-
## Configuration
23
-
24
-
The configuration has to be stored in a configmap with the following values
24
+
The configuration has to be stored in a configmap with the following values
25
25
26
26
### config.yaml
27
27
@@ -30,7 +30,7 @@ Controller configuration
30
30
```yaml
31
31
name: ""# name of the controller; will also be used as prefix for the job pods
32
32
jobServiceAccount: ""# service account to be used for the job pods. If empty the default will be used
33
-
jobNodeSelector: {} # node selector labels to define in which nodes to run the jobs
33
+
jobNodeSelector: {} # node selector labels to define in which nodes to run the jobs
34
34
runOnUnscheduledNodes: true # if true, jobs are also started on nodes that are unschedulable
35
35
cronExpression: "42 3 * * *"# the cron expression to trigger the job execution
36
36
reportDirectory: "/var/www"# directory to store and serve the reports
@@ -40,23 +40,23 @@ runOnStartup: true # if 'true' the jobs are triggered on startup o
40
40
startupDelay: 10s# the delay as duration that is used to start the jobs if runOnStartup is enabled. default is '10s'
41
41
callbackServiceName: ""# name of the controller service
42
42
callbackServicePort: 8090# port of the controller callback api service
43
-
custom: {} # additional properties that can be used in a custom implementation
43
+
custom: {} # additional properties that can be used in a custom implementation
44
44
latestMetricsLabel: false # if 'true' each result metric is also created with executionID='latest'
45
45
leaderElectionResourceLock: ""# type of leader election resource lock to be used. ('configmapsleases' (default), 'configmaps', 'endpoints', 'leases', 'endpointsleases')
46
46
metrics:
47
47
prefix: "foo_...."# prefix for the metrics exposed by the controller
48
-
gauges: # metric gauges that will be exposed by the jobs. The key is uses as suffix for the metrics.
49
-
test: # suffix of the metric
48
+
gauges: # metric gauges that will be exposed by the jobs. The key is uses as suffix for the metrics.
49
+
test: # suffix of the metric
50
50
help: "help ..."# help text for the metric
51
-
labels: # list of labels to be used with the metric. node and executionID are automatically added
51
+
labels: # list of labels to be used with the metric. node and executionID are automatically added
52
52
- label_a
53
53
- label_b
54
54
```
55
55
56
56
### pod-template.yaml
57
57
58
-
The template of the pod to be started for each job.
59
-
When a pod is created it gets enriched by the controller specific configuration. [pkg\job\job.go](pkg\job\job.go)
58
+
The template of the pod to be started for each job. When a pod is created it gets enriched by the controller specific
59
+
configuration. [pkg\job\job.go](pkg\job\job.go)
60
60
61
61
## Job Pod
62
62
@@ -77,17 +77,17 @@ The job pod has the following env variables provided by the controller:
77
77
78
78
### Callback
79
79
80
-
The controller exposes by default an endpoint to receive job results. The report is stored locally and metrics of the reports will be exposed.
80
+
The controller exposes by default an endpoint to receive job results. The report is stored locally and metrics of the
81
+
reports will be exposed.
81
82
82
83
#### URL
83
84
84
85
The report URL is by default: **${CALLBACK_SERVICE_RESULT_URL}**
85
86
86
87
#### Body
87
88
88
-
The body of the report contains the metric suffixes that are also defined in the controller config.
89
-
Each metric has a decimal value and a map where the key is the label name and value is the value to be used for the metric label.
90
-
89
+
The body of the report contains the metric suffixes that are also defined in the controller config. Each metric has a
90
+
decimal value and a map where the key is the label name and value is the value to be used for the metric label.
91
91
92
92
```json
93
93
{
@@ -113,29 +113,34 @@ Each metric has a decimal value and a map where the key is the label name and va
113
113
Example job script: [helm\batch-job-controller\bin\run.sh](helm\batch-job-controller\bin\run.sh)
114
114
115
115
### Upload additional files
116
-
Additional files can be uploaded.
117
116
118
-
Use default **'Content-Disposition'** header or the **name** query parameter to define the name of the file. If the name is not defined an uuid is generated.
119
-
Each filename is prepended with the node name.
117
+
Additional files can be uploaded.
118
+
119
+
Use default **'Content-Disposition'** header or the **name** query parameter to define the name of the file. If the name
120
+
is not defined an uuid is generated. Each filename is prepended with the node name.
120
121
121
122
#### URL
122
123
123
124
The report URL is by default: **${CALLBACK_SERVICE_FILE_URL}**
124
125
125
126
### Create k8s Events from job pod
127
+
126
128
k8s Event can be created from each job pod by calling the event endpoint.
127
129
128
130
The 'reason' should be short and unique; it must be in UpperCamelCase format (starting with a capital letter).
0 commit comments