Skip to content

Commit

Permalink
Change default value for RestartPolicy from never to OnFailed
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Alfieri <[email protected]>
  • Loading branch information
rebtoor committed Nov 20, 2023
1 parent 3cea9a4 commit 4a9d0f8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/bases/ansibleee.openstack.org_openstackansibleees.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ spec:
- false
type: boolean
restartPolicy:
default: Never
default: OnFailure
enum:
- OnFailure
- Never
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/openstack_ansibleee_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ type OpenStackAnsibleEESpec struct {
// 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
// RestartPolicy default: OnFailure
// +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"
// +kubebuilder:default:="OnFailure"
RestartPolicy string `json:"restartPolicy,omitempty"`
// PreserveJobs - do not delete jobs after they finished e.g. to check logs
// PreserveJobs default: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ spec:
- false
type: boolean
restartPolicy:
default: Never
default: OnFailure
enum:
- OnFailure
- Never
Expand Down
2 changes: 1 addition & 1 deletion docs/openstack_ansibleee.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ OpenStackAnsibleEESpec defines the desired state of OpenStackAnsibleEE
| name | Name is the name of the internal container inside the pod | string | false |
| envConfigMapName | EnvConfigMapName is the name of the k8s config map that contains the ansible env variables | string | false |
| env | Env is a list containing the environment variables to pass to the pod | []corev1.EnvVar | false |
| restartPolicy | 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 | string | false |
| restartPolicy | RestartPolicy is the policy applied to the Job on whether it needs to restart the Pod. It can be \"OnFailure\" or \"Never\". RestartPolicy default: OnFailure | string | false |
| preserveJobs | PreserveJobs - do not delete jobs after they finished e.g. to check logs PreserveJobs default: true | bool | false |
| uid | UID is the userid that will be used to run the container. | int64 | false |
| inventory | Inventory is the inventory that the ansible playbook will use to launch the job. | string | false |
Expand Down

0 comments on commit 4a9d0f8

Please sign in to comment.