Skip to content

Commit

Permalink
update hostname of mount pod to volume id (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwwhdls authored Jul 17, 2024
1 parent a3da04b commit d17ca92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/juicefs/mount/builder/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func (r *BaseBuilder) genCommonJuicePod(cnGen func() corev1.Container) *corev1.P
pod.Spec.ServiceAccountName = r.jfsSetting.Attr.ServiceAccountName
pod.Spec.PriorityClassName = config.JFSMountPriorityName
pod.Spec.RestartPolicy = corev1.RestartPolicyAlways
pod.Spec.Hostname = r.jfsSetting.VolumeId
gracePeriod := int64(10)
if r.jfsSetting.Attr.TerminationGracePeriodSeconds != nil {
gracePeriod = *r.jfsSetting.Attr.TerminationGracePeriodSeconds
Expand Down
1 change: 1 addition & 0 deletions pkg/juicefs/mount/builder/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ var (
TerminationGracePeriodSeconds: &gracePeriod,
RestartPolicy: corev1.RestartPolicyAlways,
NodeName: "node",
Hostname: "test",
PriorityClassName: config.JFSMountPriorityName,
},
}
Expand Down

0 comments on commit d17ca92

Please sign in to comment.