File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
helm/wrongsecrets-ctf-party/templates/wrongsecrets-balancer Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name : Test minikube script (k8s)
4
+
5
+ # Controls when the workflow will run
6
+ on :
7
+ pull_request :
8
+ branches : [ master ]
9
+ workflow_dispatch :
10
+
11
+ permissions :
12
+ contents : read
13
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
14
+ jobs :
15
+ test-minikube :
16
+ name : Test with minikube
17
+ runs-on : ubuntu-latest
18
+ # Steps represent a sequence of tasks that will be executed as part of the job
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ - name : Start minikube
22
+ uses : medyagh/setup-minikube@master
23
+ with :
24
+ minikube-version : 1.27.0
25
+ driver : docker
26
+ kubernetes-version : v1.23.12
27
+ - name : test script
28
+ run : |
29
+ eval $(minikube docker-env)
30
+ ./build-an-deploy.sh
31
+ while [[ kubectl get pods -l app=wrongsecrets-balancer -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}' != "True" ]]; do echo "waiting for wrongsecrets balancer" && sleep 2; done
32
+ kubectl logs deployments/wrongsecrets-balancer -f >> pod.log &
33
+ echo "port forwarding"
34
+ kubectl port-forward service/wrongsecrets-balancer 3000:3000 &
35
+ echo "Awaiting the first forward to be ready"
36
+ sleep 10
37
+ curl http://localhost:3000
38
+ echo "logs from pod to make sure:"
39
+ cat pod.log
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ kind: Deployment
3
3
metadata :
4
4
name : wrongsecrets-balancer
5
5
labels :
6
+ app : wrongsecrets-balancer
6
7
{{- include "wrongsecrets-ctf-party.labels" . | nindent 4 }}
7
8
spec :
8
9
replicas : {{ .Values.balancer.replicas }}
15
16
checksum/config : {{ include (print $.Template.BasePath "/wrongsecrets-balancer/config-map.yaml") . | sha256sum }}
16
17
checksum/secret : {{ include (print $.Template.BasePath "/wrongsecrets-balancer/secret.yaml") . | sha256sum }}
17
18
labels :
19
+ app : wrongsecrets-balancer
18
20
{{- include "wrongsecrets-ctf-party.selectorLabels" . | nindent 8 }}
19
21
spec :
20
22
securityContext :
You can’t perform that action at this time.
0 commit comments