Documentation ¶
Index ¶
- Constants
- Variables
- func GenYAML(CR interface{}) ([]byte, error)
- func HandleError(err error, transformType string) error
- func Start()
- type APIExtraction
- type APITransform
- type Cluster
- type ClusterExtraction
- type ClusterTransform
- type ContainerRuntimeConfig
- type CrioCR
- type CrioExtraction
- type CrioMetadata
- type CrioSpec
- type CrioTransform
- type Crios
- type DockerExtraction
- type DockerTransform
- type ETCDExtraction
- type ETCDTransform
- type Extraction
- type ImageExtraction
- type ImageTransform
- type MachineConfigPoolSelector
- type Manifest
- type ManifestOutput
- type Master
- type MatchLabels
- type OAuthExtraction
- type OAuthTransform
- type Output
- type ProjectExtraction
- type ProjectTransform
- type Registries
- type RegistriesExtraction
- type Report
- type Runner
- type SDNExtraction
- type SDNTransform
- type SchedulerExtraction
- type SchedulerTransform
- type Transform
Constants ¶
const ( // NoConfidence represents report items we can not migrate NoConfidence = iota // ModerateConfidence represents report items we can migrate with caveats ModerateConfidence // HighConfidence represents report items we can migrate without issue HighConfidence // OCP4InstallMsg message about using generated manifests OCP4InstallMsg = `` /* 355-byte string literal not displayed */ )
const APIComponentName = "API"
APIComponentName is the API component string
const ClusterTransformName = "Cluster"
ClusterTransformName is the cluster report name
const CrioComponentName = "Crio"
CrioComponentName is the name of the Crio component
const DockerComponentName = "Docker"
DockerComponentName is the Docker component string
const ETCDComponentName = "ETCD"
ETCDComponentName is the ETCD component string
const ImageComponentName = "Image"
ImageComponentName is the Image component string
const OAuthComponentName = "OAuth"
OAuthComponentName is the OAuth component string
const ProjectComponentName = "Project"
ProjectComponentName is the Project component string
const SDNComponentName = "SDN"
SDNComponentName is the SDN component string
const SchedulerComponentName = "Scheduler"
SchedulerComponentName is the Scheduler component string
Variables ¶
var ManifestOutputFlush = func(manifests []Manifest) error { logrus.Info("Flushing manifests to disk") for _, manifest := range manifests { maniftestfile := filepath.Join(env.Config().GetString("WorkDir"), "manifests", manifest.Name) os.MkdirAll(path.Dir(maniftestfile), 0755) if err := ioutil.WriteFile(maniftestfile, manifest.CRD, 0644); err != nil { logrus.Panic(err) } logrus.Printf("CRD:Added: %s", maniftestfile) } return nil }
ManifestOutputFlush flush manifests to disk
var ReportOutputFlush = func(r Report) error { logrus.Info("Flushing reports to disk") reportoutput.DumpReports(r.Report) return nil }
ReportOutputFlush flush reports to disk
Functions ¶
func HandleError ¶
HandleError handles errors
Types ¶
type APIExtraction ¶
type APIExtraction struct {
ServingInfo legacyconfigv1.ServingInfo
}
APIExtraction holds API data extracted from OCP3
func (APIExtraction) Transform ¶
func (e APIExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 into a useful output
func (APIExtraction) Validate ¶
func (e APIExtraction) Validate() error
Validate confirms we have recieved API configuration data during Extract
type APITransform ¶
type APITransform struct { }
APITransform is an API specific transform
func (APITransform) Extract ¶
func (e APITransform) Extract() (Extraction, error)
Extract collects API configuration from an OCP3 cluster
func (APITransform) Name ¶
func (e APITransform) Name() string
Name returns a human readable name for the transform
type ClusterExtraction ¶
ClusterExtraction holds data extracted from k8s API resources
func (ClusterExtraction) Transform ¶
func (e ClusterExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 API into a useful output
func (ClusterExtraction) Validate ¶
func (e ClusterExtraction) Validate() (err error)
Validate no need to validate it, data is exctracted from API
type ClusterTransform ¶
type ClusterTransform struct { }
ClusterTransform reprents transform for k8s API resources
func (ClusterTransform) Extract ¶
func (e ClusterTransform) Extract() (Extraction, error)
Extract collects data for cluster report
func (ClusterTransform) Name ¶
func (e ClusterTransform) Name() string
Name returns a human readable name for the transform
type ContainerRuntimeConfig ¶
type ContainerRuntimeConfig struct { PidsLimit int64 `json:"pidsLimit,omitempty"` LogLevel string `json:"logLevel,omitempty"` LogSizeMax int64 `json:"logSizeMax,omitempty"` InfraImage string `json:"infraImage,omitempty"` }
ContainerRuntimeConfig contains a Crio Runtime Machine Config
type CrioCR ¶
type CrioCR struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata CrioMetadata `json:"metadata"` Spec CrioSpec `json:"spec"` }
CrioCR is a is a Crio Cluster Resource
type CrioExtraction ¶
type CrioExtraction struct {
Runtime runtimeConf
}
CrioExtraction holds Crio data extracted from OCP3
func (CrioExtraction) Transform ¶
func (e CrioExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 into a useful output
func (CrioExtraction) Validate ¶
func (e CrioExtraction) Validate() error
Validate confirms we have recieved good Crio configuration data during Extract
type CrioMetadata ¶
type CrioMetadata struct {
Name string `json:"name"`
}
CrioMetadata is the Metadata for a Crio CR
type CrioSpec ¶
type CrioSpec struct { MachineConfigPoolSelector MachineConfigPoolSelector `json:"machineConfigPoolSelector"` ContainerRuntimeConfig ContainerRuntimeConfig `json:"containerRuntimeConfig"` }
CrioSpec is the Spec for a Crio CR
type CrioTransform ¶
type CrioTransform struct { }
CrioTransform is an Crio specific transform
func (CrioTransform) Extract ¶
func (e CrioTransform) Extract() (Extraction, error)
Extract collects Crio configuration from an OCP3 cluster
func (CrioTransform) Name ¶
func (e CrioTransform) Name() string
Name returns a human readable name for the transform
type DockerExtraction ¶
type DockerExtraction struct { }
DockerExtraction holds Docker data extracted from OCP3
func (DockerExtraction) Transform ¶
func (e DockerExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 into a useful output
func (DockerExtraction) Validate ¶
func (e DockerExtraction) Validate() error
Validate confirms we have recieved good Docker configuration data during Extract
type DockerTransform ¶
type DockerTransform struct { }
DockerTransform is an Docker specific transform
func (DockerTransform) Extract ¶
func (e DockerTransform) Extract() (Extraction, error)
Extract collects Docker configuration from an OCP3 cluster
func (DockerTransform) Name ¶
func (e DockerTransform) Name() string
Name returns a human readable name for the transform
type ETCDExtraction ¶
ETCDExtraction holds ETCD data extracted from OCP3
func (ETCDExtraction) Transform ¶
func (e ETCDExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 into a useful output
func (ETCDExtraction) Validate ¶
func (e ETCDExtraction) Validate() error
Validate confirms we have recieved good ETCD configuration data during Extract
type ETCDTransform ¶
type ETCDTransform struct { }
ETCDTransform is an ETCD specific transform
func (ETCDTransform) Extract ¶
func (e ETCDTransform) Extract() (Extraction, error)
Extract collects ETCD configuration from an OCP3 cluster
func (ETCDTransform) Name ¶
func (e ETCDTransform) Name() string
Name returns a human readable name for the transform
type Extraction ¶
Extraction is a generic data extraction
type ImageExtraction ¶
type ImageExtraction struct { MasterConfig legacyconfigv1.MasterConfig RegistriesConfig RegistriesExtraction }
ImageExtraction is image specific extraction
func (ImageExtraction) Transform ¶
func (e ImageExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 into a useful output
func (ImageExtraction) Validate ¶
func (e ImageExtraction) Validate() error
Validate the data extracted from the OCP3 cluster
type ImageTransform ¶
type ImageTransform struct { }
ImageTransform is an image specific transform
func (ImageTransform) Extract ¶
func (e ImageTransform) Extract() (Extraction, error)
Extract collects image configuration information from an OCP3 cluster
func (ImageTransform) Name ¶
func (e ImageTransform) Name() string
Name returns a human readable name for the transform
type MachineConfigPoolSelector ¶
type MachineConfigPoolSelector struct {
MatchLabels MatchLabels `json:"matchLabels"`
}
MachineConfigPoolSelector is the Pool Selector for a Machine Config
type ManifestOutput ¶
type ManifestOutput struct {
Manifests []Manifest
}
ManifestOutput holds a collection of manifests to be written to fil
type MatchLabels ¶
type MatchLabels struct {
CustomCrio string `json:"custom-crio"`
}
MatchLabels matches the labels for a Pool Selector
type OAuthExtraction ¶
type OAuthExtraction struct { IdentityProviders []oauth.IdentityProvider TokenConfig oauth.TokenConfig Templates legacyconfigv1.OAuthTemplates }
OAuthExtraction holds OAuth data extracted from OCP3
func (OAuthExtraction) Transform ¶
func (e OAuthExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 into a useful output
func (OAuthExtraction) Validate ¶
func (e OAuthExtraction) Validate() error
Validate confirms we have recieved good OAuth configuration data during Extract
type OAuthTransform ¶
type OAuthTransform struct { }
OAuthTransform is an OAuth specific transform
func (OAuthTransform) Extract ¶
func (e OAuthTransform) Extract() (Extraction, error)
Extract collects OAuth configuration from an OCP3 cluster
func (OAuthTransform) Name ¶
func (e OAuthTransform) Name() string
Name returns a human readable name for the transform
type ProjectExtraction ¶
type ProjectExtraction struct {
legacyconfigv1.MasterConfig
}
ProjectExtraction is a Project specific extraction
func (ProjectExtraction) Transform ¶
func (e ProjectExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 into a useful output
func (ProjectExtraction) Validate ¶
func (e ProjectExtraction) Validate() error
Validate the data extracted from the OCP3 cluster
type ProjectTransform ¶
type ProjectTransform struct { }
ProjectTransform is a Project specific transform
func (ProjectTransform) Extract ¶
func (e ProjectTransform) Extract() (Extraction, error)
Extract collects Project configuration information from an OCP3 cluster
func (ProjectTransform) Name ¶
func (e ProjectTransform) Name() string
Name returns a human readable name for the transform
type Registries ¶
type Registries struct {
List []string `toml:"registries"`
}
Registries holds a list of Registries
type RegistriesExtraction ¶
type RegistriesExtraction struct {
Registries map[string]registries.Registries
}
RegistriesExtraction holds registry information extracted from an OCP3 cluster
type Report ¶
type Report struct {
Report reportoutput.ReportOutput
}
Report represents structure for final output
var FinalReportOutput Report
FinalReportOutput represents final output
type SDNExtraction ¶
type SDNExtraction struct {
legacyconfigv1.MasterConfig
}
SDNExtraction is an SDN specific extraction
func (SDNExtraction) Transform ¶
func (e SDNExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 into a useful output
func (SDNExtraction) Validate ¶
func (e SDNExtraction) Validate() error
Validate the data extracted from the OCP3 cluster
type SDNTransform ¶
type SDNTransform struct { }
SDNTransform is an SDN specific transform
func (SDNTransform) Extract ¶
func (e SDNTransform) Extract() (Extraction, error)
Extract collects SDN configuration information from an OCP3 cluster
func (SDNTransform) Name ¶
func (e SDNTransform) Name() string
Name returns a human readable name for the transform
type SchedulerExtraction ¶
type SchedulerExtraction struct {
legacyconfigv1.MasterConfig
}
SchedulerExtraction is a Scheduler specific extraction
func (SchedulerExtraction) Transform ¶
func (e SchedulerExtraction) Transform() ([]Output, error)
Transform converts data collected from an OCP3 into a useful output
func (SchedulerExtraction) Validate ¶
func (e SchedulerExtraction) Validate() error
Validate the data extracted from the OCP3 cluster
type SchedulerTransform ¶
type SchedulerTransform struct { }
SchedulerTransform is a Scheduler specific transform
func (SchedulerTransform) Extract ¶
func (e SchedulerTransform) Extract() (Extraction, error)
Extract collects Scheduler configuration information from an OCP3 cluster
func (SchedulerTransform) Name ¶
func (e SchedulerTransform) Name() string
Name returns a human readable name for the transform
type Transform ¶
type Transform interface { Extract() (Extraction, error) Name() string }
Transform is a generic transform