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 subpath in crd #212

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/crd/bases/starrocks.com_starrocksclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,10 @@ spec:
Gi, GiB, Ti, Ti, Pi, Ei, Ex: `512Mi`.'
pattern: (^0|([0-9]*l[.])?[0-9]+((M|G|T|E|P)i))$
type: string
subPath:
description: SubPath within the volume from which the container's
volume should be mounted.
type: string
required:
- name
- storageSize
Expand Down Expand Up @@ -3215,6 +3219,10 @@ spec:
Gi, GiB, Ti, Ti, Pi, Ei, Ex: `512Mi`.'
pattern: (^0|([0-9]*l[.])?[0-9]+((M|G|T|E|P)i))$
type: string
subPath:
description: SubPath within the volume from which the container's
volume should be mounted.
type: string
required:
- name
- storageSize
Expand Down Expand Up @@ -4485,6 +4493,10 @@ spec:
Gi, GiB, Ti, Ti, Pi, Ei, Ex: `512Mi`.'
pattern: (^0|([0-9]*l[.])?[0-9]+((M|G|T|E|P)i))$
type: string
subPath:
description: SubPath within the volume from which the container's
volume should be mounted.
type: string
required:
- name
- storageSize
Expand Down
6 changes: 6 additions & 0 deletions deploy/starrocks.com_starrocksclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ spec:
storageSize:
pattern: (^0|([0-9]*l[.])?[0-9]+((M|G|T|E|P)i))$
type: string
subPath:
type: string
required:
- name
- storageSize
Expand Down Expand Up @@ -1524,6 +1526,8 @@ spec:
storageSize:
pattern: (^0|([0-9]*l[.])?[0-9]+((M|G|T|E|P)i))$
type: string
subPath:
type: string
required:
- name
- storageSize
Expand Down Expand Up @@ -2114,6 +2118,8 @@ spec:
storageSize:
pattern: (^0|([0-9]*l[.])?[0-9]+((M|G|T|E|P)i))$
type: string
subPath:
type: string
required:
- name
- storageSize
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/starrocks/v1/starrockscluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ type StorageVolume struct {

// MountPath specify the path of volume mount.
MountPath string `json:"mountPath,omitempty"`

// SubPath within the volume from which the container's volume should be mounted.
SubPath string `json:"subPath,omitempty"`
}

// StarRocksClusterList contains a list of StarRocksCluster
Expand Down
1 change: 1 addition & 0 deletions pkg/k8sutils/templates/pod/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func MountStorageVolumes(spec v1.SpecInterface) ([]corev1.Volume, []corev1.Volum
volumeMounts = append(volumeMounts, corev1.VolumeMount{
Name: sv.Name,
MountPath: sv.MountPath,
SubPath: sv.SubPath,
})

volumes = append(volumes, corev1.Volume{
Expand Down