Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Option to Override Shell #363

Closed

Conversation

pnovotnak
Copy link

I've added the option to override the shell in kustomization.yaml files through a new parameter generateShell which takes a list of strings. The first string is the binary to use as the alternate shell, all subsequent parameters are passed as arguments, ending with the command provided by the user in a generator.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 20, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pnovotnak
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: grodrigues3

If they are not already assigned, you can assign the PR to them by writing /assign @grodrigues3 in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

# It's possible to override the shell used in generator
# commands by passing this optional parameter. Default is:
# ["/bin/sh", "-c"]
generatorShell: ["/bin/bash", "-c"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this could be part of a struct (e.g. a GeneratorOptions struct, per #354 (comment)) sent to both the secret and configmap factory, even though at the moment the configmap generator doesn't use a shell.

I think it would make for a cleaner API to gather all generator inputs into one place, even if there's a difference at the moment between what the configmap and secret generators need.

WDYT?

@Liujingfang1
Copy link
Contributor

I added generatorOptions in kusotmization type, which will provide overriding shell. #497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants