Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kmrmt committed Dec 23, 2024
1 parent ce899a4 commit a2ca0c2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 47 deletions.
8 changes: 0 additions & 8 deletions .github/helm/values/values-readreplica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions Makefile.d/e2e.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
50 changes: 26 additions & 24 deletions Makefile.d/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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) \
Expand All @@ -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) \
Expand Down
5 changes: 2 additions & 3 deletions Makefile.d/minikube.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2ca0c2

Please sign in to comment.