raijin-server 0.2.18__py3-none-any.whl → 0.2.20__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of raijin-server might be problematic. Click here for more details.
- raijin_server/__init__.py +1 -1
- raijin_server/modules/cert_manager.py +8 -8
- raijin_server/modules/metallb.py +16 -4
- raijin_server/modules/traefik.py +1 -1
- {raijin_server-0.2.18.dist-info → raijin_server-0.2.20.dist-info}/METADATA +1 -1
- {raijin_server-0.2.18.dist-info → raijin_server-0.2.20.dist-info}/RECORD +10 -10
- {raijin_server-0.2.18.dist-info → raijin_server-0.2.20.dist-info}/WHEEL +0 -0
- {raijin_server-0.2.18.dist-info → raijin_server-0.2.20.dist-info}/entry_points.txt +0 -0
- {raijin_server-0.2.18.dist-info → raijin_server-0.2.20.dist-info}/licenses/LICENSE +0 -0
- {raijin_server-0.2.18.dist-info → raijin_server-0.2.20.dist-info}/top_level.txt +0 -0
raijin_server/__init__.py
CHANGED
|
@@ -1053,16 +1053,16 @@ def _get_cert_manager_status(ctx: ExecutionContext) -> dict:
|
|
|
1053
1053
|
result = subprocess.run(
|
|
1054
1054
|
[
|
|
1055
1055
|
"kubectl", "get", "pods", "-n", NAMESPACE,
|
|
1056
|
-
"-o", "jsonpath={range .items[*]}{.metadata.name}
|
|
1056
|
+
"-o", "jsonpath={range .items[*]}{.metadata.name}={.status.phase} {end}"
|
|
1057
1057
|
],
|
|
1058
1058
|
capture_output=True,
|
|
1059
1059
|
text=True,
|
|
1060
1060
|
timeout=10,
|
|
1061
1061
|
)
|
|
1062
1062
|
if result.returncode == 0:
|
|
1063
|
-
for
|
|
1064
|
-
if "
|
|
1065
|
-
name, phase =
|
|
1063
|
+
for item in result.stdout.strip().split():
|
|
1064
|
+
if "=" in item:
|
|
1065
|
+
name, phase = item.rsplit("=", 1)
|
|
1066
1066
|
status["pods"].append({"name": name, "phase": phase})
|
|
1067
1067
|
|
|
1068
1068
|
status["webhook_ready"] = _test_webhook_connectivity()
|
|
@@ -1082,16 +1082,16 @@ def _get_cert_manager_status(ctx: ExecutionContext) -> dict:
|
|
|
1082
1082
|
result = subprocess.run(
|
|
1083
1083
|
[
|
|
1084
1084
|
"kubectl", "get", "certificates", "-A",
|
|
1085
|
-
"-o", "jsonpath={range .items[*]}{.metadata.namespace}/{.metadata.name}
|
|
1085
|
+
"-o", "jsonpath={range .items[*]}{.metadata.namespace}/{.metadata.name}={.status.conditions[0].status} {end}"
|
|
1086
1086
|
],
|
|
1087
1087
|
capture_output=True,
|
|
1088
1088
|
text=True,
|
|
1089
1089
|
timeout=10,
|
|
1090
1090
|
)
|
|
1091
1091
|
if result.returncode == 0 and result.stdout.strip():
|
|
1092
|
-
for
|
|
1093
|
-
if "
|
|
1094
|
-
name, ready =
|
|
1092
|
+
for item in result.stdout.strip().split():
|
|
1093
|
+
if "=" in item:
|
|
1094
|
+
name, ready = item.rsplit("=", 1)
|
|
1095
1095
|
status["certificates"].append({"name": name, "ready": ready})
|
|
1096
1096
|
|
|
1097
1097
|
except Exception as e:
|
raijin_server/modules/metallb.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Provisiona MetalLB (L2) com pool de IPs para LoadBalancer em ambientes bare metal."""
|
|
2
2
|
|
|
3
|
+
import base64
|
|
3
4
|
import socket
|
|
4
5
|
import time
|
|
5
6
|
|
|
@@ -82,11 +83,11 @@ def _wait_for_pods_running(ctx: ExecutionContext, timeout: int = 180) -> bool:
|
|
|
82
83
|
deadline = time.time() + timeout
|
|
83
84
|
|
|
84
85
|
while time.time() < deadline:
|
|
85
|
-
#
|
|
86
|
+
# Usa separador simples para evitar problemas com \n literal
|
|
86
87
|
result = run_cmd(
|
|
87
88
|
[
|
|
88
89
|
"kubectl", "-n", "metallb-system", "get", "pods",
|
|
89
|
-
"-o", "jsonpath={range .items[*]}{.metadata.name}
|
|
90
|
+
"-o", "jsonpath={range .items[*]}{.metadata.name}={.status.phase} {end}",
|
|
90
91
|
],
|
|
91
92
|
ctx,
|
|
92
93
|
check=False,
|
|
@@ -101,7 +102,16 @@ def _wait_for_pods_running(ctx: ExecutionContext, timeout: int = 180) -> bool:
|
|
|
101
102
|
time.sleep(5)
|
|
102
103
|
continue
|
|
103
104
|
|
|
104
|
-
pods = [
|
|
105
|
+
pods = []
|
|
106
|
+
for item in output.split():
|
|
107
|
+
if "=" in item:
|
|
108
|
+
parts = item.rsplit("=", 1)
|
|
109
|
+
if len(parts) == 2:
|
|
110
|
+
pods.append((parts[0], parts[1]))
|
|
111
|
+
|
|
112
|
+
if not pods:
|
|
113
|
+
time.sleep(5)
|
|
114
|
+
continue
|
|
105
115
|
|
|
106
116
|
all_running = all(phase == "Running" for _, phase in pods)
|
|
107
117
|
if all_running and pods:
|
|
@@ -149,9 +159,11 @@ def _apply_pool_with_retry(manifest: str, ctx: ExecutionContext, max_attempts: i
|
|
|
149
159
|
"""Aplica IPAddressPool/L2Advertisement com retry."""
|
|
150
160
|
typer.echo("Aplicando IPAddressPool e L2Advertisement...")
|
|
151
161
|
|
|
162
|
+
encoded = base64.b64encode(manifest.encode()).decode()
|
|
163
|
+
|
|
152
164
|
for attempt in range(1, max_attempts + 1):
|
|
153
165
|
result = run_cmd(
|
|
154
|
-
f"echo '{
|
|
166
|
+
f"echo '{encoded}' | base64 -d | kubectl apply -f -",
|
|
155
167
|
ctx,
|
|
156
168
|
use_shell=True,
|
|
157
169
|
check=False,
|
raijin_server/modules/traefik.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Configuracao do Traefik via Helm com TLS/ACME e ingressClass."""
|
|
2
2
|
|
|
3
3
|
import socket
|
|
4
|
+
import time
|
|
4
5
|
|
|
5
6
|
import typer
|
|
6
7
|
|
|
@@ -19,7 +20,6 @@ def _check_existing_traefik(ctx: ExecutionContext) -> bool:
|
|
|
19
20
|
|
|
20
21
|
def _uninstall_traefik(ctx: ExecutionContext) -> None:
|
|
21
22
|
"""Remove instalacao anterior do Traefik."""
|
|
22
|
-
import time
|
|
23
23
|
typer.echo("Removendo instalacao anterior do Traefik...")
|
|
24
24
|
|
|
25
25
|
run_cmd(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
raijin_server/__init__.py,sha256=
|
|
1
|
+
raijin_server/__init__.py,sha256=A0n6kSFF_tj57XMxiXzLUp2L6ard8KJmLgxz0qaJDQ0,95
|
|
2
2
|
raijin_server/cli.py,sha256=71nn7QN0f3MJkXcHr0STXmxljr-CaPibzOoiItbOT88,28571
|
|
3
3
|
raijin_server/config.py,sha256=QNiEVvrbW56XgvNn5-h3bkJm46Xc8mjNqPbvixXD8N0,4829
|
|
4
4
|
raijin_server/healthchecks.py,sha256=lzXdFw6S0hOYbUKbqksh4phb04lXgXdTspP1Dsz4dx8,15401
|
|
@@ -8,7 +8,7 @@ raijin_server/modules/__init__.py,sha256=e_IbkhLGPcF8to9QUmIESP6fpcTOYcIhaXLKIvq
|
|
|
8
8
|
raijin_server/modules/apokolips_demo.py,sha256=8ltsXRbVDwlDwLMIvh02NG-FeAfBWw_v6lh7IGOyNqs,13725
|
|
9
9
|
raijin_server/modules/bootstrap.py,sha256=oVIGNRW_JbgY8zXNHGAIP0vGbbHNHyQexthxo5zhbcw,9762
|
|
10
10
|
raijin_server/modules/calico.py,sha256=TTPF1bLFdAKb3IVOqFqRxNblULkRmMMRylsIBp4w8I8,6700
|
|
11
|
-
raijin_server/modules/cert_manager.py,sha256=
|
|
11
|
+
raijin_server/modules/cert_manager.py,sha256=5i4pV90PwZU6Vu3-FuPpZq_H8j3uU0OvKZ-Ev_uw-g4,46951
|
|
12
12
|
raijin_server/modules/essentials.py,sha256=2xUXCyCQtFGd2DnCKV81N1R6bEJqH8zaet8mLovtQ1I,689
|
|
13
13
|
raijin_server/modules/firewall.py,sha256=h6AISqiZeTinVT7BjmQIS872qRAFZJLg7meqlth3cfw,757
|
|
14
14
|
raijin_server/modules/full_install.py,sha256=xiKe2GLuZ97c4YdTmhP-kwDVuJJ9Xq3dlgcLlqSPeYM,15518
|
|
@@ -20,7 +20,7 @@ raijin_server/modules/kafka.py,sha256=bp8k_IhuAIO6dL0IpK1UxxLZoGih6nJp0ZnzwmiZEj
|
|
|
20
20
|
raijin_server/modules/kong.py,sha256=2EZKYBmBhm_7Nduw9PWrvrekp0VCxQbc2gElpAJqKfg,491
|
|
21
21
|
raijin_server/modules/kubernetes.py,sha256=waSf2cCVnLicN5o3M47MzMzmHHtvKeFXm1__8ynQzA0,11871
|
|
22
22
|
raijin_server/modules/loki.py,sha256=erwFfSiSFOv-Ul3nFdrI2RElPYuqqBPBBa_MJAwyLys,676
|
|
23
|
-
raijin_server/modules/metallb.py,sha256=
|
|
23
|
+
raijin_server/modules/metallb.py,sha256=uUuklc_RsQ-W2qDVRMQAxQm9HKGEqso444b1IwBpM6w,8554
|
|
24
24
|
raijin_server/modules/minio.py,sha256=BVvsEaJlJUV92_ep7pKsBhSYPjWZrDOB3J6XAWYAHYg,486
|
|
25
25
|
raijin_server/modules/network.py,sha256=QRlYdcryCCPAWG3QQ_W7ld9gJgETI7H8gwntOU7UqFE,4818
|
|
26
26
|
raijin_server/modules/observability_dashboards.py,sha256=fVz0WEOQrUTF5rJ__Nu_onyBuwL_exFmysWMmg8AE9w,7319
|
|
@@ -29,7 +29,7 @@ raijin_server/modules/prometheus.py,sha256=Rs9BREmaoKlyteNdAQZnSIeJfsRO0RQKyyL2g
|
|
|
29
29
|
raijin_server/modules/sanitize.py,sha256=_RnWn1DUuNrzx3NnKEbMvf5iicgjiN_ubwT59e0rYWY,6040
|
|
30
30
|
raijin_server/modules/secrets.py,sha256=xpV3gIMnwQdAI2j69Ck5daIK4wlYJA_1rkWTtSfVNk0,3715
|
|
31
31
|
raijin_server/modules/ssh_hardening.py,sha256=oQdk-EVnEHNMKIWvoFuZzI4jK0nNO8IAY4hkB4pj8zw,4025
|
|
32
|
-
raijin_server/modules/traefik.py,sha256=
|
|
32
|
+
raijin_server/modules/traefik.py,sha256=crEYIqAidAhh_H93qIvCbTtJ7BjO-3ef77alLc_--Gg,3535
|
|
33
33
|
raijin_server/modules/velero.py,sha256=_CV0QQnWr5L-CWXDOiD9Ef4J7GaQT-s9yNBwqp_FLOY,1395
|
|
34
34
|
raijin_server/modules/vpn.py,sha256=hF-0vA17VKTxhQLDBSEeqI5aPQpiaaj4IpUf9l6lr64,8297
|
|
35
35
|
raijin_server/scripts/__init__.py,sha256=deduGfHf8BMVWred4ux5LfBDT2NJ5XYeJAt2sDEU4qs,53
|
|
@@ -37,9 +37,9 @@ raijin_server/scripts/checklist.sh,sha256=j6E0Kmk1EfjLvKK1VpCqzXJAXI_7Bm67LK4ndy
|
|
|
37
37
|
raijin_server/scripts/install.sh,sha256=Y1ickbQ4siQ0NIPs6UgrqUr8WWy7U0LHmaTQbEgavoI,3949
|
|
38
38
|
raijin_server/scripts/log_size_metric.sh,sha256=Iv4SsX8AuCYRou-klYn32mX41xB6j0xJGLBO6riw4rU,1208
|
|
39
39
|
raijin_server/scripts/pre-deploy-check.sh,sha256=XqMo7IMIpwUHF17YEmU0-cVmTDMoCGMBFnmS39FidI4,4912
|
|
40
|
-
raijin_server-0.2.
|
|
41
|
-
raijin_server-0.2.
|
|
42
|
-
raijin_server-0.2.
|
|
43
|
-
raijin_server-0.2.
|
|
44
|
-
raijin_server-0.2.
|
|
45
|
-
raijin_server-0.2.
|
|
40
|
+
raijin_server-0.2.20.dist-info/licenses/LICENSE,sha256=kJsMCjOiRZE0AQNtxWqBa32z9kMAaF4EUxyHj3hKaJo,1105
|
|
41
|
+
raijin_server-0.2.20.dist-info/METADATA,sha256=LRwpJzpWWfeBC71oXY-CsFKbyW6pqaugqpsjwSfoVVU,22476
|
|
42
|
+
raijin_server-0.2.20.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
43
|
+
raijin_server-0.2.20.dist-info/entry_points.txt,sha256=3ZvxDX4pvcjkIRsXAJ69wIfVmKa78LKo-C3QhqN2KVM,56
|
|
44
|
+
raijin_server-0.2.20.dist-info/top_level.txt,sha256=Yz1xneCRtsZOzbPIcTAcrSxd-1p80pohMXYAZ74dpok,14
|
|
45
|
+
raijin_server-0.2.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|