Skip to content

Commit c8e6870

Browse files
Expose extra specs granted by the common pkg
This change exposes the extra specs that already exist in the garm-provider-common package. This will allow us to use custom installer templates and inject extra context. Signed-off-by: Gabriel Adrian Samfira <[email protected]>
1 parent fabba4d commit c8e6870

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,21 @@ To this end, this provider supports the following extra specs schema:
7575
"enable_boot_debug": {
7676
"type": "boolean",
7777
"description": "Allows providers to set the -x flag in the runner install script."
78+
},
79+
"runner_install_template": {
80+
"type": "string",
81+
"description": "This option can be used to override the default runner install template. If used, the caller is responsible for the correctness of the template as well as the suitability of the template for the target OS. Use the extra_context extra spec if your template has variables in it that need to be expanded."
82+
},
83+
"extra_context": {
84+
"type": "object",
85+
"description": "Extra context that will be passed to the runner_install_template.",
86+
"additionalProperties": {
87+
"type": "string"
88+
}
89+
},
90+
"pre_install_scripts": {
91+
"type": "object",
92+
"description": "A map of pre-install scripts that will be run before the runner install script. These will run as root and can be used to prep a generic image before we attempt to install the runner. The key of the map is the name of the script as it will be written to disk. The value is a byte array with the contents of the script."
7893
}
7994
},
8095
"additionalProperties": false

provider/specs.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ const jsonSchema string = `
3434
"enable_boot_debug": {
3535
"type": "boolean",
3636
"description": "Allows providers to set the -x flag in the runner install script."
37+
},
38+
"runner_install_template": {
39+
"type": "string",
40+
"description": "This option can be used to override the default runner install template. If used, the caller is responsible for the correctness of the template as well as the suitability of the template for the target OS. Use the extra_context extra spec if your template has variables in it that need to be expanded."
41+
},
42+
"extra_context": {
43+
"type": "object",
44+
"description": "Extra context that will be passed to the runner_install_template.",
45+
"additionalProperties": {
46+
"type": "string"
47+
}
48+
},
49+
"pre_install_scripts": {
50+
"type": "object",
51+
"description": "A map of pre-install scripts that will be run before the runner install script. These will run as root and can be used to prep a generic image before we attempt to install the runner. The key of the map is the name of the script as it will be written to disk. The value is a byte array with the contents of the script."
3752
}
3853
},
3954
"additionalProperties": false

0 commit comments

Comments
 (0)