manifests

package
v0.90.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 41 Imported by: 3

Documentation

Index

Constants

View Source
const PreNetworkConfigScript = `` /* 8725-byte string literal not displayed */

PreNetworkConfigScript script runs on hosts before network manager service starts in order to apply user's provided network configuration on the host. If the user provides static network configuration, the network config files will be stored in directory /etc/assisted/network in the following structure:

	+-- host1
	|      +--- *.nmconnection
	|      +--- mac_interface.ini
	+-- host2
	      +--- *.nmconnection
	      +--- mac_interface.ini
 1. *.nmconnections - files generated by nmstate based on yaml files provided by the user
 2. mac_interface.ini - the file contains mapping of mac-address to logical interface name.
    There are two usages for the file:
 1. Map logical interface name to MAC Address of the host. The logical interface name is a
    name provided by the user for the interface. It will be replaced by the script with the
    actual network interface name.
 2. Identify if a host directory belongs to the current host by matching a MAC Address
    from the mapping file with host network interfaces.

Applying the network configuration of each host will be done by:

  1. Associate the current host with its matching hostX directories. The association will be done by matching host's mac addresses with those in mac_interface.ini.
  2. Replace logical interface name in nmconnection files with the interface name as set on the host
  3. Rename nmconnection files to start with the interface name (instead of the logical interface name)
  4. Copy the nmconnection files to the target directory. That will be '/etc/NetworkManager/system-connections' when the script is part of the full ISO and '/etc/coreos-firstboot-network' when the script is part of the minimal ISO.

Variables

This section is empty.

Functions

func GetMultipleYamls

func GetMultipleYamls[T any](contents []byte) ([]T, error)

GetMultipleYamls reads a YAML file containing multiple YAML definitions of the same format Each specific format must be of type DecodeFormat

func GetNMIgnitionFiles

func GetNMIgnitionFiles(staticNetworkConfig []*models.HostStaticNetworkConfig) ([]staticnetworkconfig.StaticNetworkConfigData, error)

GetNMIgnitionFiles returns the list of NetworkManager configuration files

func GetNodeZeroIP

func GetNodeZeroIP(hosts []agenttype.Host, nmStateConfigs []*aiv1beta1.NMStateConfig) (string, error)

GetNodeZeroIP retrieves the first IP to be set as the node0 IP. The method prioritizes the search by trying to scan first the NMState configs defined in the agent-config hosts - so that it would be possible to skip the worker nodes - and then the NMStateConfig.

func OpenshiftManifestDir added in v0.9.153

func OpenshiftManifestDir() string

OpenshiftManifestDir returns the name of directory to add extra manifests.

Types

type AgentClusterInstall

type AgentClusterInstall struct {
	File   *asset.File
	Config *hiveext.AgentClusterInstall
}

AgentClusterInstall generates the agent-cluster-install.yaml file.

func (*AgentClusterInstall) Dependencies

func (*AgentClusterInstall) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed to generate the asset.

func (*AgentClusterInstall) FIPSEnabled added in v0.9.153

func (a *AgentClusterInstall) FIPSEnabled() bool

FIPSEnabled returns whether FIPS is enabled in the cluster configuration.

func (*AgentClusterInstall) Files

func (a *AgentClusterInstall) Files() []*asset.File

Files returns the files generated by the asset.

func (*AgentClusterInstall) Generate

func (a *AgentClusterInstall) Generate(_ context.Context, dependencies asset.Parents) error

Generate generates the AgentClusterInstall manifest.

func (*AgentClusterInstall) GetExternalPlatformName added in v0.9.153

func (a *AgentClusterInstall) GetExternalPlatformName() string

GetExternalPlatformName returns the platform name for the external platform.

func (*AgentClusterInstall) Load

Load returns agentclusterinstall asset from the disk.

func (*AgentClusterInstall) Name

func (*AgentClusterInstall) Name() string

Name returns a human friendly name for the asset.

type AgentManifests

type AgentManifests struct {
	FileList []*asset.File

	PullSecret           *corev1.Secret
	InfraEnv             *aiv1beta1.InfraEnv
	StaticNetworkConfigs []*models.HostStaticNetworkConfig
	NMStateConfigs       []*aiv1beta1.NMStateConfig
	AgentClusterInstall  *hiveext.AgentClusterInstall
	ClusterDeployment    *hivev1.ClusterDeployment
	ClusterImageSet      *hivev1.ClusterImageSet
}

AgentManifests generates all the required manifests by the agent installer.

func (*AgentManifests) Dependencies

func (m *AgentManifests) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed the asset.

func (*AgentManifests) Files

func (m *AgentManifests) Files() []*asset.File

Files returns the files generated by the asset.

func (*AgentManifests) Generate

func (m *AgentManifests) Generate(_ context.Context, dependencies asset.Parents) error

Generate generates the respective manifest files.

func (*AgentManifests) GetPullSecretData

func (m *AgentManifests) GetPullSecretData() string

GetPullSecretData returns the content of the pull secret

func (*AgentManifests) Load

func (m *AgentManifests) Load(f asset.FileFetcher) (bool, error)

Load currently does nothing

func (*AgentManifests) Name

func (m *AgentManifests) Name() string

Name returns a human friendly name.

type AgentPullSecret

type AgentPullSecret struct {
	File   *asset.File
	Config *corev1.Secret
}

