Update terraform regarding cert-manager

This commit is contained in:
2025-04-28 13:30:06 +10:00
parent ecfeb34bf0
commit edbcc14220
3 changed files with 51 additions and 11 deletions
+3 -3
View File
@@ -45,7 +45,7 @@ helm upgrade --install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.6.1 \
--version v1.17.2 \
--set prometheus.enabled=false \
--set installCRDs=true \
--set webhook.timeoutSeconds=4
@@ -312,7 +312,7 @@ helm upgrade --install redis -n db -f db/redis-values.yaml bitnami/redis
sudo apt install kubeadm=1.30.11-1.1
# passless sudo
# passless sudo
echo "junv ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/junv
@@ -325,4 +325,4 @@ ssh junv@192.168.1.2 -p22422 "sudo journalctl -u k3s -n 100"
ssh junv@192.168.1.2 -p22422 "sudo journalctl -u k3s --since '10 minutes ago'"
# View logs with timestamps:
ssh junv@192.168.1.2 -p22422 "sudo journalctl -u k3s -f -o short-precise"
ssh junv@192.168.1.2 -p22422 "sudo journalctl -u k3s -f -o short-precise"
+30
View File
@@ -0,0 +1,30 @@
{
"mcpProxy": {
"baseURL": "0.0.0.0",
"addr": ":9090",
"name": "MCP Proxy",
"version": "1.0.0",
"options": {
"panicIfInvalid": false,
"logEnabled": true,
"authTokens": [
"DefaultTokens"
]
}
},
"mcpServers": {
"fetch": {
"command": "uvx",
"args": [
"mcp-server-fetch"
],
"options": {
"panicIfInvalid": true,
"logEnabled": false,
"authTokens": [
"HelloMCP!!"
]
}
}
}
}
+18 -8
View File
@@ -9,7 +9,7 @@ resource "helm_release" "cert_manager" {
name = "cert-manager"
repository = "https://charts.jetstack.io"
chart = "cert-manager"
version = "v1.14.3"
version = "v1.17.2"
namespace = "cert-manager"
create_namespace = true
@@ -17,6 +17,16 @@ resource "helm_release" "cert_manager" {
name = "installCRDs"
value = "true"
}
set {
name = "prometheus.enabled"
value = "false"
}
set {
name = "webhook.timeoutSeconds"
value = "4"
}
}
# Install nginx-ingress
@@ -72,27 +82,27 @@ resource "null_resource" "wait_for_cert_manager_crds" {
command = <<-EOT
# Wait for cert-manager to be ready
echo "Waiting for cert-manager CRDs to be available..."
# Wait for the webhook to be ready first
echo "Waiting for cert-manager webhook pod to be ready..."
kubectl -n cert-manager wait --for=condition=ready pod -l app=webhook --timeout=120s
# Try up to 10 times with increasing sleep between attempts
for i in $(seq 1 10); do
echo "Attempt $i to verify cert-manager CRDs..."
# Check if the ClusterIssuer CRD exists
if kubectl get crd clusterissuers.cert-manager.io > /dev/null 2>&1; then
echo "ClusterIssuer CRD found!"
exit 0
fi
# Increase wait time with each attempt
sleep_time=$((i * 5))
echo "CRDs not found yet, waiting $sleep_time seconds..."
sleep $sleep_time
done
# If we get here, we've failed to find the CRDs
echo "Failed to find cert-manager CRDs after multiple attempts"
exit 1
@@ -161,10 +171,10 @@ resource "helm_release" "argocd" {
helm_release.cert_manager,
helm_release.ingress_nginx
]
# Add timeout to ensure ArgoCD has enough time to install
timeout = 900
# Add retry logic in case of failure
recreate_pods = true
}