mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-08 20:15:03 +10:00
Update terraform regarding cert-manager
This commit is contained in:
@@ -45,7 +45,7 @@ helm upgrade --install \
|
|||||||
cert-manager jetstack/cert-manager \
|
cert-manager jetstack/cert-manager \
|
||||||
--namespace cert-manager \
|
--namespace cert-manager \
|
||||||
--create-namespace \
|
--create-namespace \
|
||||||
--version v1.6.1 \
|
--version v1.17.2 \
|
||||||
--set prometheus.enabled=false \
|
--set prometheus.enabled=false \
|
||||||
--set installCRDs=true \
|
--set installCRDs=true \
|
||||||
--set webhook.timeoutSeconds=4
|
--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
|
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
|
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'"
|
ssh junv@192.168.1.2 -p22422 "sudo journalctl -u k3s --since '10 minutes ago'"
|
||||||
# View logs with timestamps:
|
# 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"
|
||||||
|
|||||||
@@ -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
@@ -9,7 +9,7 @@ resource "helm_release" "cert_manager" {
|
|||||||
name = "cert-manager"
|
name = "cert-manager"
|
||||||
repository = "https://charts.jetstack.io"
|
repository = "https://charts.jetstack.io"
|
||||||
chart = "cert-manager"
|
chart = "cert-manager"
|
||||||
version = "v1.14.3"
|
version = "v1.17.2"
|
||||||
namespace = "cert-manager"
|
namespace = "cert-manager"
|
||||||
create_namespace = true
|
create_namespace = true
|
||||||
|
|
||||||
@@ -17,6 +17,16 @@ resource "helm_release" "cert_manager" {
|
|||||||
name = "installCRDs"
|
name = "installCRDs"
|
||||||
value = "true"
|
value = "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set {
|
||||||
|
name = "prometheus.enabled"
|
||||||
|
value = "false"
|
||||||
|
}
|
||||||
|
|
||||||
|
set {
|
||||||
|
name = "webhook.timeoutSeconds"
|
||||||
|
value = "4"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install nginx-ingress
|
# Install nginx-ingress
|
||||||
@@ -72,27 +82,27 @@ resource "null_resource" "wait_for_cert_manager_crds" {
|
|||||||
command = <<-EOT
|
command = <<-EOT
|
||||||
# Wait for cert-manager to be ready
|
# Wait for cert-manager to be ready
|
||||||
echo "Waiting for cert-manager CRDs to be available..."
|
echo "Waiting for cert-manager CRDs to be available..."
|
||||||
|
|
||||||
# Wait for the webhook to be ready first
|
# Wait for the webhook to be ready first
|
||||||
echo "Waiting for cert-manager webhook pod to be ready..."
|
echo "Waiting for cert-manager webhook pod to be ready..."
|
||||||
kubectl -n cert-manager wait --for=condition=ready pod -l app=webhook --timeout=120s
|
kubectl -n cert-manager wait --for=condition=ready pod -l app=webhook --timeout=120s
|
||||||
|
|
||||||
# Try up to 10 times with increasing sleep between attempts
|
# Try up to 10 times with increasing sleep between attempts
|
||||||
for i in $(seq 1 10); do
|
for i in $(seq 1 10); do
|
||||||
echo "Attempt $i to verify cert-manager CRDs..."
|
echo "Attempt $i to verify cert-manager CRDs..."
|
||||||
|
|
||||||
# Check if the ClusterIssuer CRD exists
|
# Check if the ClusterIssuer CRD exists
|
||||||
if kubectl get crd clusterissuers.cert-manager.io > /dev/null 2>&1; then
|
if kubectl get crd clusterissuers.cert-manager.io > /dev/null 2>&1; then
|
||||||
echo "ClusterIssuer CRD found!"
|
echo "ClusterIssuer CRD found!"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase wait time with each attempt
|
# Increase wait time with each attempt
|
||||||
sleep_time=$((i * 5))
|
sleep_time=$((i * 5))
|
||||||
echo "CRDs not found yet, waiting $sleep_time seconds..."
|
echo "CRDs not found yet, waiting $sleep_time seconds..."
|
||||||
sleep $sleep_time
|
sleep $sleep_time
|
||||||
done
|
done
|
||||||
|
|
||||||
# If we get here, we've failed to find the CRDs
|
# If we get here, we've failed to find the CRDs
|
||||||
echo "Failed to find cert-manager CRDs after multiple attempts"
|
echo "Failed to find cert-manager CRDs after multiple attempts"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -161,10 +171,10 @@ resource "helm_release" "argocd" {
|
|||||||
helm_release.cert_manager,
|
helm_release.cert_manager,
|
||||||
helm_release.ingress_nginx
|
helm_release.ingress_nginx
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add timeout to ensure ArgoCD has enough time to install
|
# Add timeout to ensure ArgoCD has enough time to install
|
||||||
timeout = 900
|
timeout = 900
|
||||||
|
|
||||||
# Add retry logic in case of failure
|
# Add retry logic in case of failure
|
||||||
recreate_pods = true
|
recreate_pods = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user