k8s_process_manager
drunc.process_manager.k8s_process_manager
Classes
K8sProcessManager(configuration, **kwargs)
Bases: ProcessManager
Manages processes as Kubernetes Pods. This ProcessManager interfaces with the Kubernetes API to start, stop, and monitor applications running in Pods. It includes special handling for a local connectivity service, which involves: 1. Using a NodePort service for the orchestrator for external access.
Source code in drunc/process_manager/k8s_process_manager.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
Functions
__boot(boot_request, uuid)
Internal boot method. Handles pre-checks, pod creation, and blocking wait for critical services.
Source code in drunc/process_manager/k8s_process_manager.py
is_alive(podname, session)
Checks if a pod is currently in the 'Running' phase.
Source code in drunc/process_manager/k8s_process_manager.py
notify_termination(proc_uuid, exit_code, reason, session)
Callback for when a pod terminates.