Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetat: [TKC-2845] test workflow pvcs #308

Merged
merged 14 commits into from
Dec 19, 2024
3 changes: 3 additions & 0 deletions api/testworkflows/v1/service_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ type IndependentServiceSpec struct {

// Probe to check if the service has started correctly
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty" expr:"force"`

// list of accompanying permanent volume claims
Pvcs map[string]TestWorkflowPvcConfig `json:"pvcs,omitempty" expr:"template,include"`
vsukhin marked this conversation as resolved.
Show resolved Hide resolved
}

type ServiceSpec struct {
Expand Down
3 changes: 3 additions & 0 deletions api/testworkflows/v1/testworkflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ type TestWorkflowSpec struct {

// steps to run at the end of the workflow
After []Step `json:"after,omitempty" expr:"include"`

// list of accompanying permanent volume claims
Pvcs map[string]TestWorkflowPvcConfig `json:"pvcs,omitempty" expr:"template,include"`
}

// TemplateRef is the reference for the template inclusion
Expand Down
3 changes: 3 additions & 0 deletions api/testworkflows/v1/testworkflowtemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ type TestWorkflowTemplateSpec struct {

// steps to run at the end of the workflow
After []IndependentStep `json:"after,omitempty" expr:"include"`

// list of accompanying permanent volume claims
Pvcs map[string]TestWorkflowPvcConfig `json:"pvcs,omitempty" expr:"template,include"`
}

// +kubebuilder:object:root=true
Expand Down
16 changes: 16 additions & 0 deletions api/testworkflows/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)

Expand Down Expand Up @@ -230,3 +231,18 @@ type TestWorkflowTagSchema struct {
// test workflow execution tags
Tags map[string]string `json:"tags,omitempty" expr:"template"`
}

type TestWorkflowPvcConfig struct {
// Access mode for claim storage. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes
AccessModes []string `json:"accessModes,omitempty" expr:"template"`
// Volume mode indicates the consumption of the volume as either a filesystem or block device. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode
VolumeMode *string `json:"volumeMode,omitempty" expr:"template"`
// expected resources for the pvc
Resources *Resources `json:"resources,omitempty" expr:"include"`
// Storage class name specifies the name of a StorageClass. More info: https://kubernetes.io/docs/concepts/storage/storage-classes/
StorageClassName *string `json:"storageClassName,omitempty" expr:"template"`
// volume name is used to identify the volume
VolumeName string `json:"volumeName,omitempty" expr:"template"`
rangoo94 marked this conversation as resolved.
Show resolved Hide resolved
// selector is used to identify a group of volumes based on their metadata labels
Selector *metav1.LabelSelector `json:"selector,omitempty" expr:"include"`
}
61 changes: 61 additions & 0 deletions api/testworkflows/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading