Documentation ¶
Index ¶
- Constants
- Variables
- func GetExtraManifestResourceDir(manifestsPath string) (string, error)
- func GetExtraManifestResourceFiles(manifestsPath string) ([]os.FileInfo, error)
- func GetFiles(path string) ([]os.FileInfo, error)
- func MergeManifests(individualMachineConfigs map[string]interface{}, doNotMerge map[string]bool) (map[string]interface{}, error)
- func NewAnnotationWarning(annoKey string) *annotationWarning
- func PrintSiteConfigError(fileData []byte, errorMsg string)
- func ReadExtraManifestResourceFile(filePath string) ([]byte, error)
- func ReadFile(filePath string) ([]byte, error)
- func WriteFile(filePath string, outDir string, content []byte) error
- type AnnotationMessage
- type BiosConfigRef
- type BmcCredentialsName
- type CPUPartitioningMode
- type ClusterNetwork
- type Clusters
- func (cluster *Clusters) BiosFileSearch(site *Spec) string
- func (cluster *Clusters) CrAnnotationSearch(kind string, action string, site *Spec) (map[string]string, bool)
- func (cluster *Clusters) CrTemplateSearch(kind string, site *Spec) (string, bool)
- func (cluster *Clusters) SiteConfigMapDataIsEmpty() bool
- func (cluster *Clusters) SiteConfigMapIsUndefined() bool
- func (rv *Clusters) UnmarshalYAML(unmarshal func(interface{}) error) error
- type CrAnnotations
- type DirContainFiles
- type DiskEncryption
- type DiskPartition
- type ExtraManifests
- type Filter
- type Interfaces
- type IronicInspect
- type MachineNetwork
- type ManifestsConfigMapReference
- type Metadata
- type NodeNetwork
- type Nodes
- func (node *Nodes) BiosFileSearch(cluster *Clusters, site *Spec) string
- func (node *Nodes) CrAnnotationSearch(kind string, action string, cluster *Clusters, site *Spec) (map[string]string, bool)
- func (node *Nodes) CrTemplateSearch(kind string, cluster *Clusters, site *Spec) (string, bool)
- func (rv *Nodes) UnmarshalYAML(unmarshal func(interface{}) error) error
- type Partitions
- type Proxy
- type PullSecretRef
- type SiteConfig
- type SiteConfigBuilder
- type SiteConfigMap
- type Spec
- type SshPrivateKeySecretRef
- type TPM2Config
- type TangConfig
Constants ¶
const FileExt = ".yaml"
const Master = "master"
const McName = "predefined-extra-manifests"
const SNO = "sno"
const Standard = "standard"
const UnsetStringValue = "__unset_value__"
const ZtpAnnotation = "ran.openshift.io/ztp-gitops-generated"
const ZtpAnnotationDefaultValue = "{}"
const ZtpDeprecationWarningAnnotationPostfix = "field-deprecation"
const ZtpWarningAnnotation = "ran.openshift.io/ztp-warning"
Variables ¶
var Separator = []byte("---\n")
Functions ¶
func MergeManifests ¶
func MergeManifests(individualMachineConfigs map[string]interface{}, doNotMerge map[string]bool) (map[string]interface{}, error)
merge the spec fields of all MC manifests except the ones that are in the doNotMerge list
func NewAnnotationWarning ¶
func NewAnnotationWarning(annoKey string) *annotationWarning
func PrintSiteConfigError ¶
PrintSiteConfigError function prints the SiteConfig with associated error to std output.
Types ¶
type AnnotationMessage ¶
type BmcCredentialsName ¶
type BmcCredentialsName struct {
Name string `yaml:"name"`
}
BmcCredentialsName
type CPUPartitioningMode ¶
type CPUPartitioningMode string
CPUPartitioningMode is used to drive how a cluster nodes CPUs are Partitioned.
const ( // The only supported configurations are an all or nothing configuration. CPUPartitioningNone CPUPartitioningMode = "None" CPUPartitioningAllNodes CPUPartitioningMode = "AllNodes" )
func (*CPUPartitioningMode) UnmarshalYAML ¶
func (cm *CPUPartitioningMode) UnmarshalYAML(unmarshal func(interface{}) error) error
type ClusterNetwork ¶
ClusterNetwork
type Clusters ¶
type Clusters struct { ApiVIP string `yaml:"apiVIP"` IngressVIP string `yaml:"ingressVIP"` ApiVIPs []string `yaml:"apiVIPs"` IngressVIPs []string `yaml:"ingressVIPs"` ClusterName string `yaml:"clusterName"` HoldInstallation bool `yaml:"holdInstallation"` AdditionalNTPSources []string `yaml:"additionalNTPSources"` Nodes []Nodes `yaml:"nodes"` MachineNetwork []MachineNetwork `yaml:"machineNetwork"` ServiceNetwork []string `yaml:"serviceNetwork"` ClusterLabels map[string]string `yaml:"clusterLabels"` NetworkType string `yaml:"networkType"` InstallConfigOverrides string `yaml:"installConfigOverrides,omitempty"` ClusterNetwork []ClusterNetwork `yaml:"clusterNetwork"` IgnitionConfigOverride string `yaml:"ignitionConfigOverride"` DiskEncryption DiskEncryption `yaml:"diskEncryption"` Proxy Proxy `yaml:"proxy,omitempty"` ExtraManifestPath string `yaml:"extraManifestPath"` ClusterImageSetNameRef string `yaml:"clusterImageSetNameRef,omitempty"` BiosConfigRef BiosConfigRef `yaml:"biosConfigRef"` ExtraManifests ExtraManifests `yaml:"extraManifests"` CPUPartitioning CPUPartitioningMode `yaml:"cpuPartitioningMode"` SiteConfigMap SiteConfigMap `yaml:"siteConfigMap"` ExtraManifestOnly bool NumMasters uint8 NumWorkers uint8 ClusterType string CrTemplates map[string]string `yaml:"crTemplates"` CrAnnotations CrAnnotations `yaml:"crAnnotations"` CrSuppression []string `yaml:"crSuppression"` ManifestsConfigMapRefs []ManifestsConfigMapReference // optional: merge MachineConfigs into a single CR MergeDefaultMachineConfigs bool `yaml:"mergeDefaultMachineConfigs"` }
Clusters
func (*Clusters) BiosFileSearch ¶
Lookup bios config file path for this cluster, with fallback to site
func (*Clusters) CrAnnotationSearch ¶
func (cluster *Clusters) CrAnnotationSearch(kind string, action string, site *Spec) (map[string]string, bool)
Lookup a specific CR annotation for this cluster, with fallback to site
func (*Clusters) CrTemplateSearch ¶
Lookup a specific CR template for this cluster, with fallback to site
func (*Clusters) SiteConfigMapDataIsEmpty ¶
Return true if the SiteConfigMap content is empty.
func (*Clusters) SiteConfigMapIsUndefined ¶
Return true if the SiteConfigMap is not defined.
func (*Clusters) UnmarshalYAML ¶
Provide custom YAML unmarshal for Clusters which provides default values
type CrAnnotations ¶
type DirContainFiles ¶
type DiskEncryption ¶
type DiskEncryption struct { Type string `yaml:"type"` Tang []TangConfig `yaml:"tang"` Tpm2 TPM2Config `yaml:"tpm2"` }
func (*DiskEncryption) UnmarshalYAML ¶
func (rv *DiskEncryption) UnmarshalYAML(unmarshal func(interface{}) error) error
Provide custom YAML unmarshal for DiskEncryption which provides default values
type DiskPartition ¶
type DiskPartition struct { Device string `yaml:"device"` Partitions []Partitions `yaml:"partitions"` }
type ExtraManifests ¶
type Interfaces ¶
Interfaces
type IronicInspect ¶
type IronicInspect string
IronicInspect
func (IronicInspect) IsValid ¶
func (i IronicInspect) IsValid() error
type ManifestsConfigMapReference ¶
type ManifestsConfigMapReference struct { // Name is the name of the ConfigMap that this refers to Name string `json:"name"` }
ManifestsConfigMapReference is a reference to a manifests ConfigMap
type Metadata ¶
type Metadata struct { Name string `yaml:"name"` Namespace string `yaml:"namespace"` Labels map[string]string `yaml:"labels"` }
Metadata
type NodeNetwork ¶
type NodeNetwork struct { Config map[string]interface{} `yaml:"config"` Interfaces []Interfaces `yaml:"interfaces"` }
NodeNetwork
type Nodes ¶
type Nodes struct { BmcAddress string `yaml:"bmcAddress"` BootMACAddress string `yaml:"bootMACAddress"` AutomatedCleaningMode string `yaml:"automatedCleaningMode"` RootDeviceHints map[string]interface{} `yaml:"rootDeviceHints"` Cpuset string `yaml:"cpuset"` NodeNetwork NodeNetwork `yaml:"nodeNetwork"` NodeLabels map[string]string `yaml:"nodeLabels"` HostName string `yaml:"hostName"` BmcCredentialsName BmcCredentialsName `yaml:"bmcCredentialsName"` BootMode string `yaml:"bootMode"` UserData map[string]interface{} `yaml:"userData"` InstallerArgs string `yaml:"installerArgs"` IgnitionConfigOverride string `yaml:"ignitionConfigOverride"` Role string `yaml:"role"` CrTemplates map[string]string `yaml:"crTemplates"` CrAnnotations CrAnnotations `yaml:"crAnnotations"` CrSuppression []string `yaml:"crSuppression"` BiosConfigRef BiosConfigRef `yaml:"biosConfigRef"` DiskPartition []DiskPartition `yaml:"diskPartition"` IronicInspect IronicInspect `yaml:"ironicInspect"` }
Nodes
func (*Nodes) BiosFileSearch ¶
Lookup bios config file path for this node, with fallback to cluster and site
func (*Nodes) CrAnnotationSearch ¶
func (node *Nodes) CrAnnotationSearch(kind string, action string, cluster *Clusters, site *Spec) (map[string]string, bool)
Lookup a specific CR annotation for this node, with fallback to cluster and site
func (*Nodes) CrTemplateSearch ¶
Lookup a specific CR template for this node, with fallback to cluster and site
func (*Nodes) UnmarshalYAML ¶
Provide custom YAML unmarshal for Nodes which provides default values
type Partitions ¶
type Partitions struct { MountPoint string `yaml:"mount_point" ` Size int `yaml:"size"` Start int `yaml:"start"` FileSystemFormat string `yaml:"file_system_format"` MountFileName string `yaml:"-"` Label string `yaml:"-"` Encryption bool `yaml:"-"` // TODO: a place holder to enable disk encryption }
func (*Partitions) UnmarshalYAML ¶
func (prt *Partitions) UnmarshalYAML(unmarshal func(interface{}) error) error
type SiteConfig ¶
type SiteConfig struct { ApiVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Metadata Metadata `yaml:"metadata"` Spec Spec `yaml:"spec"` }
SiteConfig
func (*SiteConfig) GetSiteConfigFieldValue ¶
func (sc *SiteConfig) GetSiteConfigFieldValue(path string, clusterId int, nodeId int) (interface{}, error)
type SiteConfigBuilder ¶
type SiteConfigBuilder struct { SourceClusterCRs []interface{} // contains filtered or unexported fields }
func NewSiteConfigBuilder ¶
func NewSiteConfigBuilder() (*SiteConfigBuilder, error)
func (*SiteConfigBuilder) Build ¶
func (scbuilder *SiteConfigBuilder) Build(siteConfigTemp SiteConfig) (map[string][]interface{}, error)
func (*SiteConfigBuilder) SetLocalExtraManifestPath ¶
func (scbuilder *SiteConfigBuilder) SetLocalExtraManifestPath(path string)
type SiteConfigMap ¶
type SiteConfigMap struct { Name string `yaml:"name"` Namespace string `yaml:"namespace"` Data map[string]string `yaml:"data"` }
func (*SiteConfigMap) UnmarshalYAML ¶
func (rv *SiteConfigMap) UnmarshalYAML(unmarshal func(interface{}) error) error
Provide custom YAML unmarshal for SiteConfigMap which provides default values
type Spec ¶
type Spec struct { PullSecretRef PullSecretRef `yaml:"pullSecretRef"` ClusterImageSetNameRef string `yaml:"clusterImageSetNameRef"` SshPublicKey string `yaml:"sshPublicKey"` SshPrivateKeySecretRef SshPrivateKeySecretRef `yaml:"sshPrivateKeySecretRef"` Clusters []Clusters `yaml:"clusters"` BaseDomain string `yaml:"baseDomain"` CrTemplates map[string]string `yaml:"crTemplates"` CrAnnotations CrAnnotations `yaml:"crAnnotations"` BiosConfigRef BiosConfigRef `yaml:"biosConfigRef"` }
Spec
func (*Spec) BiosFileSearch ¶
Lookup bios config file path for this site
func (*Spec) CrAnnotationSearch ¶
Lookup a specific CR Annotation for this site
type SshPrivateKeySecretRef ¶
type SshPrivateKeySecretRef struct {
Name string `yaml:"name"`
}
SshPrivateKeySecretRef
type TPM2Config ¶
type TPM2Config struct {
PCRList string `yaml:"pcrList" json:"pcrList"`
}