Imporve monitoring
This commit is contained in:
44
Tiltfile
44
Tiltfile
@@ -63,6 +63,35 @@ Monitoring:
|
||||
Applying security configurations...
|
||||
""")
|
||||
|
||||
# Create Docker Hub secret for image pulls (if credentials are available)
|
||||
local_resource(
|
||||
'dockerhub-secret',
|
||||
cmd='''
|
||||
echo "🐳 Setting up Docker Hub image pull secret..."
|
||||
|
||||
# Check if Docker Hub credentials are available
|
||||
if [ -n "$DOCKERHUB_USERNAME" ] && [ -n "$DOCKERHUB_PASSWORD" ]; then
|
||||
echo " Found DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD environment variables"
|
||||
./infrastructure/kubernetes/create-dockerhub-secret.sh
|
||||
elif [ -f "$HOME/.docker/config.json" ]; then
|
||||
echo " Attempting to use Docker CLI credentials..."
|
||||
./infrastructure/kubernetes/create-dockerhub-secret.sh
|
||||
else
|
||||
echo " ⚠️ Docker Hub credentials not found"
|
||||
echo " To enable automatic Docker Hub authentication:"
|
||||
echo " 1. Run 'docker login', OR"
|
||||
echo " 2. Set environment variables:"
|
||||
echo " export DOCKERHUB_USERNAME='your-username'"
|
||||
echo " export DOCKERHUB_PASSWORD='your-password-or-token'"
|
||||
echo ""
|
||||
echo " Continuing without Docker Hub authentication..."
|
||||
echo " (This is OK for local development using local registry)"
|
||||
fi
|
||||
''',
|
||||
labels=['00-security'],
|
||||
auto_init=True
|
||||
)
|
||||
|
||||
# Apply security configurations before loading main manifests
|
||||
local_resource(
|
||||
'security-setup',
|
||||
@@ -75,6 +104,7 @@ local_resource(
|
||||
kubectl apply -f infrastructure/kubernetes/base/configmaps/postgres-logging-config.yaml
|
||||
echo "✅ Security configurations applied"
|
||||
''',
|
||||
resource_deps=['dockerhub-secret'],
|
||||
labels=['00-security'],
|
||||
auto_init=True
|
||||
)
|
||||
@@ -338,10 +368,20 @@ local_resource(
|
||||
echo "📊 Deploying SigNoz Monitoring Stack..."
|
||||
echo ""
|
||||
|
||||
# Ensure Docker Hub secret exists in bakery-ia namespace
|
||||
echo "🔐 Ensuring Docker Hub secret exists in bakery-ia namespace..."
|
||||
if ! kubectl get secret dockerhub-creds -n bakery-ia &>/dev/null; then
|
||||
echo " ⚠️ Docker Hub secret not found, attempting to create..."
|
||||
./infrastructure/kubernetes/create-dockerhub-secret.sh || echo " Continuing without Docker Hub authentication..."
|
||||
else
|
||||
echo " ✅ Docker Hub secret exists"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Check if SigNoz is already deployed
|
||||
if helm list -n signoz | grep -q signoz; then
|
||||
if helm list -n bakery-ia | grep -q signoz; then
|
||||
echo "✅ SigNoz already deployed, checking status..."
|
||||
helm status signoz -n signoz
|
||||
helm status signoz -n bakery-ia
|
||||
else
|
||||
echo "🚀 Installing SigNoz..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user