k8s #1
@@ -48,15 +48,15 @@ kind_clusters:
|
||||
# Документация: https://devops.org.ru
|
||||
# Ingress HTTP: http://localhost:8081
|
||||
# Ingress HTTPS: https://localhost:8443
|
||||
# Prometheus: http://localhost:9090
|
||||
# Grafana: http://localhost:3000 (admin/admin)
|
||||
# Kiali: http://localhost:20001
|
||||
# Prometheus: http://localhost:30900
|
||||
# Grafana: http://localhost:30000 (admin/admin)
|
||||
# Kiali: http://localhost:32001
|
||||
addon_ports:
|
||||
ingress_http: 8081
|
||||
ingress_https: 8443
|
||||
prometheus: 9090
|
||||
grafana: 3000
|
||||
kiali: 20001
|
||||
prometheus: 30900
|
||||
grafana: 30000
|
||||
kiali: 32001
|
||||
|
||||
hosts:
|
||||
# Стандартный набор - 2 хоста для базового тестирования (стабильные ОС)
|
||||
|
||||
@@ -142,26 +142,26 @@ def main():
|
||||
'protocol': 'TCP'
|
||||
})
|
||||
|
||||
# Prometheus порт
|
||||
# Prometheus порт - мапим NodePort на hostPort
|
||||
if addon_ports.get('prometheus'):
|
||||
port_mappings.append({
|
||||
'containerPort': 9090,
|
||||
'containerPort': addon_ports['prometheus'],
|
||||
'hostPort': addon_ports['prometheus'],
|
||||
'protocol': 'TCP'
|
||||
})
|
||||
|
||||
# Grafana порт
|
||||
# Grafana порт - мапим NodePort на hostPort
|
||||
if addon_ports.get('grafana'):
|
||||
port_mappings.append({
|
||||
'containerPort': 3000,
|
||||
'containerPort': addon_ports['grafana'],
|
||||
'hostPort': addon_ports['grafana'],
|
||||
'protocol': 'TCP'
|
||||
})
|
||||
|
||||
# Kiali порт
|
||||
# Kiali порт - мапим NodePort на hostPort
|
||||
if addon_ports.get('kiali'):
|
||||
port_mappings.append({
|
||||
'containerPort': 20001,
|
||||
'containerPort': addon_ports['kiali'],
|
||||
'hostPort': addon_ports['kiali'],
|
||||
'protocol': 'TCP'
|
||||
})
|
||||
@@ -241,13 +241,17 @@ def main():
|
||||
if addons.get('kiali'):
|
||||
print(" - Installing Kiali")
|
||||
subprocess.run(f"kubectl --server=https://{name}-control-plane:6443 --insecure-skip-tls-verify create ns istio-system", shell=True, capture_output=True)
|
||||
# Добавляем Helm репозиторий Kiali
|
||||
run_cmd(f"helm repo add kiali https://kiali.org/helm-charts")
|
||||
run_cmd(f"helm repo update")
|
||||
# Используем исправленный kubeconfig
|
||||
run_cmd(f"KUBECONFIG=/tmp/istio-kubeconfig-{name}.yaml helm upgrade --install kiali-server kiali/kiali-server --namespace istio-system --set auth.strategy=anonymous --wait --timeout 180s")
|
||||
|
||||
if addons.get('prometheus_stack'):
|
||||
print(" - Installing Prometheus Stack")
|
||||
run_cmd(f"helm repo add prometheus-community https://prometheus-community.github.io/helm-charts")
|
||||
run_cmd(f"helm repo update")
|
||||
# Добавляем Helm репозиторий Prometheus
|
||||
subprocess.run(f"helm repo add prometheus-community https://prometheus-community.github.io/helm-charts", shell=True, capture_output=True)
|
||||
subprocess.run(f"helm repo update", shell=True, capture_output=True)
|
||||
subprocess.run(f"kubectl --server=https://{name}-control-plane:6443 --insecure-skip-tls-verify create ns monitoring", shell=True, capture_output=True)
|
||||
# Используем исправленный kubeconfig
|
||||
run_cmd(f"KUBECONFIG=/tmp/istio-kubeconfig-{name}.yaml helm upgrade --install monitoring prometheus-community/kube-prometheus-stack --namespace monitoring --set grafana.adminPassword=admin --set grafana.defaultDashboardsTimezone=browser --wait --timeout 600s")
|
||||
|
||||
Reference in New Issue
Block a user