Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the v1beta1 API group +kubebuilder:object:generate=true +groupName=ansibleee.openstack.org
Index ¶
- Constants
- Variables
- func SetupDefaults()
- func SetupOpenStackAnsibleEEDefaults(defaults OpenStackAnsibleEEDefaults)
- type Config
- type OpenStackAnsibleEE
- func (in *OpenStackAnsibleEE) DeepCopy() *OpenStackAnsibleEE
- func (in *OpenStackAnsibleEE) DeepCopyInto(out *OpenStackAnsibleEE)
- func (in *OpenStackAnsibleEE) DeepCopyObject() runtime.Object
- func (r *OpenStackAnsibleEE) Default()
- func (instance OpenStackAnsibleEE) IsReady() bool
- func (r *OpenStackAnsibleEE) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *OpenStackAnsibleEE) ValidateCreate() (admission.Warnings, error)
- func (r *OpenStackAnsibleEE) ValidateDelete() (admission.Warnings, error)
- func (r *OpenStackAnsibleEE) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type OpenStackAnsibleEEDefaults
- type OpenStackAnsibleEEList
- type OpenStackAnsibleEESpec
- type OpenStackAnsibleEEStatus
Constants ¶
const ( // JobStatusSucceeded - JobStatusSucceeded = "Succeeded" // JobStatusFailed - JobStatusFailed = "Failed" // JobStatusRunning - JobStatusRunning = "Running" // JobStatusPending - JobStatusPending = "Pending" )
const (
// OpenStackAnsibleEEContainerImage is the fall-back container image for OpenStackAnsibleEE
OpenStackAnsibleEEContainerImage = "quay.io/openstack-k8s-operators/openstack-ansibleee-runner:latest"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "ansibleee.openstack.org", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func SetupDefaults ¶
func SetupDefaults()
SetupDefaults - initializes any CRD field defaults based on environment variables (the defaulting mechanism itself is implemented via webhooks)
func SetupOpenStackAnsibleEEDefaults ¶
func SetupOpenStackAnsibleEEDefaults(defaults OpenStackAnsibleEEDefaults)
SetupOpenStackAnsibleEEDefaults - initialize OpenStackAnsibleEE spec defaults for use with either internal or external webhooks
Types ¶
type Config ¶
type Config struct { // Name is the name of the ConfigMap that we want to mount Name string `json:"name"` // MountPoint is the directory of the container where the ConfigMap will be mounted MountPath string `json:"mountpath"` }
Config is a specification of where to mount a certain ConfigMap object
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenStackAnsibleEE ¶
type OpenStackAnsibleEE struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec OpenStackAnsibleEESpec `json:"spec,omitempty"` Status OpenStackAnsibleEEStatus `json:"status,omitempty"` }
OpenStackAnsibleEE is the Schema for the openstackansibleees API
func (*OpenStackAnsibleEE) DeepCopy ¶
func (in *OpenStackAnsibleEE) DeepCopy() *OpenStackAnsibleEE
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackAnsibleEE.
func (*OpenStackAnsibleEE) DeepCopyInto ¶
func (in *OpenStackAnsibleEE) DeepCopyInto(out *OpenStackAnsibleEE)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpenStackAnsibleEE) DeepCopyObject ¶
func (in *OpenStackAnsibleEE) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*OpenStackAnsibleEE) Default ¶
func (r *OpenStackAnsibleEE) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (OpenStackAnsibleEE) IsReady ¶
func (instance OpenStackAnsibleEE) IsReady() bool
IsReady - returns true if the OpenStackAnsibleEE is ready
func (*OpenStackAnsibleEE) SetupWebhookWithManager ¶
func (r *OpenStackAnsibleEE) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager sets up the webhook with the Manager
func (*OpenStackAnsibleEE) ValidateCreate ¶
func (r *OpenStackAnsibleEE) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*OpenStackAnsibleEE) ValidateDelete ¶
func (r *OpenStackAnsibleEE) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*OpenStackAnsibleEE) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type OpenStackAnsibleEEDefaults ¶
type OpenStackAnsibleEEDefaults struct {
ContainerImageURL string
}
OpenStackAnsibleEEDefaults -
func (*OpenStackAnsibleEEDefaults) DeepCopy ¶
func (in *OpenStackAnsibleEEDefaults) DeepCopy() *OpenStackAnsibleEEDefaults
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackAnsibleEEDefaults.
func (*OpenStackAnsibleEEDefaults) DeepCopyInto ¶
func (in *OpenStackAnsibleEEDefaults) DeepCopyInto(out *OpenStackAnsibleEEDefaults)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenStackAnsibleEEList ¶
type OpenStackAnsibleEEList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []OpenStackAnsibleEE `json:"items"` }
OpenStackAnsibleEEList contains a list of OpenStackAnsibleEE
func (*OpenStackAnsibleEEList) DeepCopy ¶
func (in *OpenStackAnsibleEEList) DeepCopy() *OpenStackAnsibleEEList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackAnsibleEEList.
func (*OpenStackAnsibleEEList) DeepCopyInto ¶
func (in *OpenStackAnsibleEEList) DeepCopyInto(out *OpenStackAnsibleEEList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpenStackAnsibleEEList) DeepCopyObject ¶
func (in *OpenStackAnsibleEEList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OpenStackAnsibleEESpec ¶
type OpenStackAnsibleEESpec struct { // PlaybookContents is an inline playbook contents that ansible will run on execution. PlaybookContents string `json:"playbookContents,omitempty"` // Playbook is the playbook that ansible will run on this execution, accepts path or FQN from collection Playbook string `json:"playbook,omitempty"` // Image is the container image that will execute the ansible command Image string `json:"image,omitempty"` // Args are the command plus the playbook executed by the image. If args is passed, Playbook is ignored. Args []string `json:"args,omitempty"` // Name is the name of the internal container inside the pod // +kubebuilder:default:="openstackansibleee" Name string `json:"name,omitempty"` // EnvConfigMapName is the name of the k8s config map that contains the ansible env variables // +kubebuilder:default:="openstack-aee-default-env" EnvConfigMapName string `json:"envConfigMapName,omitempty"` // Env is a list containing the environment variables to pass to the pod Env []corev1.EnvVar `json:"env,omitempty"` // RestartPolicy is the policy applied to the Job on whether it needs to restart the Pod. It can be "OnFailure" or "Never". // RestartPolicy default: Never // +kubebuilder:validation:Enum:=OnFailure;Never // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:select:OnFailure","urn:alm:descriptor:com.tectonic.ui:select:Never"} // +kubebuilder:default:="Never" RestartPolicy string `json:"restartPolicy,omitempty"` // PreserveJobs - do not delete jobs after they finished e.g. to check logs // PreserveJobs default: true // +kubebuilder:validation:Enum:=true;false // +kubebuilder:default:=true PreserveJobs bool `json:"preserveJobs,omitempty"` // UID is the userid that will be used to run the container. // +kubebuilder:default:=1001 UID int64 `json:"uid,omitempty"` // Inventory is the primary inventory that the ansible playbook will use to launch the job. // Further inventories may be provided as ExtraMount in the `/runner/inventory/` path. Inventory string `json:"inventory,omitempty"` // +kubebuilder:validation:Optional // ExtraMounts containing conf files, credentials and inventories ExtraMounts []storage.VolMounts `json:"extraMounts,omitempty"` // BackoffLimit allows to define the maximum number of retried executions (defaults to 6). // +kubebuilder:default:=6 // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"} BackoffLimit *int32 `json:"backoffLimit,omitempty"` // +kubebuilder:validation:Optional // NetworkAttachments is a list of NetworkAttachment resource names to expose the services to the given network NetworkAttachments []string `json:"networkAttachments,omitempty"` // +kubebuilder:validation:Optional // CmdLine is the command line passed to ansible-runner CmdLine string `json:"cmdLine,omitempty"` // +kubebuilder:validation:Optional // InitContainers allows the passing of an array of containers that will be executed before the ansibleee execution itself InitContainers []corev1.Container `json:"initContainers,omitempty"` // +kubebuilder:validation:Optional // ServiceAccountName allows to specify what ServiceAccountName do we want the ansible execution run with. Without specifying, // it will run with default serviceaccount ServiceAccountName string `json:"serviceAccountName,omitempty"` // DNSConfig allows to specify custom dnsservers and search domains // +kubebuilder:validation:Optional DNSConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // Extra vars to be passed to ansible process during execution. This can be used to override default values in plays. ExtraVars map[string]json.RawMessage `json:"extraVars,omitempty"` }
OpenStackAnsibleEESpec defines the desired state of OpenStackAnsibleEE
func (*OpenStackAnsibleEESpec) DeepCopy ¶
func (in *OpenStackAnsibleEESpec) DeepCopy() *OpenStackAnsibleEESpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackAnsibleEESpec.
func (*OpenStackAnsibleEESpec) DeepCopyInto ¶
func (in *OpenStackAnsibleEESpec) DeepCopyInto(out *OpenStackAnsibleEESpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpenStackAnsibleEESpec) Default ¶
func (spec *OpenStackAnsibleEESpec) Default()
Default - set defaults for this OpenStackAnsibleEE spec
func (*OpenStackAnsibleEESpec) ValidateCreate ¶
func (spec *OpenStackAnsibleEESpec) ValidateCreate() field.ErrorList
type OpenStackAnsibleEEStatus ¶
type OpenStackAnsibleEEStatus struct { // Map of hashes to track e.g. job status Hash map[string]string `json:"hash,omitempty"` // +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"} // Conditions Conditions condition.Conditions `json:"conditions,omitempty" optional:"true"` // NetworkAttachments status of the deployment pods NetworkAttachments map[string][]string `json:"networkAttachments,omitempty"` // +kubebuilder:validation:Enum:=Pending;Running;Succeeded;Failed // +kubebuilder:default:=Pending // JobStatus status of the executed job (Pending/Running/Succeeded/Failed) JobStatus string `json:"JobStatus,omitempty" optional:"true"` // ObservedGeneration - the most recent generation observed for this // service. If the observed generation is less than the spec generation, // then the controller has not processed the latest changes injected by // the opentack-operator in the top-level CR (e.g. the ContainerImage) ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
OpenStackAnsibleEEStatus defines the observed state of OpenStackAnsibleEE
func (*OpenStackAnsibleEEStatus) DeepCopy ¶
func (in *OpenStackAnsibleEEStatus) DeepCopy() *OpenStackAnsibleEEStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackAnsibleEEStatus.
func (*OpenStackAnsibleEEStatus) DeepCopyInto ¶
func (in *OpenStackAnsibleEEStatus) DeepCopyInto(out *OpenStackAnsibleEEStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.