@@ -22,6 +22,18 @@ import (
2222 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2323)
2424
25+ type PatchType struct {
26+ // +kubebuilder:validation:Optional
27+ // +kubebuilder:validation:Format=uri
28+ // URL of the Tobiko repository that a patch will be applied to.
29+ Repository string `json:"repository,omitempty"`
30+
31+ // +kubebuilder:validation:Optional
32+ // Refspec specifies which change the remote repository should be
33+ // checked out to.
34+ Refspec string `json:"refspec,omitempty"`
35+ }
36+
2537// TobikoSpec defines the desired state of Tobiko
2638type TobikoSpec struct {
2739 CommonOptions `json:",inline"`
@@ -69,6 +81,11 @@ type TobikoSpec struct {
6981 // Tobiko version
7082 Version string `json:"version"`
7183
84+ // +kubebuilder:validation:Optional
85+ // +operator-sdk:csv:customresourcedefinitions:type=spec
86+ // Optional patch to apply to the Tobiko repository.
87+ Patch PatchType `json:"patch"`
88+
7289 // +kubebuilder:validation:Optional
7390 // +operator-sdk:csv:customresourcedefinitions:type=spec
7491 // +kubebuilder:default:=""
@@ -155,6 +172,11 @@ type TobikoWorkflowSpec struct {
155172
156173 // +kubebuilder:validation:Optional
157174 // +operator-sdk:csv:customresourcedefinitions:type=spec
175+ // Optional patch to apply to the Tobiko repository for this step.
176+ Patch * PatchType `json:"patch,omitempty"`
177+
178+ // +kubebuilder:validation:Optional
179+ // +operator-sdk:csv:customresourcedefinitions:type=spec
158180 // tobiko.conf
159181 Config string `json:"config,omitempty"`
160182
0 commit comments