Bug Get etcdctl binary from the etcd image and not from the upstream releases
For non-x86 architectures there is no etcdctl binary available for the upstream releases of etcd. The suggestion
from was to get the binary from the image(https://bugzilla.redhat.com/show_bug.cgi?id=1780396#c4)
which makes sense.
@@ -30,15 +30,13 @@ contents:
exit 1
fi
else
- GOOGLE_URL=https://storage.googleapis.com/etcd
- DOWNLOAD_URL=${GOOGLE_URL}
-
- echo "Downloading etcdctl binary.."
- curl -s -L ${DOWNLOAD_URL}/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz -o $ASSET_DIR/tmp/etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
- && tar -xzf $ASSET_DIR/tmp/etcd-${ETCD_VERSION}-linux-amd64.tar.gz -C $ASSET_DIR/shared --strip-components=1 \
- && mv $ASSET_DIR/shared/etcdctl $ASSET_DIR/bin \
- && rm $ASSET_DIR/shared/etcd \
- && $ETCDCTL_BIN version
+ local etcdimg="{{.Images.etcdKey}}"
+ local etcdctr=$(podman create ${etcdimg})
+ local etcdmnt=$(podman mount "${etcdctr}")
+ cp ${etcdmnt}/bin/etcdctl $ASSET_DIR/bin
+ umount "${etcdmnt}"
+ podman rm "${etcdctr}"
+ $ETCDCTL_BIN version
fi
}
