diff --git a/.github/workflows/verify-k8s.yml b/.github/workflows/verify-k8s.yml index 9bacc1038..84e6a391f 100644 --- a/.github/workflows/verify-k8s.yml +++ b/.github/workflows/verify-k8s.yml @@ -140,6 +140,17 @@ jobs: sed -i -e 's,--ca=googleca,--ca=ephemeralca,g' ${{ github.workspace }}/config/deployment.yaml # Drop the ct-log flag's value to elide CT-log uploads. sed -i -E 's,"--ct-log-url=[^"]+","--ct-log-url=",g' ${{ github.workspace }}/config/deployment.yaml + # Switch to one replica to make it easier to test the scraping of + # metrics since we know all the requests then go to the same server. + sed -i -E 's,replicas: 3,replicas: 1,g' ${{ github.workspace }}/config/deployment.yaml + # Expose the prometheus port as a service so tests can grab it + # without hitting the k8s API + cat <> ${{ github.workspace }}/config/deployment.yaml + - name: prometheus + protocol: TCP + port: 2112 + targetPort: 2112 + EOF # From: https://banzaicloud.com/blog/kubernetes-oidc/ # To be able to fetch the public keys and validate the JWT tokens against @@ -225,6 +236,25 @@ jobs: kubectl wait --for=condition=Complete --timeout=90s job/check-oidc + - name: Validate prometheus metrics exported and look correct + run: | + cat <