Skip to content

Commit

Permalink
Feature/mk to k3d (#23)
Browse files Browse the repository at this point in the history
* chore: switches to k3d from minikiube

---------

Signed-off-by: Amit Singh <[email protected]>
  • Loading branch information
semmet95 authored Dec 29, 2024
1 parent 6eb66e8 commit 2bd31e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
TEST_CLUSTER_NAME = "test-env"
CNPG_VERSION ?= "1.24.0"
PG_HOST ?= "http://127.0.0.1"
PG_USER_PASSWORD ?= "test_123"
Expand Down Expand Up @@ -37,14 +38,13 @@ tests: unit-tests acceptance-tests
start: codegen
go run main.go

minikube-cleanup:
@if minikube status > /dev/null 2>&1; then \
minikube stop; \
minikube delete; \
k3d-cleanup:
@if k3d cluster list | grep -q "^$(TEST_CLUSTER_NAME) "; then \
k3d cluster delete "$(TEST_CLUSTER_NAME)"; \
fi

minikube-setup: minikube-cleanup
minikube start --cpus 4 --memory 6144
k3d-setup: k3d-cleanup
k3d cluster create $(TEST_CLUSTER_NAME) --servers 1 --agents 1
@echo -e "\n\n"

cnpg-controller-setup:
Expand All @@ -61,7 +61,7 @@ pg-setup: cnpg-controller-setup
sleep 240
kubectl get pods -l cnpg.io/cluster=cnpg-cluster -n postgres-cluster

local-pg-setup: minikube-setup pg-setup
local-pg-setup: k3d-setup pg-setup

cloud-k8s-setup:
chmod 400 configs/civo-kubeconfig
Expand Down
9 changes: 5 additions & 4 deletions helm/cnpg-database/templates/cnpg-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ spec:
containers:
- name: adminer
image: adminer:4.8.1
limits:
memory: "256Mi"
requests:
cpu: "50m"
resources:
limits:
memory: "256Mi"
requests:
cpu: "50m"
ports:
- containerPort: 8080

0 comments on commit 2bd31e6

Please sign in to comment.