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

Kubernetes needs to use shell entryPointStyle instead of exec as a default #3442

Closed
cppwfs opened this issue Aug 16, 2019 · 2 comments
Closed

Comments

@cppwfs
Copy link
Contributor

cppwfs commented Aug 16, 2019

Due to the security concerns around sending sensitive properties via command line args we need to launch task apps on Kubernetes using the shell or boot entryPointStyle as a default instead of exec.

This is because exec converts environment properties to command line args.

@AdVirMachina
Copy link

Actually, if you change spring-cloud-dataflow/src/kubernetes/server/server-config.yaml, you can. Add entryPointStyle: shell under task.platform.kubernetes.accounts.default like this:
task:
platform:
kubernetes:
accounts:
default:
entryPointStyle: shell

However, bear in mind that as soon as you do that, launching through the dashboard does not act in the documented manner. None of the information you put in the Launch Task screen is sent to the container at all. The way around this is to put them in the definition portion of the Task definition as illustrated here at section 24.3
https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#spring-cloud-dataflow-task

Oddly, this cannot be done in the dashboard. It has some sort of syntax checking which does not allow the definition to be entered in this manner within the DSL box at Task Definition time. So, you either have to use the REST API or the CLI.

At any rate, defining the task in this manner makes the Kubernetes Deployer pass the information along to the executed container as environment variables which have uppercased names and underbars for the periods in the name. (eg. --spring.batch.job.names=ImaLittleTeapot manifests in the container as an environment variable definition of SPRING_BATCH_JOB_NAMES=ImaLittleTeapot.

It is the responsibility of your application within the container to access those variables as required.

@cppwfs
Copy link
Contributor Author

cppwfs commented Nov 12, 2024

Closing this issue due to inactivity. If you think this is closed in error please leave a comment.

@cppwfs cppwfs closed this as completed Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants