Update cd-pr.yml
This commit is contained in:
@@ -68,51 +68,6 @@ jobs:
|
||||
working-directory: terraform-stg
|
||||
run: terraform validate
|
||||
|
||||
- name: Test TLS from subprocess
|
||||
run: |
|
||||
cat > /tmp/tlstest.sh << 'EOF'
|
||||
#!/bin/bash
|
||||
echo "Testing from subprocess PID: $$"
|
||||
echo "GODEBUG=$GODEBUG"
|
||||
openssl s_client -connect 191.252.159.227:6443 </dev/null 2>&1 | grep -E "CONNECTED|error|timeout|TLS"
|
||||
EOF
|
||||
chmod +x /tmp/tlstest.sh
|
||||
# Run in a subprocess the same way Terraform spawns providers
|
||||
bash /tmp/tlstest.sh &
|
||||
wait $!
|
||||
|
||||
- name: Check system resources
|
||||
run: |
|
||||
echo "--- Memory ---"
|
||||
free -h
|
||||
echo "--- Ulimits ---"
|
||||
ulimit -a
|
||||
echo "--- OOM kills ---"
|
||||
sudo dmesg | grep -i "killed process\|oom" | tail -20
|
||||
|
||||
- name: Test provider binary directly
|
||||
working-directory: terraform-stg
|
||||
run: |
|
||||
PROVIDER=".terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.38.0/linux_amd64/terraform-provider-kubernetes_v2.38.0_x5"
|
||||
echo "--- Provider binary info ---"
|
||||
ls -lh $PROVIDER
|
||||
file $PROVIDER
|
||||
echo "--- Run provider directly ---"
|
||||
timeout 5 $PROVIDER --help 2>&1 || true
|
||||
|
||||
- name: Test TLS with CA verification like Terraform does
|
||||
run: |
|
||||
kubectl config view --raw -o jsonpath='{.clusters[0].cluster.certificate-authority-data}' | base64 -d > /tmp/ca.crt
|
||||
kubectl config view --raw -o jsonpath='{.users[0].user.client-certificate-data}' | base64 -d > /tmp/client.crt
|
||||
kubectl config view --raw -o jsonpath='{.users[0].user.client-key-data}' | base64 -d > /tmp/client.key
|
||||
|
||||
echo "--- Test with CA verification (exactly like Terraform) ---"
|
||||
curl -v \
|
||||
--cacert /tmp/ca.crt \
|
||||
--cert /tmp/client.crt \
|
||||
--key /tmp/client.key \
|
||||
https://191.252.159.227:6443/api/v1/namespaces/tasknote-stg 2>&1 | grep -E "TLS|SSL|Connected|error|timeout|HTTP|issuer|subject"
|
||||
|
||||
- name: Terraform Plan
|
||||
id: check-changes
|
||||
working-directory: terraform-stg
|
||||
@@ -122,7 +77,6 @@ jobs:
|
||||
TF_LOG: DEBUG
|
||||
GODEBUG: http2client=1
|
||||
run: |
|
||||
echo "Start: $(date)"
|
||||
timeout 3m terraform plan -input=false -out=tfplan \
|
||||
-var="db_user=${{ secrets.DB_USER }}" \
|
||||
-var="db_password=${{ secrets.DB_PASSWORD }}" \
|
||||
@@ -132,7 +86,6 @@ jobs:
|
||||
-var="backend_image=${{ steps.deploy-vars.outputs.backend_image }}" \
|
||||
-var="frontend_image=${{ steps.deploy-vars.outputs.frontend_image }}" \
|
||||
-var="deploy_version=${{ github.run_id }}"
|
||||
echo "End: $(date)"
|
||||
terraform show -json tfplan > tfplan.json
|
||||
if jq -e '.resource_changes | length == 0' tfplan.json >/dev/null; then
|
||||
echo "no_changes=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
Reference in New Issue
Block a user