AgentPullSecret generates the pull-secret file used by the agent installer.

func (*AgentPullSecret) Dependencies

func (*AgentPullSecret) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed to generate the asset.

func (*AgentPullSecret) Files

func (a *AgentPullSecret) Files() []*asset.File

Files returns the files generated by the asset.

func (*AgentPullSecret) Generate

func (a *AgentPullSecret) Generate(_ context.Context, dependencies asset.Parents) error

Generate generates the AgentPullSecret manifest.

func (*AgentPullSecret) GetPullSecretData added in v0.9.153

func (a *AgentPullSecret) GetPullSecretData() string

GetPullSecretData returns the content of the pull secret.

func (*AgentPullSecret) Load

func (a *AgentPullSecret) Load(f asset.FileFetcher) (bool, error)

Load returns the asset from disk.

func (*AgentPullSecret) Name

func (*AgentPullSecret) Name() string

Name returns a human friendly name for the asset.

type ClusterDeployment

type ClusterDeployment struct {
	File   *asset.File
	Config *hivev1.ClusterDeployment
}

ClusterDeployment generates the cluster-deployment.yaml file.

func (*ClusterDeployment) Dependencies

func (*ClusterDeployment) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed to generate the asset.

func (*ClusterDeployment) Files

func (cd *ClusterDeployment) Files() []*asset.File

Files returns the files generated by the asset.

func (*ClusterDeployment) Generate

func (cd *ClusterDeployment) Generate(_ context.Context, dependencies asset.Parents) error

Generate generates the ClusterDeployment manifest.

func (*ClusterDeployment) Load

func (cd *ClusterDeployment) Load(f asset.FileFetcher) (bool, error)

Load returns ClusterDeployment asset from the disk.

func (*ClusterDeployment) Name

func (*ClusterDeployment) Name() string

Name returns a human friendly name for the asset.

type ClusterImageSet

type ClusterImageSet struct {
	File   *asset.File
	Config *hivev1.ClusterImageSet
}

ClusterImageSet generates the cluster-image-set.yaml file.

func (*ClusterImageSet) Dependencies

func (*ClusterImageSet) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed to generate the asset.

func (*ClusterImageSet) Files

func (a *ClusterImageSet) Files() []*asset.File

Files returns the files generated by the asset.

func (*ClusterImageSet) Generate

func (a *ClusterImageSet) Generate(ctx context.Context, dependencies asset.Parents) error

Generate generates the ClusterImageSet manifest.

func (*ClusterImageSet) Load

func (a *ClusterImageSet) Load(f asset.FileFetcher) (bool, error)

Load returns ClusterImageSet asset from the disk.

func (*ClusterImageSet) Name

func (*ClusterImageSet) Name() string

Name returns a human friendly name for the asset.

type ExtraManifests

type ExtraManifests struct {
	FileList []*asset.File
}

ExtraManifests manages the additional manifests for cluster customization

func (*ExtraManifests) Dependencies

func (em *ExtraManifests) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed by the Master asset

func (*ExtraManifests) Files

func (em *ExtraManifests) Files() []*asset.File

Files returns the files generated by the asset.

func (*ExtraManifests) Generate

func (em *ExtraManifests) Generate(_ context.Context, dependencies asset.Parents) error

Generate is not required for ExtraManifests.

func (*ExtraManifests) Load

func (em *ExtraManifests) Load(f asset.FileFetcher) (found bool, err error)

Load reads the asset files from disk.

func (*ExtraManifests) Name

func (em *ExtraManifests) Name() string

Name returns a human friendly name for the operator

type InfraEnv

type InfraEnv struct {
	File   *asset.File
	Config *aiv1beta1.InfraEnv
}

InfraEnv generates the infraenv.yaml file.

func (*InfraEnv) Dependencies

func (*InfraEnv) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed to generate the asset.

func (*InfraEnv) Files

func (i *InfraEnv) Files() []*asset.File

Files returns the files generated by the asset.

func (*InfraEnv) Generate

func (i *InfraEnv) Generate(_ context.Context, dependencies asset.Parents) error

Generate generates the InfraEnv manifest.

func (*InfraEnv) Load

func (i *InfraEnv) Load(f asset.FileFetcher) (bool, error)

Load returns infraenv asset from the disk.

func (*InfraEnv) Name

func (*InfraEnv) Name() string

Name returns a human friendly name for the asset.

type NMStateConfig

type NMStateConfig struct {
	File                *asset.File
	StaticNetworkConfig []*models.HostStaticNetworkConfig
	Config              []*aiv1beta1.NMStateConfig
}

NMStateConfig generates the nmstateconfig.yaml file.

func (*NMStateConfig) Dependencies

func (*NMStateConfig) Dependencies() []asset.Asset

Dependencies returns all of the dependencies directly needed to generate the asset.

func (*NMStateConfig) Files

func (n *NMStateConfig) Files() []*asset.File

Files returns the files generated by the asset.

func (*NMStateConfig) Generate

func (n *NMStateConfig) Generate(_ context.Context, dependencies asset.Parents) error

Generate generates the NMStateConfig manifest.

func (*NMStateConfig) Load

func (n *NMStateConfig) Load(f asset.FileFetcher) (bool, error)

Load returns the NMStateConfig asset from the disk.

func (*NMStateConfig) Name

func (*NMStateConfig) Name() string

Name returns a human friendly name for the asset.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL