kops/upup/pkg/fi/nodeup
justinsb ea3122bf67 Minimal cluster-api integration
This only barely works, but we can start to boot machines and make
incremental progress.
2024-02-28 22:40:15 -05:00
..
install refactor: Introduce DeletionProcessingMode 2024-02-15 08:12:19 -05:00
local refactor: Introduce DeletionProcessingMode 2024-02-15 08:12:19 -05:00
nodetasks gce: Remove custom resolver 2023-12-23 08:17:47 +02:00
OWNERS fix OWNERS labels format 2020-03-10 22:47:50 -05:00
README.md - fixing up the spelling mistakes found 2018-06-06 10:03:51 +01:00
command.go Minimal cluster-api integration 2024-02-28 22:40:15 -05:00
loader.go Refactor Context into separate cloudup and nodeup types 2022-12-17 17:42:46 -08:00

README.md

NodeUp Tasks

Within a model, we recognize a few well-known task names:

  • files
  • packages
  • services
  • options

When a directory is found with one of these well-known names, the items in the subtree build tasks of the corresponding types.

(TODO: Should we just prefer extensions everywhere?)

Directories which start with an underscore are tags: we only descend into those directories if the relevant tag is present.

All other directory names can be used for organization.

Alongside each task file, a file with the same name with a .meta extension will be recognized as well. It contains additional JSON options to parameterize the task. This is useful for files or templates, which otherwise have no place to put metadata.

files

The contents of the filesystem tree will be created, mirroring what exists under the files directory.

Directories will be created as needed. Created directories will be set to mode 0755.

Files will be created 0644 (change with meta 'fileMode')

Owner & group will be root:root

Two special extensions are recognized:

  • .asset will be sourced from assets. Assets are binaries that are made available to the installer, e.g. from a .tar.gz distributions
  • .template is a go template

packages

Any files found will be considered packages.

The name of the file will be the package to be installed.

services

Any files found will be considered services.

The name of the file will be the service to be managed.

By default, the service will be restarted and set to auto-start on boot.

Order of operations

Logically, all operations are collected before any are performed, according to the tags.

Then operations are performed in the following order:

options packages files sysctls services

Ties are broken as follows

  • A task that required more tags is run after a task that required fewer tags
  • Sorted by name
  • Custom packages (install a deb) are run after OS provided packages