agones.dev/agones@v1.53.0/build/includes/minikube.mk (about) 1 # Copyright 2019 Google LLC All Rights Reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 MINIKUBE_DRIVER ?= docker 16 17 # minikube shell mount for certificates 18 minikube_cert_mount := ~/.minikube:$(HOME)/.minikube 19 20 # __ __ _ _ _ _ 21 # | \/ (_)_ __ (_) | ___ _| |__ ___ 22 # | |\/| | | '_ \| | |/ / | | | '_ \ / _ \ 23 # | | | | | | | | | <| |_| | |_) | __/ 24 # |_| |_|_|_| |_|_|_|\_\\__,_|_.__/ \___| 25 # 26 27 # Switches to an "agones" profile, and starts a kubernetes cluster 28 # of the right version. 29 minikube-test-cluster: DOCKER_RUN_ARGS+=--network=host -v $(minikube_cert_mount) 30 minikube-test-cluster: $(ensure-build-image) 31 $(MINIKUBE) start --kubernetes-version v1.32.5 -p $(MINIKUBE_PROFILE) --driver $(MINIKUBE_DRIVER) 32 33 # Connecting to minikube requires so enhanced permissions, so use this target 34 # instead of `make shell` to start an interactive shell for development on minikube. 35 minikube-shell: $(ensure-build-image) 36 $(MAKE) shell DOCKER_RUN_ARGS="--network=host -v $(minikube_cert_mount) $(DOCKER_RUN_ARGS)" 37 38 # Push the local Agones Docker images that have already been built 39 # via `make build` or `make build-images` into the "agones" minikube instance. 40 minikube-push: 41 $(MINIKUBE) image load $(sidecar_linux_amd64_tag) -p $(MINIKUBE_PROFILE) 42 $(MINIKUBE) image load $(controller_amd64_tag) -p $(MINIKUBE_PROFILE) 43 $(MINIKUBE) image load $(ping_amd64_tag) -p $(MINIKUBE_PROFILE) 44 $(MINIKUBE) image load $(allocator_amd64_tag) -p $(MINIKUBE_PROFILE) 45 $(MINIKUBE) image load $(extensions_amd64_tag) -p $(MINIKUBE_PROFILE) 46 $(MINIKUBE) image load $(processor_amd64_tag) -p $(MINIKUBE_PROFILE) 47 48 $(MINIKUBE) image tag $(sidecar_linux_amd64_tag) $(sidecar_tag) -p $(MINIKUBE_PROFILE) 49 $(MINIKUBE) image tag $(controller_amd64_tag) $(controller_tag) -p $(MINIKUBE_PROFILE) 50 $(MINIKUBE) image tag $(ping_amd64_tag) $(ping_tag) -p $(MINIKUBE_PROFILE) 51 $(MINIKUBE) image tag $(allocator_amd64_tag) $(allocator_tag) -p $(MINIKUBE_PROFILE) 52 $(MINIKUBE) image tag $(extensions_amd64_tag) $(extensions_tag) -p $(MINIKUBE_PROFILE) 53 $(MINIKUBE) image tag $(processor_amd64_tag) $(processor_tag) -p $(MINIKUBE_PROFILE) 54 55 # Installs the current development version of Agones into the Kubernetes cluster. 56 # Use this instead of `make install`, as it disables PullAlways on the install.yaml 57 minikube-install: 58 $(MAKE) install DOCKER_RUN_ARGS="--network=host -v $(minikube_cert_mount)" ALWAYS_PULL_SIDECAR=false \ 59 IMAGE_PULL_POLICY=IfNotPresent PING_SERVICE_TYPE=NodePort ALLOCATOR_SERVICE_TYPE=NodePort 60 61 minikube-uninstall: $(ensure-build-image) 62 $(MAKE) uninstall DOCKER_RUN_ARGS="--network=host -v $(minikube_cert_mount)" 63 64 # Runs e2e tests against our minikube 65 minikube-test-e2e: DOCKER_RUN_ARGS=--network=host -v $(minikube_cert_mount) 66 minikube-test-e2e: test-e2e 67 68 # Runs stress tests against our minikube 69 minikube-stress-test-e2e: DOCKER_RUN_ARGS=--network=host -v $(minikube_cert_mount) 70 minikube-stress-test-e2e: stress-test-e2e 71 72 # prometheus on minkube 73 # we have to disable PVC as it's not supported on minkube. 74 minikube-setup-prometheus: 75 $(MAKE) setup-prometheus \ 76 DOCKER_RUN_ARGS="--network=host -v $(minikube_cert_mount)" \ 77 PVC=false HELM_ARGS="--set server.resources.requests.cpu=0,server.resources.requests.memory=0" 78 79 # grafana on minkube with dashboards and prometheus datasource installed. 80 # we have to disable PVC as it's not supported on minkube. 81 minikube-setup-grafana: 82 $(MAKE) setup-grafana \ 83 DOCKER_RUN_ARGS="--network=host -v $(minikube_cert_mount)" 84 85 # prometheus-stack on minkube 86 # we have to disable PVC as it's not supported on minkube. 87 minikube-setup-prometheus-stack: 88 $(MAKE) setup-prometheus-stack \ 89 DOCKER_RUN_ARGS="--network=host -v $(minikube_cert_mount)" \ 90 PVC=false HELM_ARGS="--set prometheus.server.resources.requests.cpu=0,prometheus.server.resources.requests.memory=0" 91 92 # minikube port forwarding 93 minikube-controller-portforward: 94 $(MAKE) controller-portforward DOCKER_RUN_ARGS="--network=host -v $(minikube_cert_mount)" 95 96 # minikube port forwarding grafana 97 minikube-grafana-portforward: 98 $(MAKE) grafana-portforward \ 99 DOCKER_RUN_ARGS="--network=host -v $(minikube_cert_mount)" 100 101 # minikube port forwarding for prometheus web ui 102 minikube-prometheus-portforward: 103 $(MAKE) prometheus-portforward \ 104 DOCKER_RUN_ARGS="--network=host -v $(minikube_cert_mount)"