Skip to content

Commit

Permalink
fix-ci10
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobrz committed Nov 18, 2024
1 parent 9f06f80 commit 1ffc2e4
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 10 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/hyperfoil.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: v1
kind: List
items:
- apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: controller
namespace: test-k8s-2
rules:
- apiGroups:
- ""
resources:
- pods
- pods/log
- pods/status
- pods/finalizer
verbs:
- "*"
- apiVersion: v1
kind: ServiceAccount
metadata:
name: controller
namespace: test-k8s-2
- apiVersion: v1
kind: Service
metadata:
labels:
app: hyperfoil
name: hyperfoil
namespace: test-k8s-2
spec:
ports:
- name: hyperfoil
port: 8090
protocol: TCP
targetPort: 8090
selector:
app: hyperfoil
role: controller
sessionAffinity: None
type: NodePort
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: controller
namespace: test-k8s-2
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: controller
subjects:
- kind: ServiceAccount
name: controller
namespace: test-k8s-2
- apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hyperfoil
name: controller
namespace: test-k8s-2
spec:
replicas: 1
selector:
matchLabels:
app: hyperfoil
template:
metadata:
labels:
app: hyperfoil
spec:
containers:
- command:
- /deployment/bin/controller.sh
- -Dio.hyperfoil.deploy.timeout=120000
- -Dio.hyperfoil.deployer=k8s
- -Dio.hyperfoil.controller.host=0.0.0.0
image: quay.io/hyperfoil/hyperfoil:latest
name: hyperfoil
serviceAccountName: controller

30 changes: 20 additions & 10 deletions .github/workflows/kubernetes-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,28 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes: [v1.31.0, v1.30.0]
kubernetes: [v1.31.0] #, v1.30.0]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Minikube
uses: manusa/actions-setup-minikube@v2.13.0
- name: Start minikube
uses: medyagh/setup-minikube@latest
with:
minikube version: 'v1.34.0'
kubernetes version: 'v1.31.1'
github token: ${{ secrets.GITHUB_TOKEN }}
# - name: Start minikube
# uses: medyagh/setup-minikube@latest
driver: docker
container-runtime: containerd
kubernetes-version: ${{ matrix.kubernetes }}
- name: Deploy to minikube
run:
kubectl apply -f hyperfoil.yaml
kubectl wait --for=condition=ready pod -l app=hyperfoil-controller
- name: Test service URLs
run: |
minikube service list
minikube service hyperfoil --url
echo "------------------opening the service------------------"
curl $(minikube service hyperfoil --url)
# cni: bridge
# addons: ingress
# - name: Setup Minikube
# uses: manusa/[email protected]
# with:
Expand Down Expand Up @@ -79,7 +89,7 @@ jobs:
# pre-fetch dependencies
mvn clean install -pl kubernetes-client,core,provisioners,testsuite,testsuite/deployments,testsuite/deployments/deployments-provider -am --batch-mode -Dmaven.repo.local=./local-repo -DskipTests
# run K8s integration tests
mvn test --batch-mode -fae -Dmaven.repo.local=./local-repo -pl testsuite/integration-tests -Pts.k8s \
mvn test -e --batch-mode -fae -Dmaven.repo.local=./local-repo -pl testsuite/integration-tests -Pts.k8s \
-Dintersmash.kubernetes.url=https://$(minikube ip):8443 \
-Dintersmash.kubernetes.route_domain=$(minikube ip) \
-Dintersmash.kubernetes.hostname=$(minikube ip) \
Expand All @@ -91,7 +101,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs-${{ matrix.java-distribution }}-${{ matrix.java-version }}
name: logs-${{ matrix.kuberetes }}
path: |
**/log/*
**/target/surefire-reports/*

0 comments on commit 1ffc2e4

Please sign in to comment.