Documentation ¶
Index ¶
- Constants
- func GetMultipleYamls[T any](contents []byte) ([]T, error)
- func GetNMIgnitionFiles(staticNetworkConfig []*models.HostStaticNetworkConfig) ([]staticnetworkconfig.StaticNetworkConfigData, error)
- func GetNodeZeroIP(hosts []agenttype.Host, nmStateConfigs []*aiv1beta1.NMStateConfig) (string, error)
- func OpenshiftManifestDir() string
- type AgentClusterInstall
- func (*AgentClusterInstall) Dependencies() []asset.Asset
- func (a *AgentClusterInstall) FIPSEnabled() bool
- func (a *AgentClusterInstall) Files() []*asset.File
- func (a *AgentClusterInstall) Generate(_ context.Context, dependencies asset.Parents) error
- func (a *AgentClusterInstall) GetExternalPlatformName() string
- func (a *AgentClusterInstall) Load(f asset.FileFetcher) (bool, error)
- func (*AgentClusterInstall) Name() string
- type AgentManifests
- func (m *AgentManifests) Dependencies() []asset.Asset
- func (m *AgentManifests) Files() []*asset.File
- func (m *AgentManifests) Generate(_ context.Context, dependencies asset.Parents) error
- func (m *AgentManifests) GetPullSecretData() string
- func (m *AgentManifests) Load(f asset.FileFetcher) (bool, error)
- func (m *AgentManifests) Name() string
- type AgentPullSecret
- func (*AgentPullSecret) Dependencies() []asset.Asset
- func (a *AgentPullSecret) Files() []*asset.File
- func (a *AgentPullSecret) Generate(_ context.Context, dependencies asset.Parents) error
- func (a *AgentPullSecret) GetPullSecretData() string
- func (a *AgentPullSecret) Load(f asset.FileFetcher) (bool, error)
- func (*AgentPullSecret) Name() string
- type ClusterDeployment
- func (*ClusterDeployment) Dependencies() []asset.Asset
- func (cd *ClusterDeployment) Files() []*asset.File
- func (cd *ClusterDeployment) Generate(_ context.Context, dependencies asset.Parents) error
- func (cd *ClusterDeployment) Load(f asset.FileFetcher) (bool, error)
- func (*ClusterDeployment) Name() string
- type ClusterImageSet
- type ExtraManifests
- func (em *ExtraManifests) Dependencies() []asset.Asset
- func (em *ExtraManifests) Files() []*asset.File
- func (em *ExtraManifests) Generate(_ context.Context, dependencies asset.Parents) error
- func (em *ExtraManifests) Load(f asset.FileFetcher) (found bool, err error)
- func (em *ExtraManifests) Name() string
- type InfraEnv
- type NMStateConfig
Constants ¶
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:
- 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.
- Replace logical interface name in nmconnection files with the interface name as set on the host
- Rename nmconnection files to start with the interface name (instead of the logical interface name)
- 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 ¶
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) GetExternalPlatformName ¶ added in v0.9.153
func (a *AgentClusterInstall) GetExternalPlatformName() string
GetExternalPlatformName returns the platform name for the external platform.
func (*AgentClusterInstall) Load ¶
func (a *AgentClusterInstall) Load(f asset.FileFetcher) (bool, error)
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) 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 ¶
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) 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) 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) 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 ¶
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) 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 ¶
InfraEnv generates the infraenv.yaml file.
func (*InfraEnv) Dependencies ¶
Dependencies returns all of the dependencies directly needed to generate 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) 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.