diff --git a/.github/helm/values/values-readreplica.yaml b/.github/helm/values/values-readreplica.yaml index c42ebd8521..1c55587146 100644 --- a/.github/helm/values/values-readreplica.yaml +++ b/.github/helm/values/values-readreplica.yaml @@ -19,14 +19,6 @@ defaults: level: debug networkPolicy: enabled: true - server_config: - healths: - liveness: - livenessProbe: - initialDelaySeconds: 120 - readiness: - readinessProbe: - initialDelaySeconds: 120 gateway: lb: enabled: true diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 519927f499..9edada1419 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -319,12 +319,6 @@ jobs: - name: Deploy Vald Read Replica id: deploy_vald_readreplica uses: ./.github/actions/e2e-deploy-vald-readreplica - with: - helm_extra_options: ${{ steps.setup_e2e.outputs.HELM_EXTRA_OPTIONS }} - values: .github/helm/values/values-readreplica.yaml - - name: Deploy Vald - id: deploy_vald - uses: ./.github/actions/e2e-deploy-vald with: helm_extra_options: ${{ steps.setup_e2e.outputs.HELM_EXTRA_OPTIONS }} values: .github/helm/values/values-readreplica.yaml diff --git a/Makefile.d/e2e.mk b/Makefile.d/e2e.mk index 92c74f3dcf..fd85b092dd 100644 --- a/Makefile.d/e2e.mk +++ b/Makefile.d/e2e.mk @@ -150,15 +150,9 @@ e2e/actions/run/readreplica: \ sleep 2 kubectl wait -n kube-system --for=condition=Ready pod -l app.kubernetes.io/name=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) kubectl wait -n kube-system --for=condition=ContainersReady pod -l app.kubernetes.io/name=metrics-server --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) - sleep 3 $(MAKE) k8s/vald-readreplica/deploy \ HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml sleep 3 - $(MAKE) k8s/vald/deploy \ - HELM_VALUES=$(ROOTDIR)/.github/helm/values/values-readreplica.yaml - sleep 20 - 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) kubectl wait --for=condition=Ready pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) kubectl wait --for=condition=ContainersReady pod -l "app=$(LB_GATEWAY_IMAGE)" --timeout=$(E2E_WAIT_FOR_START_TIMEOUT) kubectl get pods diff --git a/Makefile.d/k8s.mk b/Makefile.d/k8s.mk index dfd1522718..57c8cfaf61 100644 --- a/Makefile.d/k8s.mk +++ b/Makefile.d/k8s.mk @@ -111,9 +111,9 @@ k8s/manifest/readreplica/update: \ mv $(TEMP_DIR)/vald-readreplica/templates $(ROOTDIR)/k8s/readreplica rm -rf $(TEMP_DIR) -.PHONY: k8s/vald/deploy -## deploy vald sample cluster to k8s -k8s/vald/deploy: +.PHONY: k8s/vald/manifests +## generate vald manifest +k8s/vald/manifests: helm template \ --values $(HELM_VALUES) \ --set defaults.image.tag=$(VERSION) \ @@ -131,6 +131,10 @@ k8s/vald/deploy: --include-crds \ --output-dir $(TEMP_DIR) \ charts/vald + +.PHONY: k8s/vald/deploy +## deploy vald sample cluster to k8s +k8s/vald/deploy: k8s/vald/manifests @echo "Permitting error because there's some cases nothing to apply" kubectl apply -f $(TEMP_DIR)/vald/templates/manager/index || true kubectl apply -f $(TEMP_DIR)/vald/templates/agent || true @@ -146,26 +150,13 @@ k8s/vald/deploy: kubectl apply -f $(TEMP_DIR)/vald/templates/index/job/save || true kubectl apply -f $(TEMP_DIR)/vald/templates/index/job/readreplica/rotate || true kubectl apply -f $(TEMP_DIR)/vald/templates/index/operator || true - rm -rf $(TEMP_DIR) kubectl get pods -o jsonpath="{.items[*].spec.containers[*].image}" | tr " " "\n" + @echo "manifest files location: $(TEMP_DIR)" + .PHONY: k8s/vald/delete ## delete vald sample cluster from k8s -k8s/vald/delete: - helm template \ - --values $(HELM_VALUES) \ - --set defaults.image.tag=$(VERSION) \ - --set agent.image.repository=$(CRORG)/$(AGENT_NGT_IMAGE) \ - --set agent.sidecar.image.repository=$(CRORG)/$(AGENT_SIDECAR_IMAGE) \ - --set discoverer.image.repository=$(CRORG)/$(DISCOVERER_IMAGE) \ - --set gateway.filter.image.repository=$(CRORG)/$(FILTER_GATEWAY_IMAGE) \ - --set gateway.lb.image.repository=$(CRORG)/$(LB_GATEWAY_IMAGE) \ - --set gateway.mirror.image.repository=$(CRORG)/$(MIRROR_GATEWAY_IMAGE) \ - --set manager.index.image.repository=$(CRORG)/$(MANAGER_INDEX_IMAGE) \ - --set manager.index.operator.image.repository=$(CRORG)/$(INDEX_OPERATOR_IMAGE) \ - --include-crds \ - --output-dir $(TEMP_DIR) \ - charts/vald +k8s/vald/delete: k8s/vald/manifests kubectl delete -f $(TEMP_DIR)/vald/templates/gateway/mirror || true kubectl delete -f $(TEMP_DIR)/vald/templates/index/operator || true kubectl delete -f $(TEMP_DIR)/vald/templates/index/job/readreplica/rotate || true @@ -182,7 +173,6 @@ k8s/vald/delete: kubectl delete -f $(TEMP_DIR)/vald/templates/agent/ngt || true kubectl delete -f $(TEMP_DIR)/vald/templates/agent || true kubectl delete -f $(TEMP_DIR)/vald/crds || true - rm -rf $(TEMP_DIR) .PHONY: k8s/multi/vald/deploy ## deploy multiple vald sample clusters to k8s @@ -246,7 +236,7 @@ k8s/vald-helm-operator/delete: .PHONY: k8s/vald-readreplica/deploy ## deploy vald-readreplica to k8s -k8s/vald-readreplica/deploy: +k8s/vald-readreplica/deploy: k8s/vald/deploy helm template \ --values $(HELM_VALUES) \ --set defaults.image.tag=$(VERSION) \ @@ -261,15 +251,27 @@ k8s/vald-readreplica/deploy: $(HELM_EXTRA_OPTIONS) \ --output-dir $(TEMP_DIR) \ charts/vald-readreplica + kubectl delete -f $(TEMP_DIR)/vald/templates/gateway || true + kubectl delete -f $(TEMP_DIR)/vald/templates/gateway/lb || true + kubectl get pods + kubectl wait --for=delete pod -l app=vald-lb-gateway --timeout=600s + kubectl apply -f $(TEMP_DIR)/vald-readreplica/templates sleep 5 - # kubectl get pods - # kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=vald-readreplica --timeout=600s + kubectl get pods + kubectl wait --for=condition=ready pod -l app=vald-agent --timeout=600s + kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=vald-readreplica --timeout=600s + + kubectl apply -f $(TEMP_DIR)/vald/templates/gateway || true + kubectl apply -f $(TEMP_DIR)/vald/templates/gateway/lb || true + + kubectl get pods + kubectl wait --for=condition=ready pod -l app=vald-lb-gateway --timeout=600s .PHONY: k8s/vald-readreplica/delete ## delete vald-helm-operator from k8s -k8s/vald-readreplica/delete: +k8s/vald-readreplica/delete: k8s/vald/delete helm template \ --values $(HELM_VALUES) \ --set defaults.image.tag=$(VERSION) \ diff --git a/Makefile.d/minikube.mk b/Makefile.d/minikube.mk index ebec7bc81f..d7240770fc 100644 --- a/Makefile.d/minikube.mk +++ b/Makefile.d/minikube.mk @@ -25,9 +25,8 @@ $(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: \ - $(BINDIR)/docker - minikube start --driver=docker --force --alsologtostderr -v=1 +minikube/start: + minikube start minikube addons enable volumesnapshots minikube addons enable csi-hostpath-driver minikube addons disable storage-provisioner