-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(testworkflows): add support for accompanying services (#257)
* feat(testworkflows): add syntax for running accompanying services * feat(testworkflows): add `use` for services * feat(testworkflows): add `logs` for services * chore(testworkflows): make the resulting YAML smaller
- Loading branch information
Showing
8 changed files
with
12,286 additions
and
7,966 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package v1 | ||
|
||
import corev1 "k8s.io/api/core/v1" | ||
|
||
type ServiceRestartPolicy string | ||
|
||
const ( | ||
ServiceRestartPolicyOnFailure ServiceRestartPolicy = "OnFailure" | ||
ServiceRestartPolicyNever ServiceRestartPolicy = "Never" | ||
) | ||
|
||
type IndependentServiceSpec struct { | ||
StepExecuteStrategy `json:",inline" expr:"include"` | ||
|
||
// should it fetch logs for that service | ||
Logs bool `json:"logs,omitempty"` | ||
|
||
// maximum time until reaching readiness | ||
// +kubebuilder:validation:Pattern=^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$ | ||
Timeout string `json:"timeout,omitempty"` | ||
|
||
// instructions for transferring files | ||
Transfer []StepParallelTransfer `json:"transfer,omitempty" expr:"include"` | ||
|
||
// global content that should be fetched into all containers | ||
Content *Content `json:"content,omitempty" expr:"include"` | ||
|
||
// configuration for the scheduled pod | ||
Pod *PodConfig `json:"pod,omitempty" expr:"include"` | ||
|
||
StepRun `json:",inline" expr:"include"` | ||
|
||
// Restart policy for the main container in the pod. One of OnFailure or Never. | ||
RestartPolicy ServiceRestartPolicy `json:"restartPolicy,omitempty" expr:"template"` | ||
|
||
// Probe to check if the service has started correctly | ||
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty" expr:"force"` | ||
} | ||
|
||
type ServiceSpec struct { | ||
// multiple templates to include in this step | ||
Use []TemplateRef `json:"use,omitempty" expr:"include"` | ||
|
||
IndependentServiceSpec `json:",inline" expr:"include"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.