jaseci 1.4.2.5__py3-none-any.whl → 2.0.0__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 jaseci might be problematic. Click here for more details.

Files changed (186) hide show
  1. jaseci/__init__.py +3 -37
  2. jaseci-2.0.0.dist-info/METADATA +65 -0
  3. jaseci-2.0.0.dist-info/RECORD +4 -0
  4. {jaseci-1.4.2.5.dist-info → jaseci-2.0.0.dist-info}/WHEEL +1 -2
  5. jaseci/VERSION +0 -1
  6. jaseci/cli_tools/__init__.py +0 -0
  7. jaseci/cli_tools/book_tools.py +0 -457
  8. jaseci/cli_tools/jsctl.py +0 -500
  9. jaseci/cli_tools/tests/__init__.py +0 -0
  10. jaseci/cli_tools/tests/test_jsctl.py +0 -556
  11. jaseci/extens/__init__.py +0 -0
  12. jaseci/extens/act_lib/__init__.py +0 -0
  13. jaseci/extens/act_lib/date.py +0 -117
  14. jaseci/extens/act_lib/elastic.py +0 -87
  15. jaseci/extens/act_lib/file.py +0 -76
  16. jaseci/extens/act_lib/file_handler.py +0 -189
  17. jaseci/extens/act_lib/internal.py +0 -18
  18. jaseci/extens/act_lib/jaseci.py +0 -61
  19. jaseci/extens/act_lib/mail.py +0 -10
  20. jaseci/extens/act_lib/maths.py +0 -168
  21. jaseci/extens/act_lib/net.py +0 -191
  22. jaseci/extens/act_lib/rand.py +0 -82
  23. jaseci/extens/act_lib/regex.py +0 -85
  24. jaseci/extens/act_lib/request.py +0 -169
  25. jaseci/extens/act_lib/std.py +0 -235
  26. jaseci/extens/act_lib/storage.py +0 -53
  27. jaseci/extens/act_lib/stripe.py +0 -337
  28. jaseci/extens/act_lib/task.py +0 -13
  29. jaseci/extens/act_lib/tests/__init__.py +0 -0
  30. jaseci/extens/act_lib/tests/std_test_code.py +0 -37
  31. jaseci/extens/act_lib/tests/test_date.py +0 -26
  32. jaseci/extens/act_lib/tests/test_elastic.py +0 -159
  33. jaseci/extens/act_lib/tests/test_file.py +0 -116
  34. jaseci/extens/act_lib/tests/test_file_lib.py +0 -40
  35. jaseci/extens/act_lib/tests/test_mail_lib.py +0 -33
  36. jaseci/extens/act_lib/tests/test_maths.py +0 -147
  37. jaseci/extens/act_lib/tests/test_net_lib.py +0 -62
  38. jaseci/extens/act_lib/tests/test_regex.py +0 -61
  39. jaseci/extens/act_lib/tests/test_std.py +0 -51
  40. jaseci/extens/act_lib/tests/test_std_lib.py +0 -36
  41. jaseci/extens/act_lib/tests/test_url.py +0 -32
  42. jaseci/extens/act_lib/tests/test_vector.py +0 -36
  43. jaseci/extens/act_lib/tests/test_webtool.py +0 -44
  44. jaseci/extens/act_lib/tests/test_zlib.py +0 -24
  45. jaseci/extens/act_lib/url.py +0 -79
  46. jaseci/extens/act_lib/vector.py +0 -157
  47. jaseci/extens/act_lib/webtool.py +0 -28
  48. jaseci/extens/act_lib/zip.py +0 -33
  49. jaseci/extens/api/__init__.py +0 -0
  50. jaseci/extens/api/actions_api.py +0 -170
  51. jaseci/extens/api/alias_api.py +0 -139
  52. jaseci/extens/api/architype_api.py +0 -196
  53. jaseci/extens/api/config_api.py +0 -129
  54. jaseci/extens/api/global_api.py +0 -84
  55. jaseci/extens/api/graph_api.py +0 -167
  56. jaseci/extens/api/health_api.py +0 -20
  57. jaseci/extens/api/interface.py +0 -268
  58. jaseci/extens/api/jac_api.py +0 -171
  59. jaseci/extens/api/jsorc_api.py +0 -316
  60. jaseci/extens/api/logger_api.py +0 -89
  61. jaseci/extens/api/master_api.py +0 -133
  62. jaseci/extens/api/object_api.py +0 -101
  63. jaseci/extens/api/prometheus_api.py +0 -74
  64. jaseci/extens/api/queue_api.py +0 -140
  65. jaseci/extens/api/sentinel_api.py +0 -270
  66. jaseci/extens/api/super_api.py +0 -64
  67. jaseci/extens/api/tests/__init__.py +0 -0
  68. jaseci/extens/api/tests/test_architype_api.py +0 -66
  69. jaseci/extens/api/tests/test_global_api.py +0 -179
  70. jaseci/extens/api/tests/test_graph_api.py +0 -64
  71. jaseci/extens/api/tests/test_logger_api.py +0 -43
  72. jaseci/extens/api/tests/test_object_api.py +0 -20
  73. jaseci/extens/api/tests/test_sentinel_api.py +0 -66
  74. jaseci/extens/api/tests/test_uncommon.py +0 -107
  75. jaseci/extens/api/tests/test_user_api.py +0 -32
  76. jaseci/extens/api/tests/test_walker_api.py +0 -316
  77. jaseci/extens/api/user_api.py +0 -144
  78. jaseci/extens/api/walker_api.py +0 -298
  79. jaseci/extens/api/webhook_api.py +0 -74
  80. jaseci/extens/svc/__init__.py +0 -0
  81. jaseci/extens/svc/elastic_svc.py +0 -366
  82. jaseci/extens/svc/kube_svc.py +0 -432
  83. jaseci/extens/svc/mail_svc.py +0 -156
  84. jaseci/extens/svc/prome_svc.py +0 -378
  85. jaseci/extens/svc/redis_svc.py +0 -63
  86. jaseci/extens/svc/storage_svc.py +0 -193
  87. jaseci/extens/svc/stripe_svc.py +0 -51
  88. jaseci/extens/svc/task_svc.py +0 -155
  89. jaseci/extens/svc/tasks.py +0 -302
  90. jaseci/jac/__init__.py +0 -0
  91. jaseci/jac/interpreter/__init__.py +0 -0
  92. jaseci/jac/interpreter/architype_interp.py +0 -214
  93. jaseci/jac/interpreter/interp.py +0 -1783
  94. jaseci/jac/interpreter/sentinel_interp.py +0 -257
  95. jaseci/jac/interpreter/tests/__init__.py +0 -0
  96. jaseci/jac/interpreter/tests/test_interp.py +0 -42
  97. jaseci/jac/interpreter/walker_interp.py +0 -248
  98. jaseci/jac/ir/__init__.py +0 -0
  99. jaseci/jac/ir/ast.py +0 -73
  100. jaseci/jac/ir/ast_builder.py +0 -249
  101. jaseci/jac/ir/jac_code.py +0 -152
  102. jaseci/jac/ir/passes/__init__.py +0 -6
  103. jaseci/jac/ir/passes/ast_prune_pass.py +0 -9
  104. jaseci/jac/ir/passes/codegen_pass.py +0 -244
  105. jaseci/jac/ir/passes/ir_pass.py +0 -29
  106. jaseci/jac/ir/passes/printer_pass.py +0 -23
  107. jaseci/jac/ir/passes/pt_prune_pass.py +0 -29
  108. jaseci/jac/ir/passes/schedule.py +0 -23
  109. jaseci/jac/ir/passes/stats_pass.py +0 -16
  110. jaseci/jac/jac.g4 +0 -450
  111. jaseci/jac/jac_parse/__init__.py +0 -0
  112. jaseci/jac/jac_parse/jacLexer.py +0 -809
  113. jaseci/jac/jac_parse/jacListener.py +0 -853
  114. jaseci/jac/jac_parse/jacParser.py +0 -9192
  115. jaseci/jac/jac_set.py +0 -119
  116. jaseci/jac/jsci_vm/__init__.py +0 -0
  117. jaseci/jac/jsci_vm/disasm.py +0 -94
  118. jaseci/jac/jsci_vm/inst_ptr.py +0 -31
  119. jaseci/jac/jsci_vm/machine.py +0 -188
  120. jaseci/jac/jsci_vm/op_codes.py +0 -82
  121. jaseci/jac/jsci_vm/tests/__init__.py +0 -0
  122. jaseci/jac/jsci_vm/tests/test_codegen.py +0 -31
  123. jaseci/jac/machine/__init__.py +0 -0
  124. jaseci/jac/machine/jac_scope.py +0 -85
  125. jaseci/jac/machine/jac_value.py +0 -226
  126. jaseci/jac/machine/machine_state.py +0 -383
  127. jaseci/jac/tests/__init__.py +0 -0
  128. jaseci/jac/tests/book_code.py +0 -624
  129. jaseci/jac/tests/test_book.py +0 -380
  130. jaseci/jac/tests/test_lang_14.py +0 -49
  131. jaseci/jsorc/__init__.py +0 -7
  132. jaseci/jsorc/jsorc.py +0 -642
  133. jaseci/jsorc/jsorc_settings.py +0 -211
  134. jaseci/jsorc/jsorc_utils.py +0 -298
  135. jaseci/jsorc/live_actions.py +0 -364
  136. jaseci/jsorc/manifests/__init__.py +0 -0
  137. jaseci/jsorc/manifests/database.yaml +0 -109
  138. jaseci/jsorc/manifests/elastic.yaml +0 -6024
  139. jaseci/jsorc/manifests/prometheus.yaml +0 -1383
  140. jaseci/jsorc/manifests/redis.yaml +0 -64
  141. jaseci/jsorc/memory.py +0 -258
  142. jaseci/jsorc/redis.py +0 -139
  143. jaseci/jsorc/remote_actions.py +0 -157
  144. jaseci/jsorc/tests/__init__.py +0 -0
  145. jaseci/jsorc/tests/test_actions.py +0 -542
  146. jaseci/jsorc/tests/test_jsorc.py +0 -112
  147. jaseci/prim/__init__.py +0 -0
  148. jaseci/prim/ability.py +0 -93
  149. jaseci/prim/architype.py +0 -89
  150. jaseci/prim/edge.py +0 -172
  151. jaseci/prim/element.py +0 -233
  152. jaseci/prim/graph.py +0 -26
  153. jaseci/prim/master.py +0 -64
  154. jaseci/prim/node.py +0 -532
  155. jaseci/prim/obj_mixins.py +0 -235
  156. jaseci/prim/sentinel.py +0 -281
  157. jaseci/prim/super_master.py +0 -31
  158. jaseci/prim/walker.py +0 -261
  159. jaseci/svc/__init__.py +0 -0
  160. jaseci/tests/__init__.py +0 -0
  161. jaseci/tests/infer.py +0 -39
  162. jaseci/tests/jac_test_code.py +0 -1293
  163. jaseci/tests/jac_test_progs.py +0 -774
  164. jaseci/tests/test_core.py +0 -153
  165. jaseci/tests/test_jac.py +0 -824
  166. jaseci/tests/test_node.py +0 -89
  167. jaseci/tests/test_progs.py +0 -702
  168. jaseci/tests/test_stack.py +0 -220
  169. jaseci/tests/test_stripe.py +0 -225
  170. jaseci/utils/__init__.py +0 -0
  171. jaseci/utils/actions/__init__.py +0 -0
  172. jaseci/utils/actions/actions_manager.py +0 -254
  173. jaseci/utils/actions/actions_optimizer.py +0 -516
  174. jaseci/utils/actions/actions_state.py +0 -95
  175. jaseci/utils/file_handler.py +0 -171
  176. jaseci/utils/gprof2dot.py +0 -3786
  177. jaseci/utils/id_list.py +0 -168
  178. jaseci/utils/json_handler.py +0 -70
  179. jaseci/utils/log_utils.py +0 -57
  180. jaseci/utils/test_core.py +0 -62
  181. jaseci/utils/utils.py +0 -387
  182. jaseci-1.4.2.5.dist-info/LICENSE +0 -21
  183. jaseci-1.4.2.5.dist-info/METADATA +0 -39
  184. jaseci-1.4.2.5.dist-info/RECORD +0 -184
  185. jaseci-1.4.2.5.dist-info/entry_points.txt +0 -3
  186. jaseci-1.4.2.5.dist-info/top_level.txt +0 -1
@@ -1,364 +0,0 @@
1
- """
2
- General action base class with automation for hot loading
3
- """
4
- from importlib.util import spec_from_file_location, module_from_spec
5
- from jaseci.utils.utils import logger
6
- from jaseci.jsorc.remote_actions import ACTIONS_SPEC_LOC
7
- from jaseci.jsorc.remote_actions import serv_actions, mark_as_remote, mark_as_endpoint
8
- import requests
9
- import os
10
- import sys
11
- import inspect
12
- import importlib
13
- import gc
14
- import re
15
-
16
- var_args = re.compile(r"^\*[^\*]")
17
- var_kwargs = re.compile(r"^\*\*[^\*]")
18
-
19
- live_actions = {} # {"act.func": func_obj, ...}
20
- live_action_modules = {} # {__module__: ["act.func1", "act.func2", ...], ...}
21
- action_configs = {} # {"module_name": {}, ...}
22
-
23
- glob_act_group = {} # {"group_name": {"act_name": action, ...}, ...}
24
- glob_act_hook = None
25
-
26
-
27
- def jaseci_action(act_group=None, aliases=list(), allow_remote=False):
28
- """Decorator for Jaseci Action interface"""
29
- caller_globals = dict(inspect.getmembers(inspect.currentframe().f_back))[
30
- "f_globals"
31
- ]
32
- if allow_remote and "serv_actions" not in caller_globals:
33
- caller_globals["serv_actions"] = serv_actions
34
-
35
- def decorator_func(func):
36
- if allow_remote:
37
- mark_as_remote([func, act_group, aliases, caller_globals])
38
- return assimilate_action(func, act_group, aliases)
39
-
40
- return decorator_func
41
-
42
-
43
- def jaseci_expose(endpoint, mount=None):
44
- """Decorator for Jaseci Action interface"""
45
- caller_globals = dict(inspect.getmembers(inspect.currentframe().f_back))[
46
- "f_globals"
47
- ]
48
- if "serv_actions" not in caller_globals:
49
- caller_globals["serv_actions"] = serv_actions
50
-
51
- def decorator_func(func):
52
- mark_as_endpoint([func, endpoint, mount, caller_globals])
53
- return func
54
-
55
- return decorator_func
56
-
57
-
58
- def assimilate_action(func, act_group=None, aliases=list()):
59
- """Helper for jaseci_action decorator"""
60
- act_group = [func.__module__.split(".")[-1]] if act_group is None else act_group
61
- action_name = f"{'.'.join(act_group+[func.__name__])}"
62
- live_actions[action_name] = func
63
- if func.__module__ != "js_remote_hook":
64
- if func.__module__ in live_action_modules:
65
- live_action_modules[func.__module__].append(action_name)
66
- else:
67
- live_action_modules[func.__module__] = [action_name]
68
- for i in aliases:
69
- live_actions[f"{'.'.join(act_group+[i])}"] = func
70
- if func.__module__ != "js_remote_hook":
71
- if func.__module__ in live_action_modules:
72
- live_action_modules[func.__module__].append(
73
- f"{'.'.join(act_group+[i])}"
74
- )
75
- else:
76
- live_action_modules[func.__module__] = [f"{'.'.join(act_group+[i])}"]
77
- return func
78
-
79
-
80
- def load_local_actions(file: str, ctx: dict = {}):
81
- """Load all jaseci actions from python file"""
82
- try:
83
- name = file.rstrip(".py")
84
- name = ".".join(name.split("/")[-2:])
85
- # Assumes parent folder of py file is a package for internal relative
86
- # imports, name is package.module and package path is added to sys path
87
- spec = spec_from_file_location(name, str(file))
88
- if spec is None:
89
- logger.error(f"Cannot hot load from action file {file}")
90
- return False
91
- else:
92
- module_dir = os.path.dirname(os.path.dirname(os.path.realpath(file)))
93
- if module_dir not in sys.path:
94
- sys.path.append(module_dir)
95
- mod = module_from_spec(spec)
96
- spec.loader.exec_module(mod)
97
- try:
98
- if hasattr(mod, "setup"):
99
- mod.setup(**ctx)
100
- except Exception as e:
101
- logger.error(
102
- f"Cannot run set up for module {mod}. This could be because the module doesn't have a setup procedure for initialization, or wrong setup parameters are provided."
103
- )
104
- logger.error(e)
105
- return True
106
- except Exception as e:
107
- logger.error(f"Cannot hot load local actions from {file}: {e}")
108
- return False
109
-
110
-
111
- def load_module_actions(mod, loaded_module=None, ctx: dict = {}):
112
- """Load all jaseci actions from python module"""
113
- try:
114
- if mod in sys.modules:
115
- del sys.modules[mod]
116
- if loaded_module and loaded_module in sys.modules:
117
- del sys.modules[loaded_module]
118
- if mod in live_action_modules:
119
- for i in live_action_modules[mod]:
120
- if i in live_actions:
121
- del live_actions[i]
122
- if loaded_module in live_action_modules:
123
- for i in live_action_modules[loaded_module]:
124
- if i in live_actions:
125
- del live_actions[i]
126
-
127
- mod = importlib.import_module(mod)
128
- try:
129
- if hasattr(mod, "setup"):
130
- mod.setup(**ctx)
131
- except Exception as e:
132
- logger.error(
133
- f"Cannot run set up for module {mod}. This could be because the module doesn't have a setup procedure for initialization, or wrong setup parameters are provided."
134
- )
135
- logger.error(e)
136
- if mod:
137
- return True
138
- except Exception as e:
139
- logger.error(f"Cannot hot load module actions from {mod}: {e}")
140
-
141
- return False
142
-
143
-
144
- def load_action_config(config, module_name):
145
- """
146
- Load the action config of a jaseci action module
147
- """
148
-
149
- loaded_configs = importlib.import_module(config).ACTION_CONFIGS
150
- if module_name and module_name in loaded_configs:
151
- action_configs[module_name] = loaded_configs[module_name]
152
- return True
153
- else:
154
- return False
155
-
156
-
157
- def unload_module(mod):
158
- """Unload actions module and all relevant function"""
159
- if mod in sys.modules.keys() and mod in live_action_modules.keys():
160
- for i in live_action_modules[mod]:
161
- if i in live_actions:
162
- del live_actions[i]
163
-
164
- # Iterate through the objects in the module __dict__ to manually delete them
165
- loaded_mod = sys.modules[mod]
166
- mod_content_len = len(loaded_mod.__dict__)
167
- for _ in range(mod_content_len):
168
- mod_obj = loaded_mod.__dict__.pop(list(loaded_mod.__dict__.keys())[0])
169
- del mod_obj
170
- del loaded_mod
171
- del sys.modules[mod]
172
- del live_action_modules[mod]
173
- gc.collect()
174
- return True
175
- return False
176
-
177
-
178
- def unload_action(name):
179
- """Unload actions module and all relevant function"""
180
- if name in live_actions.keys():
181
- mod = live_actions[name].__module__
182
- if mod != "js_remote_hook":
183
- live_action_modules[mod].remove(name)
184
- if len(live_action_modules[mod]) < 1:
185
- unload_module(mod)
186
- del live_actions[name]
187
- return True
188
- return False
189
-
190
-
191
- def unload_actionset(name):
192
- """Unload actions module and all relevant function"""
193
- act_list = []
194
- orig_len = len(live_actions)
195
- for i in live_actions.keys():
196
- if i.startswith(name + "."):
197
- act_list.append(i)
198
- for i in act_list:
199
- unload_action(i)
200
- return len(live_actions) != orig_len
201
-
202
-
203
- def load_preconfig_actions(hook):
204
- import json
205
-
206
- action_preload = hook.resolve_glob("ACTION_SETS", None)
207
- if action_preload:
208
- try:
209
- action_preload = json.loads(action_preload)
210
- for i in action_preload["local"]:
211
- load_local_actions(i)
212
- for i in action_preload["remote"]:
213
- load_remote_actions(i)
214
- for i in action_preload["module"]:
215
- load_module_actions(i)
216
- except Exception:
217
- pass
218
-
219
-
220
- def get_global_actions():
221
- """
222
- Loads all global action hooks for use by Jac programs
223
- Attaches globals to mem_hook
224
- """
225
- from jaseci.prim.ability import Ability
226
- from jaseci.jsorc.memory import MemoryHook
227
-
228
- if not glob_act_group:
229
- glob_act_hook = MemoryHook()
230
- for i in live_actions.keys():
231
- name = i.split(".")
232
- if name[0] in [
233
- "std",
234
- "file",
235
- "net",
236
- "rand",
237
- "vector",
238
- "request",
239
- "date",
240
- "jaseci",
241
- "internal",
242
- "zip",
243
- "webtool",
244
- "url",
245
- "regex",
246
- "maths",
247
- ]:
248
- if name[0] not in glob_act_group:
249
- glob_act_group[name[0]] = {}
250
- glob_act_group[name[0]][name[1]] = Ability(
251
- m_id=0,
252
- h=glob_act_hook,
253
- mode="public",
254
- name=i,
255
- kind="ability",
256
- value=i,
257
- persist=False,
258
- )
259
-
260
- # second layer copy and this will use the same Ability object
261
- # deepcopy will be much expensive and will also use new Ability Objects
262
- temp_glob_act_group = {}
263
- for key, value in glob_act_group.items():
264
- temp_glob_act_group[key] = value.copy()
265
-
266
- return temp_glob_act_group
267
-
268
-
269
- def unload_remote_actions(url):
270
- """
271
- Get the list of actions from the given URL and then unload them.
272
- """
273
- headers = {"content-type": "application/json"}
274
- try:
275
- spec = requests.get(url.rstrip("/") + ACTIONS_SPEC_LOC, headers=headers)
276
- spec = spec.json()
277
- for i in spec.keys():
278
- unload_action(i)
279
- return True
280
- except Exception as e:
281
- logger.error(f"Cannot unload remote action from {url}: {e}")
282
-
283
-
284
- def load_remote_actions(url, ctx: dict = {}):
285
- """Load all jaseci actions from live pod"""
286
- headers = {"content-type": "application/json"}
287
- try:
288
- spec = requests.get(url.rstrip("/") + ACTIONS_SPEC_LOC, headers=headers)
289
- spec = spec.json()
290
- for i in spec.keys():
291
- live_actions[i] = gen_remote_func_hook(url, i, spec[i])
292
- if i.endswith(".setup") and ctx:
293
- try:
294
- live_actions[i](**ctx)
295
- except Exception as e:
296
- logger.error(
297
- f"Cannot run set up for remote action {i}. This could be because the module doesn't have a setup procedure for initialization, or wrong setup parameters are provided."
298
- )
299
- logger.error(e)
300
- return True
301
-
302
- except Exception as e:
303
- logger.error(f"Cannot hot load remote actions at {url}: {e}")
304
- return False
305
-
306
-
307
- def gen_remote_func_hook(url, act_name, param_names):
308
- """Generater for function calls for remote action calls"""
309
-
310
- def func(*args, **kwargs):
311
- params = {}
312
- _args = list(args)
313
- _param_names: list = param_names.copy()
314
-
315
- args_len = len(args)
316
- for idx, name in enumerate(param_names):
317
- if idx >= args_len or not _args:
318
- break
319
- _param_names.remove(name)
320
- if var_args.match(name):
321
- if _args:
322
- params[name] = _args
323
- break
324
- else:
325
- params[name] = _args.pop(0)
326
-
327
- for name in _param_names:
328
- if var_args.match(name):
329
- if _args:
330
- params[name] = _args
331
- elif var_kwargs.match(name):
332
- if kwargs:
333
- params[name] = kwargs
334
- break
335
- elif name in kwargs:
336
- params[name] = kwargs.pop(name)
337
-
338
- # Remove any None-valued parameters to use the default value of the action def
339
- params = dict([(k, v) for k, v in params.items() if v is not None])
340
- act_url = f"{url.rstrip('/')}/{act_name.split('.')[-1]}"
341
- res = requests.post(
342
- act_url, headers={"content-type": "application/json"}, json=params
343
- )
344
- return res.json()
345
-
346
- func.__module__ = "js_remote_hook"
347
-
348
- return func
349
-
350
-
351
- def call_action(action_name: str, ctx: dict = {}) -> None:
352
- """
353
- Call an action by name
354
- """
355
- try:
356
- action_name = action_name.strip()
357
- if action_name in live_actions.keys():
358
- res = live_actions[action_name](**ctx)
359
- return res, True
360
- else:
361
- raise Exception(f"Action {action_name} not found")
362
- except Exception as e:
363
- logger.error(f"Error calling action {action_name}: {e}")
364
- return None, False
File without changes
@@ -1,109 +0,0 @@
1
- apiVersion: v1
2
- kind: Service
3
- metadata:
4
- creationTimestamp: null
5
- name: jaseci-db
6
- namespace: database
7
- spec:
8
- internalTrafficPolicy: Cluster
9
- ports:
10
- - port: 5432
11
- protocol: TCP
12
- targetPort: 5432
13
- selector:
14
- pod: jaseci-db
15
- sessionAffinity: None
16
- type: ClusterIP
17
- status:
18
- loadBalancer: {}
19
-
20
- ---
21
- apiVersion: v1
22
- kind: Secret
23
- metadata:
24
- creationTimestamp: null
25
- name: jaseci-db-credentials
26
- namespace: database
27
- data:
28
- password: bGlmZWxvZ2lmeWphc2VjaQ==
29
- user: cG9zdGdyZXM=
30
- type: Opaque
31
-
32
- ---
33
- apiVersion: v1
34
- kind: PersistentVolumeClaim
35
- metadata:
36
- creationTimestamp: null
37
- name: jaseci-db-pvc
38
- namespace: database
39
- spec:
40
- accessModes:
41
- - ReadWriteOnce
42
- resources:
43
- requests:
44
- storage: 10Gi
45
- volumeMode: Filesystem
46
- status:
47
- phase: Pending
48
-
49
- ---
50
-
51
- apiVersion: apps/v1
52
- kind: Deployment
53
- metadata:
54
- creationTimestamp: null
55
- name: jaseci-db
56
- namespace: database
57
- spec:
58
- progressDeadlineSeconds: 600
59
- replicas: 1
60
- revisionHistoryLimit: 10
61
- selector:
62
- matchLabels:
63
- pod: jaseci-db
64
- strategy:
65
- rollingUpdate:
66
- maxSurge: 25%
67
- maxUnavailable: 25%
68
- type: RollingUpdate
69
- template:
70
- metadata:
71
- creationTimestamp: null
72
- labels:
73
- pod: jaseci-db
74
- spec:
75
- containers:
76
- - env:
77
- - name: POSTGRES_USER
78
- valueFrom:
79
- secretKeyRef:
80
- key: user
81
- name: jaseci-db-credentials
82
- - name: POSTGRES_PASSWORD
83
- valueFrom:
84
- secretKeyRef:
85
- key: password
86
- name: jaseci-db-credentials
87
- image: postgres:alpine
88
- imagePullPolicy: IfNotPresent
89
- name: jaseci-db
90
- ports:
91
- - containerPort: 5432
92
- protocol: TCP
93
- resources: {}
94
- terminationMessagePath: /dev/termination-log
95
- terminationMessagePolicy: File
96
- volumeMounts:
97
- - mountPath: /var/lib/postgresql/data
98
- name: jaseci-db-volume
99
- subPath: jaseci
100
- dnsPolicy: ClusterFirst
101
- restartPolicy: Always
102
- schedulerName: default-scheduler
103
- securityContext: {}
104
- terminationGracePeriodSeconds: 30
105
- volumes:
106
- - name: jaseci-db-volume
107
- persistentVolumeClaim:
108
- claimName: jaseci-db-pvc
109
- status: {}