{"modulePath":"github.com/openshift/machine-api-operator","version":"v0.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package operator\n\n## Constants\n\n```go\nconst (\n\t// ClusterConfigNamespace is the namespace containing the cluster config\n\tClusterConfigNamespace = \"kube-system\"\n\t// ClusterConfigName is the name of the cluster config configmap\n\tClusterConfigName = \"cluster-config-v1\"\n\t// InstallConfigKey is the key in the cluster config configmap containing yaml installConfig data\n\tInstallConfigKey = \"install-config\"\n\t// AWSPlatformType is used to install on AWS\n\tAWSProvider = Provider(\"aws\")\n\t// LibvirtPlatformType is used to install of libvirt\n\tLibvirtProvider = Provider(\"libvirt\")\n\t// OpenStackPlatformType is used to install on OpenStack\n\tOpenStackProvider = Provider(\"openstack\")\n)\n```\n\n## Functions\n\n```go\nfunc ApplyClusterOperator(client osclientsetv1.ClusterOperatorsGetter, required *osconfigv1.ClusterOperator) (*osconfigv1.ClusterOperator, bool, error)\n```\nApplyClusterOperator applies the required ClusterOperator\n\n```go\nfunc PopulateTemplate(config *OperatorConfig, path string) ([]byte, error)\n```\nPopulateTemplate receives a template file path and renders its content populated with the config\n\n## Types\n\n```go\ntype Controllers struct {\n\tProvider           string\n\tNodeLink           string\n\tMachineHealthCheck string\n}\n```\n\n```go\ntype Images struct {\n\tMachineAPIOperator            string `json:\"machineAPIOperator\"`\n\tClusterAPIControllerAWS       string `json:\"clusterAPIControllerAWS\"`\n\tClusterAPIControllerOpenStack string `json:\"clusterAPIControllerOpenStack\"`\n\tClusterAPIControllerLibvirt   string `json:\"clusterAPIControllerLibvirt\"`\n}\n```\nImages allows build systems to inject images for MAO components\n\n```go\ntype InstallConfig struct {\n\tInstallPlatform `json:\"platform\"`\n}\n```\nInstallConfig contains the mao relevant config coming from the install config, i.e provider\n\n```go\ntype InstallPlatform struct {\n\t// AWS is the configuration used when running on AWS\n\tAWS interface{} `json:\"aws,omitempty\"`\n\n\t// Libvirt is the configuration used when running on libvirt\n\tLibvirt interface{} `json:\"libvirt,omitempty\"`\n\n\t// OpenStack is the configuration used when running on OpenStack\n\tOpenStack interface{} `json:\"openstack,omitempty\"`\n}\n```\nInstallPlatform is the configuration for the specific platform upon which to perform the installation. Only one of the platform configuration should be set\n\n```go\ntype Operator struct {\n\t// contains filtered or unexported fields\n}\n```\nOperator defines machine api operator.\n\n```go\nfunc New(\n\tnamespace, name string,\n\timagesFile string,\n\n\tconfig string,\n\n\tserviceAccountInfomer coreinformersv1.ServiceAccountInformer,\n\tdeployInformer appsinformersv1.DeploymentInformer,\n\tclusterRoleInformer rbacinformersv1.ClusterRoleInformer,\n\tclusterRoleBindingInformer rbacinformersv1.ClusterRoleBindingInformer,\n\n\tkubeClient kubernetes.Interface,\n\tosClient osclientset.Interface,\n) *Operator\n```\nNew returns a new machine config operator.\n\n```go\nfunc (optr *Operator) Run(workers int, stopCh \u003c-chan struct{})\n```\nRun runs the machine config operator.\n\n```go\ntype OperatorConfig struct {\n\tTargetNamespace string `json:\"targetNamespace\"`\n\tControllers     Controllers\n}\n```\nOperatorConfig contains configuration for MAO\n\n```go\ntype Provider string\n```\n\n```go\ntype StatusReason string\n```\nStatusReason is a MixedCaps string representing the reason for a status condition change.\n\n```go\nconst (\n\tReasonEmpty      StatusReason = \"\"\n\tReasonSyncing    StatusReason = \"SyncingResources\"\n\tReasonSyncFailed StatusReason = \"SyncingFailed\"\n)\n```\nThe default set of status change reasons.\n\n","path":"github.com/openshift/machine-api-operator/pkg/operator","name":"operator","synopsis":"","isRedistributable":true}
