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

Support Google Cloud Storage #501

Merged
merged 13 commits into from
Mar 24, 2023
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SHELL = /bin/bash
.SHELLFLAGS = -e -o pipefail -c

# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS = "crd:crdVersions=v1,maxDescLen=100"
CRD_OPTIONS = "crd:crdVersions=v1,maxDescLen=50"

# for Go
GOOS = $(shell go env GOOS)
Expand Down
51 changes: 51 additions & 0 deletions api/v1beta1/job_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ type JobConfig struct {
//
// +optional
Affinity *AffinityApplyConfiguration `json:"affinity,omitempty"`

// Volumes defines the list of volumes that can be mounted by containers in the Pod.
//
// +optional
Volumes []VolumeApplyConfiguration `json:"volumes,omitempty"`

// VolumeMounts describes a list of volume mounts that are to be mounted in a container.
//
// +optional
VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"`
}

// VolumeSourceApplyConfiguration is the type defined to implement the DeepCopy method.
Expand All @@ -84,6 +94,40 @@ func (in *VolumeSourceApplyConfiguration) DeepCopy() *VolumeSourceApplyConfigura
return out
}

// VolumeApplyConfiguration is the type defined to implement the DeepCopy method.
type VolumeApplyConfiguration corev1ac.VolumeApplyConfiguration

// DeepCopy is copying the receiver, creating a new VolumeSourceApplyConfiguration.
func (in *VolumeApplyConfiguration) DeepCopy() *VolumeApplyConfiguration {
out := new(VolumeApplyConfiguration)
bytes, err := json.Marshal(in)
if err != nil {
panic("Failed to marshal")
}
err = json.Unmarshal(bytes, out)
if err != nil {
panic("Failed to unmarshal")
}
return out
}

// VolumeMountApplyConfiguration is the type defined to implement the DeepCopy method.
type VolumeMountApplyConfiguration corev1ac.VolumeMountApplyConfiguration

// DeepCopy is copying the receiver, creating a new VolumeSourceApplyConfiguration.
func (in *VolumeMountApplyConfiguration) DeepCopy() *VolumeMountApplyConfiguration {
out := new(VolumeMountApplyConfiguration)
bytes, err := json.Marshal(in)
if err != nil {
panic("Failed to marshal")
}
err = json.Unmarshal(bytes, out)
if err != nil {
panic("Failed to unmarshal")
}
return out
}

// EnvFromSourceApplyConfiguration is the type defined to implement the DeepCopy method.
type EnvFromSourceApplyConfiguration corev1ac.EnvFromSourceApplyConfiguration

Expand Down Expand Up @@ -156,4 +200,11 @@ type BucketConfig struct {
// is used (https?://BUCKET.ENDPOINT/KEY).
// +optional
UsePathStyle bool `json:"usePathStyle,omitempty"`

// BackendType is an identifier for the object storage to be used.
//
// +kubebuilder:validation:Enum=s3;gcs
// +kubebuilder:default=s3
// +optional
BackendType string `json:"backendType,omitempty"`
}
78 changes: 78 additions & 0 deletions api/v1beta1/zz_generated.conversion.go

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

26 changes: 26 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

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

51 changes: 51 additions & 0 deletions api/v1beta2/job_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ type JobConfig struct {
//
// +optional
Affinity *AffinityApplyConfiguration `json:"affinity,omitempty"`

// Volumes defines the list of volumes that can be mounted by containers in the Pod.
//
// +optional
Volumes []VolumeApplyConfiguration `json:"volumes,omitempty"`

// VolumeMounts describes a list of volume mounts that are to be mounted in a container.
//
// +optional
VolumeMounts []VolumeMountApplyConfiguration `json:"volumeMounts,omitempty"`
}

// VolumeSourceApplyConfiguration is the type defined to implement the DeepCopy method.
Expand All @@ -84,6 +94,40 @@ func (in *VolumeSourceApplyConfiguration) DeepCopy() *VolumeSourceApplyConfigura
return out
}

// VolumeApplyConfiguration is the type defined to implement the DeepCopy method.
type VolumeApplyConfiguration corev1ac.VolumeApplyConfiguration

// DeepCopy is copying the receiver, creating a new VolumeSourceApplyConfiguration.
func (in *VolumeApplyConfiguration) DeepCopy() *VolumeApplyConfiguration {
out := new(VolumeApplyConfiguration)
bytes, err := json.Marshal(in)
if err != nil {
panic("Failed to marshal")
}
err = json.Unmarshal(bytes, out)
if err != nil {
panic("Failed to unmarshal")
}
return out
}

// VolumeMountApplyConfiguration is the type defined to implement the DeepCopy method.
type VolumeMountApplyConfiguration corev1ac.VolumeMountApplyConfiguration

// DeepCopy is copying the receiver, creating a new VolumeSourceApplyConfiguration.
func (in *VolumeMountApplyConfiguration) DeepCopy() *VolumeMountApplyConfiguration {
out := new(VolumeMountApplyConfiguration)
bytes, err := json.Marshal(in)
if err != nil {
panic("Failed to marshal")
}
err = json.Unmarshal(bytes, out)
if err != nil {
panic("Failed to unmarshal")
}
return out
}

// EnvFromSourceApplyConfiguration is the type defined to implement the DeepCopy method.
type EnvFromSourceApplyConfiguration corev1ac.EnvFromSourceApplyConfiguration

Expand Down Expand Up @@ -139,6 +183,13 @@ type BucketConfig struct {
// is used (https?://BUCKET.ENDPOINT/KEY).
// +optional
UsePathStyle bool `json:"usePathStyle,omitempty"`

// BackendType is an identifier for the object storage to be used.
//
// +kubebuilder:validation:Enum=s3;gcs
// +kubebuilder:default=s3
// +optional
BackendType string `json:"backendType,omitempty"`
}

// AffinityApplyConfiguration is the type defined to implement the DeepCopy method.
Expand Down
26 changes: 26 additions & 0 deletions api/v1beta2/zz_generated.deepcopy.go

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