Skip to content

Commit

Permalink
Merge pull request rook#13129 from BlaineEXE/multus-use-rook-image-fo…
Browse files Browse the repository at this point in the history
…r-ip-detect

multus: use rook image for ip range detection
  • Loading branch information
BlaineEXE authored Nov 9, 2023
2 parents 383dfda + db1ca8c commit a7fce61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions images/ceph/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ FROM BASEIMAGE
ARG S5CMD_VERSION
ARG S5CMD_ARCH

# install 'ip' tool for Multus
RUN dnf install -y --setopt=install_weak_deps=False iproute && dnf clean all

# Install the s5cmd package to interact with s3 gateway
RUN curl --fail -sSL -o /s5cmd.tar.gz https://github.com/peak/s5cmd/releases/download/v${S5CMD_VERSION}/s5cmd_${S5CMD_VERSION}_${S5CMD_ARCH}.tar.gz && \
mkdir /s5cmd && \
Expand Down
8 changes: 4 additions & 4 deletions pkg/operator/ceph/controller/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func discoverAddressRanges(
`},
[]string{},
rookImage,
clusterSpec.CephVersion.Image,
rookImage,
clusterSpec.CephVersion.ImagePullPolicy,
)
if err != nil {
Expand All @@ -272,7 +272,7 @@ func discoverAddressRanges(
netStatusVol, netStatusMount := networkStatusVolumeAndMount()
job.Spec.Template.Spec.Volumes = append(job.Spec.Template.Spec.Volumes, netStatusVol)
job.Spec.Template.Spec.Containers[0].VolumeMounts = append(job.Spec.Template.Spec.Containers[0].VolumeMounts, netStatusMount)
job.Spec.Template.Spec.InitContainers = append(job.Spec.Template.Spec.InitContainers, containerWaitForNetworkStatus(clusterSpec))
job.Spec.Template.Spec.InitContainers = append(job.Spec.Template.Spec.InitContainers, containerWaitForNetworkStatus(clusterSpec, rookImage))

stdout, stderr, retcode, err := networkCanary.Run(ctx, detectNetworkCIDRTimeout)
if err != nil {
Expand Down Expand Up @@ -353,7 +353,7 @@ func networkStatusVolumeAndMount() (corev1.Volume, corev1.VolumeMount) {
// to wait until the network status annotation is present to output info before running so that it
// reports all the info. separate step of waiting for network status annotation into an init
// container so that it can be more easily debugged (output not present in cmd reporter's result)
func containerWaitForNetworkStatus(clusterSpec *cephv1.ClusterSpec) corev1.Container {
func containerWaitForNetworkStatus(clusterSpec *cephv1.ClusterSpec, rookImage string) corev1.Container {
_, mount := networkStatusVolumeAndMount()
return corev1.Container{
Name: "wait-for-network-status-annotation",
Expand All @@ -369,7 +369,7 @@ func containerWaitForNetworkStatus(clusterSpec *cephv1.ClusterSpec) corev1.Conta
echo "" # newline
`,
},
Image: clusterSpec.CephVersion.Image,
Image: rookImage,
ImagePullPolicy: clusterSpec.CephVersion.ImagePullPolicy,
VolumeMounts: []corev1.VolumeMount{
mount,
Expand Down

0 comments on commit a7fce61

Please sign in to comment.