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,storage: support populating directories from archives
Tarballs are ubiquitous as a binary release format, and without any
builtin ability to fetch, validate, and extract them, we are left
with half-baked hacks to do all of this from the confines of a oneshot
systemd service, or worse, extracting and providing the entirety of the
archive contents as files and directory entries in the ignition config,
resulting in very large json documents.
Let's not do this. Instead, this commit formalizes the use of archives
via adding a new (optional) "contents" key under a directory entry.
This new contents key is identical in function as its eponymous version
in the "files" entries, except that it incorporates a new "archive"
subkey to specify the archive format rather than guessing with
heuristics. Today, only "archive": "tar" is supported, though this
commit is structured to allow the addition of other archive types if
needed.
Copy file name to clipboardExpand all lines: config/v3_4_experimental/types/schema.go
+11-1
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,15 @@ package types
2
2
3
3
// generated by "schematyper --package=types config/v3_4_experimental/schema/ignition.json -o config/v3_4_experimental/types/schema.go --root-type=Config" -- DO NOT EDIT
Copy file name to clipboardExpand all lines: docs/configuration-v3_4_experimental.md
+9
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,15 @@ The Ignition configuration is a JSON document conforming to the following specif
111
111
***_group_** (object): specifies the directory's group.
112
112
***_id_** (integer): the group ID of the group.
113
113
***_name_** (string): the group name of the group.
114
+
***_contents_** (object): options related to the contents of the directory. If specified, `overwrite` must be `true`.
115
+
***archive** (string): format of the archive to extract into the directory. must be `tar`.
116
+
***_compression_** (string): the type of compression used on the archive (null or gzip). Compression cannot be used with S3.
117
+
***_source_** (string): the URL of the archive to extract. Supported schemes are `http`, `https`, `tftp`, `s3`, `arn`, `gs`, and [`data`][rfc2397]. When using `http`, it is advisable to use the verification option to ensure the contents haven't been modified. If source is omitted and a directory already exists at the path, Ignition will do nothing. If source is omitted and no directory exists, an empty directory will be created.
118
+
***_httpHeaders_** (list of objects): a list of HTTP headers to be added to the request. Available for `http` and `https` source schemes only.
119
+
***name** (string): the header name.
120
+
***_value_** (string): the header contents.
121
+
***_verification_** (object): options related to the verification of the archive file.
122
+
***_hash_** (string): the hash of the archive file, in the form `<type>-<value>` where type is either `sha512` or `sha256`.
114
123
***_links_** (list of objects): the list of links to be created. Every file, directory, and link must have a unique `path`.
115
124
***path** (string): the absolute path to the link
116
125
***_overwrite_** (boolean): whether to delete preexisting nodes at the path. If overwrite is false and a matching link exists at the path, Ignition will only set the owner and group. Defaults to false.
0 commit comments