Skip to content

Commit

Permalink
🐛 fix minikube start failure
Browse files Browse the repository at this point in the history
  • Loading branch information
kmrmt committed Dec 10, 2024
1 parent e06133d commit b11c74a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile.d/e2e.mk
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ e2e/actions/run/readreplica: \
$(MAKE) k8s/vald/deploy \
HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml
sleep 20
kubectl wait --for=condition=Ready pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
kubectl wait --for=condition=ContainersReady pod -l "app=$(AGENT_NGT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
kubectl wait --for=condition=Ready pod -l "app=$(AGENT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
kubectl wait --for=condition=ContainersReady pod -l "app=$(AGENT_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT)
$(MAKE) k8s/vald-readreplica/deploy \
HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml
sleep 3
Expand Down
7 changes: 5 additions & 2 deletions Makefile.d/minikube.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

.PHONY: minikube/install
minikube/install: $(BINDIR)/minikube

Expand All @@ -24,12 +25,14 @@ $(BINDIR)/minikube:
# Start minikube with CSI Driver and Volume Snapshots support
# Only use this for development related to Volume Snapshots. Usually k3d is faster.
.PHONY: minikube/start
minikube/start:
minikube start --force
minikube/start: \
$(BINDIR)/docker
minikube start --driver=docker --force
minikube addons enable volumesnapshots
minikube addons enable csi-hostpath-driver
minikube addons disable storage-provisioner
minikube addons disable default-storageclass
minikube addons enable metrics-server
kubectl patch storageclass csi-hostpath-sc -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

.PHONY: minikube/delete
Expand Down
9 changes: 9 additions & 0 deletions Makefile.d/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,12 @@ $(LIB_PATH)/libhdf5.a: $(LIB_PATH) \
&& make install \
&& cd $(ROOTDIR) \
&& rm -rf $(TEMP_DIR)/hdf5.tar.gz $(TEMP_DIR)/hdf5

.PHONY: docker-cli/install
docker-cli/install: $(BINDIR)/docker

$(BINDIR)/docker: $(BINDIR)
curl -fsSL https://download.docker.com/linux/static/stable/$(shell uname -m)/docker-$(shell echo $(DOCKER_VERSION) | cut -c2-).tgz -o $(TEMP_DIR)/docker.tgz \
&& tar -xzvf $(TEMP_DIR)/docker.tgz -C $(TEMP_DIR) \
&& mv $(TEMP_DIR)/docker/docker $(BINDIR) \
&& rm -rf $(TEMP_DIR)/docker{.tgz,}
2 changes: 2 additions & 0 deletions dockers/ci/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RUN --mount=type=bind,target=.,rw \
locales \
git \
npm \
sudo \
cmake \
g++ \
gcc \
Expand Down Expand Up @@ -122,6 +123,7 @@ RUN --mount=type=bind,target=.,rw \
&& make telepresence/install \
&& make tparse/install \
&& make yq/install \
&& make docker-cli/install \
&& make ngt/install \
&& make faiss/install \
&& make usearch/install \
Expand Down
1 change: 1 addition & 0 deletions dockers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ RUN --mount=type=bind,target=.,rw \
&& make telepresence/install \
&& make tparse/install \
&& make yq/install \
&& make docker-cli/install \
&& make ngt/install \
&& make faiss/install \
&& rm -rf ${GOPATH}/src/github.com/${ORG}/${REPO}/*
Expand Down
3 changes: 2 additions & 1 deletion hack/docker/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ var (
"make telepresence/install",
"make tparse/install",
"make yq/install",
"make docker-cli/install",
}

devContainerPreprocess = []string{
Expand Down Expand Up @@ -681,7 +682,7 @@ func main() {
ContainerType: CIContainer,
PackageDir: "ci/base",
RuntimeUser: defaultBuildUser,
ExtraPackages: append([]string{"npm"}, append(clangBuildDeps,
ExtraPackages: append([]string{"npm", "sudo"}, append(clangBuildDeps,
append(ngtBuildDeps,
append(faissBuildDeps,
append(rustBuildDeps,
Expand Down

0 comments on commit b11c74a

Please sign in to comment.