-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0128b2c
commit 1fdda6b
Showing
6 changed files
with
59 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Python test in k8s cluster | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
create-cluster: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.12.3 | ||
- name: Set up Python '3.11' | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.11' | ||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
- name: Install Charts (in normal mode) | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo update | ||
helm install my-postgresql bitnami/postgresql --version 13.2.9 | ||
helm install my-rabbitmq bitnami/rabbitmq --version 12.5.0 | ||
helm install my-redis bitnami/redis --version 18.3.3 --set architecture=standalone | ||
# wait all service is raidy | ||
# postgresql | ||
# my-postgresql.default.svc.cluster.local | ||
export POSTGRES_PASSWORD=$(kubectl get secret --namespace default my-postgresql -o jsonpath="{.data.postgres-password}" | base64 -d) | ||
kubectl port-forward --namespace default svc/my-postgresql 5432:5432 & | ||
# rabbitmq | ||
# my-rabbitmq.default.svc.cluster.local | ||
echo "Username : user" | ||
echo "Password : $(kubectl get secret --namespace default my-rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 -d)" | ||
echo "ErLang Cookie : $(kubectl get secret --namespace default my-rabbitmq -o jsonpath="{.data.rabbitmq-erlang-cookie}" | base64 -d)" | ||
# redis | ||
# my-redis-master.default.svc.cluster.local | ||
export REDIS_PASSWORD=$(kubectl get secret --namespace default my-redis -o jsonpath="{.data.redis-password}" | base64 -d) | ||
kubectl port-forward --namespace default svc/my-redis-master 6379:6379 & | ||
REDISCLI_AUTH="$REDIS_PASSWORD" redis-cli -h my-redis-master | ||
# test | ||
# Install Charts (in ha mode) | ||
# test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters