MCPcopy Create free account
hub / github.com/kubernetes-client/python / create_with

Function create_with

kubernetes/utils/create_from_yaml.py:144–164  ·  view source on GitHub ↗
(objects, apply=apply)

Source from the content-addressed store, hash-verified

142 """
143
144 def create_with(objects, apply=apply):
145 failures = []
146 k8s_objects = []
147 for yml_document in objects:
148 if yml_document is None:
149 continue
150 try:
151 created = create_from_dict(
152 k8s_client,
153 yml_document,
154 verbose,
155 namespace=namespace,
156 apply=apply,
157 **kwargs,
158 )
159 k8s_objects.append(created)
160 except FailToCreateError as failure:
161 failures.extend(failure.api_exceptions)
162 if failures:
163 raise FailToCreateError(failures)
164 return k8s_objects
165
166 class Loader(yaml.loader.SafeLoader):
167 yaml_implicit_resolvers = yaml.loader.SafeLoader.yaml_implicit_resolvers.copy()

Callers 1

create_from_yamlFunction · 0.85

Calls 2

create_from_dictFunction · 0.70
FailToCreateErrorClass · 0.70

Tested by

no test coverage detected