Documentation ¶
Index ¶
- Constants
- Variables
- func NewClusterRole(name string, rules []rbacv1.PolicyRule) *rbacv1.ClusterRole
- func NewClusterRoleBinding(name string, namespace string) *rbacv1.ClusterRoleBinding
- func NewDeployment(data *DeploymentData) *appsv1.Deployment
- func NewServiceAccount(name string, namespace string) *corev1.ServiceAccount
- type DeploymentData
Constants ¶
View Source
const (
// CRDMachineRemediation contains the kind of the MachineRemediation CRD
CRDMachineRemediation = "machineremediations"
)
View Source
const (
// ComponentMachineRemediation contains name for MachineRemediation component
ComponentMachineRemediation = "machine-remediation"
)
Variables ¶
View Source
var ( // CRDS contains names of all CRD's that the operator should deploy CRDS = []string{ CRDMachineRemediation, } )
View Source
var ( // Components contains names of all componenets that the operator should deploy Components = []string{ ComponentMachineRemediation, } )
View Source
var ( // Rules contains rules for all machine remediation components Rules = map[string][]rbacv1.PolicyRule{ ComponentMachineRemediation: []rbacv1.PolicyRule{ { APIGroups: []string{ "machine.openshift.io", }, Resources: []string{ "machines", }, Verbs: []string{ "get", "list", "watch", }, }, { APIGroups: []string{ "machineremediation.kubevirt.io", }, Resources: []string{ "machineremediations", "machineremediations/status", }, Verbs: []string{ "create", "delete", "get", "list", "update", "watch", }, }, { APIGroups: []string{ "", }, Resources: []string{ "nodes", }, Verbs: []string{ "delete", "get", "list", "watch", }, }, { APIGroups: []string{ "metal3.io", }, Resources: []string{ "baremetalhosts", }, Verbs: []string{ "get", "list", "update", "watch", }, }, { APIGroups: []string{ "", }, Resources: []string{ "configmaps", }, Verbs: []string{ rbacv1.VerbAll, }, }, { APIGroups: []string{ "", }, Resources: []string{ "events", }, Verbs: []string{ "create", "list", "watch", "patch", }, }, }, } )
Functions ¶
func NewClusterRole ¶
func NewClusterRole(name string, rules []rbacv1.PolicyRule) *rbacv1.ClusterRole
NewClusterRole returns new ClusterRole object
func NewClusterRoleBinding ¶
func NewClusterRoleBinding(name string, namespace string) *rbacv1.ClusterRoleBinding
NewClusterRoleBinding returns new ClusterRoleBinding object
func NewDeployment ¶
func NewDeployment(data *DeploymentData) *appsv1.Deployment
NewDeployment returns new deployment object
func NewServiceAccount ¶
func NewServiceAccount(name string, namespace string) *corev1.ServiceAccount
NewServiceAccount returns new ServiceAccount object
Types ¶
type DeploymentData ¶
type DeploymentData struct { ImageName string Name string Namespace string PullPolicy corev1.PullPolicy Verbosity string }
DeploymentData contains all needed data to create new deployment object
Click to show internal directories.
Click to hide internal directories.