@@ -22,9 +22,6 @@ import (
2222 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2323)
2424
25- // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
26- // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
27-
2825// AnsibleTestSpec defines the desired state of AnsibleTest
2926type AnsibleTestSpec struct {
3027 CommonOptions `json:",inline"`
@@ -35,66 +32,68 @@ type AnsibleTestSpec struct {
3532 // spawned using the AnsibleTest CR. https://pkg.go.dev/k8s.io/api/core/v1#ResourceRequirements
3633 Resources corev1.ResourceRequirements `json:"resources,omitempty"`
3734
38- // +operator-sdk:csv:customresourcedefinitions:type=spec
3935 // +kubebuilder:validation:Optional
36+ // +operator-sdk:csv:customresourcedefinitions:type=spec
4037 // +kubebuilder:default:="dataplane-ansible-ssh-private-key-secret"
4138 // ComputeSSHKeySecretName is the name of the k8s secret that contains an ssh key for computes.
4239 // The key is mounted to ~/.ssh/id_ecdsa in the ansible pod
4340 ComputesSSHKeySecretName string `json:"computeSSHKeySecretName"`
4441
45- // +operator-sdk:csv:customresourcedefinitions:type=spec
4642 // +kubebuilder:validation:Optional
43+ // +operator-sdk:csv:customresourcedefinitions:type=spec
4744 // +kubebuilder:default:=""
4845 // WorkloadSSHKeySecretName is the name of the k8s secret that contains an ssh key for the ansible workload.
4946 // The key is mounted to ~/test_keypair.key in the ansible pod
5047 WorkloadSSHKeySecretName string `json:"workloadSSHKeySecretName"`
5148
52- // +operator-sdk:csv:customresourcedefinitions:type=spec
5349 // +kubebuilder:validation:Required
50+ // +operator-sdk:csv:customresourcedefinitions:type=spec
5451 // +kubebuilder:default:=""
5552 // AnsibleGitRepo - git repo to clone into container
5653 AnsibleGitRepo string `json:"ansibleGitRepo"`
5754
58- // +operator-sdk:csv:customresourcedefinitions:type=spec
5955 // +kubebuilder:validation:Required
56+ // +operator-sdk:csv:customresourcedefinitions:type=spec
6057 // +kubebuilder:default:=""
6158 // AnsiblePlaybookPath - path to ansible playbook
6259 AnsiblePlaybookPath string `json:"ansiblePlaybookPath"`
6360
61+ // +kubebuilder:validation:Optional
6462 // +operator-sdk:csv:customresourcedefinitions:type=spec
65- // +kubebuilder:validation:optional
6663 // +kubebuilder:default:=""
67- // AnsibleCollections - extra ansible collections to instal in additionn to the ones exist in the requirements.yaml
64+ // AnsibleCollections - extra ansible collections to install in addition
65+ // to the ones existing in the requirements.yaml
6866 AnsibleCollections string `json:"ansibleCollections,omitempty"`
6967
68+ // +kubebuilder:validation:Optional
7069 // +operator-sdk:csv:customresourcedefinitions:type=spec
71- // +kubebuilder:validation:optional
7270 // +kubebuilder:default:=""
73- // AnsibleVarFiles - interface to create ansible var files Those get added to the
71+ // AnsibleVarFiles - interface to create ansible var files. Those get added
72+ // to the service config dir in /etc/test_operator/<file> and passed to the
73+ // ansible command using -e @/etc/test_operator/<file>
7474 AnsibleVarFiles string `json:"ansibleVarFiles,omitempty"`
7575
76+ // +kubebuilder:validation:Optional
7677 // +operator-sdk:csv:customresourcedefinitions:type=spec
77- // +kubebuilder:validation:optional
7878 // +kubebuilder:default:=""
79- // AnsibleExtraVars - string to pass parameters to ansible using
79+ // AnsibleExtraVars - string to pass parameters to ansible
8080 AnsibleExtraVars string `json:"ansibleExtraVars,omitempty"`
8181
82+ // +kubebuilder:validation:Optional
8283 // +operator-sdk:csv:customresourcedefinitions:type=spec
83- // +kubebuilder:validation:optional
8484 // +kubebuilder:default:=""
8585 // AnsibleInventory - string that contains the inventory file content
8686 AnsibleInventory string `json:"ansibleInventory,omitempty"`
8787
88- // +operator-sdk:csv:customresourcedefinitions:type=spec
8988 // +kubebuilder:validation:Optional
89+ // +operator-sdk:csv:customresourcedefinitions:type=spec
9090 // +kubebuilder:default:=false
9191 // Run ansible playbook with -vvvv
9292 Debug bool `json:"debug"`
9393
94- // +operator-sdk:csv:customresourcedefinitions:type=spec
95- // A parameter that contains a workflow definition.
9694 // +kubebuilder:validation:Optional
9795 // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
96+ // A parameter that contains a workflow definition.
9897 Workflow []AnsibleTestWorkflowSpec `json:"workflow,omitempty"`
9998}
10099
@@ -113,51 +112,53 @@ type AnsibleTestWorkflowSpec struct {
113112 // spawned using the AnsibleTest CR. https://pkg.go.dev/k8s.io/api/core/v1#ResourceRequirements
114113 Resources * corev1.ResourceRequirements `json:"resources,omitempty"`
115114
116- // +operator-sdk:csv:customresourcedefinitions:type=spec
117115 // +kubebuilder:validation:Optional
116+ // +operator-sdk:csv:customresourcedefinitions:type=spec
118117 // ComputeSSHKeySecretName is the name of the k8s secret that contains an ssh key for computes.
119118 // The key is mounted to ~/.ssh/id_ecdsa in the ansible pod
120119 ComputesSSHKeySecretName string `json:"computeSSHKeySecretName"`
121120
122- // +operator-sdk:csv:customresourcedefinitions:type=spec
123121 // +kubebuilder:validation:Optional
122+ // +operator-sdk:csv:customresourcedefinitions:type=spec
124123 // WorkloadSSHKeySecretName is the name of the k8s secret that contains an ssh key for the ansible workload.
125124 // The key is mounted to ~/test_keypair.key in the ansible pod
126125 WorkloadSSHKeySecretName string `json:"workloadSSHKeySecretName"`
127126
128- // +operator-sdk:csv:customresourcedefinitions:type=spec
129127 // +kubebuilder:validation:Optional
128+ // +operator-sdk:csv:customresourcedefinitions:type=spec
130129 // AnsibleGitRepo - git repo to clone into container
131130 AnsibleGitRepo string `json:"ansibleGitRepo,omitempty"`
132131
133- // +operator-sdk:csv:customresourcedefinitions:type=spec
134132 // +kubebuilder:validation:Optional
133+ // +operator-sdk:csv:customresourcedefinitions:type=spec
135134 // AnsiblePlaybookPath - path to ansible playbook
136135 AnsiblePlaybookPath string `json:"ansiblePlaybookPath,omitempty"`
137136
137+ // +kubebuilder:validation:Optional
138138 // +operator-sdk:csv:customresourcedefinitions:type=spec
139- // +kubebuilder:validation:optional
140- // AnsibleCollections - extra ansible collections to instal in additionn to the ones exist in the requirements.yaml
139+ // AnsibleCollections - extra ansible collections to install in addition
140+ // to the ones existing in the requirements.yaml
141141 AnsibleCollections string `json:"ansibleCollections,omitempty"`
142142
143+ // +kubebuilder:validation:Optional
143144 // +operator-sdk:csv:customresourcedefinitions:type=spec
144- // +kubebuilder:validation:optional
145- // AnsibleVarFiles - interface to create ansible var files Those get added to the
146- // service config dir in /etc/test_operator/<file> and passed to the ansible command using -e @/etc/test_operator/<file>
145+ // AnsibleVarFiles - interface to create ansible var files. Those get added
146+ // to the service config dir in /etc/test_operator/<file> and passed to the
147+ // ansible command using -e @/etc/test_operator/<file>
147148 AnsibleVarFiles string `json:"ansibleVarFiles,omitempty"`
148149
150+ // +kubebuilder:validation:Optional
149151 // +operator-sdk:csv:customresourcedefinitions:type=spec
150- // +kubebuilder:validation:optional
151152 // AnsibleExtraVars - interface to pass parameters to ansible using -e
152153 AnsibleExtraVars string `json:"ansibleExtraVars,omitempty"`
153154
155+ // +kubebuilder:validation:Optional
154156 // +operator-sdk:csv:customresourcedefinitions:type=spec
155- // +kubebuilder:validation:optional
156157 // AnsibleInventory - string that contains the inventory file content
157158 AnsibleInventory string `json:"ansibleInventory,omitempty"`
158159
159- // +operator-sdk:csv:customresourcedefinitions:type=spec
160160 // +kubebuilder:validation:Optional
161+ // +operator-sdk:csv:customresourcedefinitions:type=spec
161162 // Run ansible playbook with -vvvv
162163 Debug bool `json:"debug,omitempty"`
163164}
0 commit comments