Merge pull request #10548 from jiefenghe/master

disable minikube-scheduled-stop.service until a user schedules a stop
pull/10562/head
Medya Ghazizadeh 2021-02-22 01:04:50 -08:00 committed by GitHub
commit 2ac7bcd8d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 12 deletions

View File

@ -8,10 +8,6 @@ define SCHEDULED_STOP_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 \
$(SCHEDULED_STOP_PKGDIR)/minikube-scheduled-stop.service \
$(TARGET_DIR)/usr/lib/systemd/system/minikube-scheduled-stop.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs /usr/lib/systemd/system/minikube-scheduled-stop.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/minikube-scheduled-stop.service
endef
define SCHEDULED_STOP_INSTALL_TARGET_CMDS

View File

@ -155,9 +155,7 @@ RUN ln -fs /usr/lib/systemd/system/minikube-automount.service \
# scheduled stop service
COPY scheduled-stop/minikube-scheduled-stop /var/lib/minikube/scheduled-stop/minikube-scheduled-stop
COPY scheduled-stop/minikube-scheduled-stop.service /usr/lib/systemd/system/minikube-scheduled-stop.service
RUN ln -fs /usr/lib/systemd/system/minikube-scheduled-stop.service \
/etc/systemd/system/multi-user.target.wants/minikube-scheduled-stop.service && \
chmod +x /var/lib/minikube/scheduled-stop/minikube-scheduled-stop
RUN chmod +x /var/lib/minikube/scheduled-stop/minikube-scheduled-stop
# disable non-docker runtimes by default
RUN systemctl disable containerd && systemctl disable crio && rm /etc/crictl.yaml

View File

@ -24,9 +24,9 @@ import (
const (
// Version is the current version of kic
Version = "v0.0.17-1613846643-10477"
Version = "v0.0.17-1613934488-10548"
// SHA of the kic base image
baseImageSHA = "1c101a31d1b5dca98f49be85bc0a673ff902428b969fd2dc0535c34cb38533a4"
baseImageSHA = "5cacd48d07f699a171eedf65ef1490bd59a523ffcd90662e3b66eb838c5a1b5d"
// The name of the GCR kicbase repository
gcrRepo = "gcr.io/k8s-minikube/kicbase-builds"
// The name of the Dockerhub kicbase repository

View File

@ -100,8 +100,12 @@ func startSystemdService(profile string, duration time.Duration) error {
return errors.Wrap(err, "copying scheduled stop env file")
}
// restart scheduled stop service in container
sysManger := sysinit.New(runner)
return sysManger.Restart(constants.ScheduledStopSystemdService)
sysManager := sysinit.New(runner)
// enable scheduled stop service
if err := sysManager.Enable(constants.ScheduledStopSystemdService); err != nil {
return err
}
return sysManager.Restart(constants.ScheduledStopSystemdService)
}
// return the contents of the environment file for minikube-scheduled-stop systemd service

View File

@ -26,7 +26,7 @@ minikube start [flags]
--apiserver-names strings A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine
--apiserver-port int The apiserver listening port (default 8443)
--auto-update-drivers If set, automatically updates drivers to the latest version. Defaults to true. (default true)
--base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase-builds:v0.0.17-1613846643-10477@sha256:1c101a31d1b5dca98f49be85bc0a673ff902428b969fd2dc0535c34cb38533a4")
--base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase-builds:v0.0.17-1613934488-10548@sha256:5cacd48d07f699a171eedf65ef1490bd59a523ffcd90662e3b66eb838c5a1b5d")
--cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true)
--cni string CNI plug-in to use. Valid options: auto, bridge, calico, cilium, flannel, kindnet, or path to a CNI manifest (default: auto)
--container-runtime string The container runtime to be used (docker, cri-o, containerd). (default "docker")