Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,22 @@ func ToKeeperVendorSpec(
SecurityContext: keeperPodSecurityContext(),
Affinity: wandb.GetAffinity(spec.ManagedInfraSpec),
Tolerations: *wandb.GetTolerations(spec.ManagedInfraSpec),
Volumes: []corev1.Volume{
{
Name: keeperLogVolumeName,
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
},
},
Containers: []corev1.Container{
{
Name: keeperContainerName,
Image: KeeperImage(mfst.ClickhouseKeeper["default"].Images["keeper"], wandb.Spec.Global.ImageRegistry),
SecurityContext: keeperContainerSecurityContext(),
VolumeMounts: []corev1.VolumeMount{
{Name: keeperLogVolumeName, MountPath: keeperLogMountPath},
},
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ var _ = Describe("Keeper vendor spec", func() {
Expect(container.Image).To(Equal(KeeperImage(manifest.ImageRef{}, "")))
Expect(container.Name).To(Equal(keeperContainerName))
Expect(container.Resources.Requests[corev1.ResourceCPU]).To(Equal(resource.MustParse("250m")))
Expect(container.VolumeMounts).To(ConsistOf(corev1.VolumeMount{
Name: keeperLogVolumeName,
MountPath: keeperLogMountPath,
}))
Expect(chk.Spec.Templates.PodTemplates[0].Spec.Volumes).To(ConsistOf(corev1.Volume{
Name: keeperLogVolumeName,
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
}))

sc := chk.Spec.Templates.PodTemplates[0].Spec.SecurityContext
Expect(sc).NotTo(BeNil())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const (
podTemplateName = "keeper-pod-template"
volumeTemplateName = "keeper-data-volume"
keeperContainerName = "clickhouse-keeper"
keeperLogVolumeName = "keeper-log"
keeperLogMountPath = "/var/log/clickhouse-keeper"

keeperRunAsUser int64 = 101
keeperRunAsGroup int64 = 101
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ func ToObjectStoreVendorSpec(
},
S3: &seaweedv1.S3GatewaySpec{
ComponentSpec: seaweedv1.ComponentSpec{
Affinity: wandb.GetAffinity(infraSpec.ManagedInfraSpec),
Tolerations: *wandb.GetTolerations(infraSpec.ManagedInfraSpec),
Affinity: wandb.GetAffinity(infraSpec.ManagedInfraSpec),
Tolerations: *wandb.GetTolerations(infraSpec.ManagedInfraSpec),
Volumes: seaweedWritableVolumes(),
VolumeMounts: seaweedWritableVolumeMounts(),
Env: []corev1.EnvVar{{
// W&B presigns S3 URLs against the in-cluster endpoint and
// rewrites the host for external clients without re-signing;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ var _ = Describe("SeaweedFS vendor specs", func() {
expectSeaweedWritableMount(seaweed.Spec.Volume.VolumeMounts)
expectSeaweedWritableVolume(seaweed.Spec.Filer.Volumes)
expectSeaweedWritableMount(seaweed.Spec.Filer.VolumeMounts)
Expect(seaweed.Spec.S3.Volumes).To(HaveLen(1))
Expect(seaweed.Spec.S3.VolumeMounts).To(HaveLen(1))
expectSeaweedWritableVolume(seaweed.Spec.S3.Volumes)
expectSeaweedWritableMount(seaweed.Spec.S3.VolumeMounts)
Expect(seaweed.Spec.Master.ExtraArgs).To(ContainElement("-ip.bind=0.0.0.0"))
Expect(seaweed.Spec.Volume.ExtraArgs).To(ContainElement("-ip.bind=0.0.0.0"))
Expect(seaweed.Spec.Filer.ExtraArgs).To(ContainElement("-ip.bind=0.0.0.0"))
Expand Down
Loading