K8S¶
download_file(context, path_to_file_in_pod, path_to_where_save_file, component='')
¶
Download file from pod.
Source code in saritasa_invocations/k8s.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
download_file_and_remove_afterwards(context, path_to_file_in_pod, path_to_where_save_file)
¶
Download file from k8s and delete it after work is done.
Source code in saritasa_invocations/k8s.py
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
download_file_from_pod(context, pod_namespace, get_pod_name_command, path_to_file_in_pod, path_to_where_save_file, retries=-1)
¶
Download file from pod.
Source code in saritasa_invocations/k8s.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | |
execute(context, entry='', command='', env_params='', component='', pty=None, hide=None)
¶
Execute command inside k8s pod.
Source code in saritasa_invocations/k8s.py
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 | |
get_current_env_config_from_context(context)
¶
Return current environment data class based on current cluster.
Source code in saritasa_invocations/k8s.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
get_env_secrets(context)
¶
Get secrets from k8s and save it to file.
Source code in saritasa_invocations/k8s.py
307 308 309 310 311 312 313 314 315 316 317 318 | |
get_environment(context, env_name)
¶
Get environment by its name.
Source code in saritasa_invocations/k8s.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
get_pod_cmd(context, component)
¶
Get command for getting exact pod.
Source code in saritasa_invocations/k8s.py
115 116 117 118 119 120 121 122 123 124 | |
handle_error_on_getting_config(context, run_result)
¶
Handle error when fetching config.
Source code in saritasa_invocations/k8s.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
health_check(context, component='')
¶
Check health of component.
Source code in saritasa_invocations/k8s.py
237 238 239 240 241 242 243 244 | |
login(context, proxy=None, auth=None, cluster=None)
¶
Login into k8s via teleport.
Source code in saritasa_invocations/k8s.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
logs(context, component='')
¶
Get logs for k8s pod.
Source code in saritasa_invocations/k8s.py
176 177 178 179 180 181 182 183 184 185 186 187 | |
pods(context)
¶
Get pods from k8s.
Source code in saritasa_invocations/k8s.py
190 191 192 193 194 195 196 | |
python_shell(context, component='')
¶
Enter into python shell.
Source code in saritasa_invocations/k8s.py
227 228 229 230 231 232 233 234 | |
set_context(context, env='')
¶
Set k8s context to current project.
Source code in saritasa_invocations/k8s.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
success(context, message)
¶
Display success message with mention of environment.
Source code in saritasa_invocations/k8s.py
321 322 323 324 325 326 327 328 329 330 | |