Skip to content

Commit

Permalink
secu
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmorin committed Sep 26, 2024
1 parent 3eab679 commit c91cb12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 73 deletions.
5 changes: 5 additions & 0 deletions cdpcli/clidriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,11 @@ def __k8s(self):
if not self._context.opt['--use-registry'] == 'aws-ecr' and 'kind' in doc and 'spec' in doc and ('template' in doc['spec'] or 'jobTemplate' in doc['spec']):
doc=CLIDriver.addImageSecret(doc,image_pull_secret_value)

if self._context.getParamOrEnv("no-requests",False):
if doc['kind'] == 'Deployment' or doc['kind'] == 'StatefulSet' or doc['kind'] == 'Job' or doc['kind'] == 'DaemonSet':
for container in range(len(doc["spec"]["template"]["spec"]["containers"])):
doc["spec"]["template"]["spec"]["containers"][container]["resources"]["requests"]["cpu"] = 0

LOG.verbose(doc)
with open('%s/all_resources.yaml' % final_template_deploy_spec_dir, 'w') as outfile:
yaml.dump_all(final_docs, outfile)
Expand Down
73 changes: 0 additions & 73 deletions testdns.py

This file was deleted.

0 comments on commit c91cb12

Please sign in to comment.