Documentation ¶
Overview ¶
package config contains all the logic around kcrypt config This config includes everything below `kcrypt:` in the kairos config yaml
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConfigScanDirs = []string{"/oem", "/sysroot/oem"}
There are the directories under which we expect to find kairos configuration. When we are booted from an iso (during installation), configuration is expected under `/oem`. When we are booting an installed system (in initramfs phase), the path is `/sysroot/oem`.
var MappingsFile = "/oem/91-kcrypt-mappings.yaml"
This file is "hardcoded" to `/oem` because we only use this at install time in which case the config is in `/oem`.
Functions ¶
func PartitionToString ¶
Types ¶
type Config ¶
type Config struct { Kcrypt struct { UUIDLabelMappings map[string]string `yaml:"uuid_label_mappings,omitempty"` } }
func GetConfiguration ¶
func (Config) GetLabelForUUID ¶ added in v0.6.0
GetLabelForUUID returns the partition label for a known UUID UUIDS are generated on luksify method They are generated by setting the namespace to DNS and the name to the fs label, so they are always the same
func (Config) LookupLabelForUUID ¶
func (Config) LookupUUIDForLabel ¶
func (*Config) SetMapping ¶
SetMapping updates the Config with partition information for one partition. This doesn't persist on the file. WriteMappings needs to be called after all mapping are in the Config (possibly with multiple calls to this function).
func (*Config) WriteMappings ¶
WriteMappings will create or replace the MappingsFile It's called by kairos agent, at installation time, after the partitions have been created (and we have the UUIDs available).