Skip to content

Commit

Permalink
fetat: [TKC-2845] test workflow pvcs (#308)
Browse files Browse the repository at this point in the history
* feat: add pvc config

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: add crd

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: test workflow crd

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: service pvcs

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: pvcs for services

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: remove shared

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: add volume name

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: change to *string type

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: use k8s spec for pvc

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: use k8s pvc spec

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: container for service

Signed-off-by: Vladislav Sukhin <[email protected]>

* fix: add service container

Signed-off-by: Vladislav Sukhin <[email protected]>

* Revert "fix: add service container"

This reverts commit 2a01641.

* Revert "fix: container for service"

This reverts commit 890bdff.

---------

Signed-off-by: Vladislav Sukhin <[email protected]>
  • Loading branch information
vsukhin authored Dec 19, 2024
1 parent b70eb1b commit 0330347
Show file tree
Hide file tree
Showing 7 changed files with 2,153 additions and 1 deletion.
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]corev1.PersistentVolumeClaimSpec `json:"pvcs,omitempty" expr:"template,include"`
}

type ServiceSpec struct {
Expand Down
4 changes: 4 additions & 0 deletions api/testworkflows/v1/testworkflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ limitations under the License.
package v1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)
Expand All @@ -38,6 +39,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]corev1.PersistentVolumeClaimSpec `json:"pvcs,omitempty" expr:"template,include"`
}

// TemplateRef is the reference for the template inclusion
Expand Down
4 changes: 4 additions & 0 deletions api/testworkflows/v1/testworkflowtemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ limitations under the License.
package v1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -34,6 +35,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]corev1.PersistentVolumeClaimSpec `json:"pvcs,omitempty" expr:"template,include"`
}

// +kubebuilder:object:root=true
Expand Down
2 changes: 1 addition & 1 deletion api/testworkflows/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,5 @@ type CronJobConfig struct {

type TestWorkflowTagSchema struct {
// test workflow execution tags
Tags map[string]string `json:"tags,omitempty" expr:"template"`
Tags map[string]string `json:"tags,omitempty" expr:"template,template"`
}
21 changes: 21 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.

1,035 changes: 1,035 additions & 0 deletions config/crd/bases/testworkflows.testkube.io_testworkflows.yaml

Large diffs are not rendered by default.

1,085 changes: 1,085 additions & 0 deletions config/crd/bases/testworkflows.testkube.io_testworkflowtemplates.yaml

Large diffs are not rendered by default.

0 comments on commit 0330347

Please sign in to comment.