Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Update documentation for initContainers addition in spring-cloud-deployer #5866

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1128,12 +1128,17 @@ Replace the `statefulSetInitContainerImageName` attribute with the appropriate v
When you deploy applications, you can set a custom Init Container on a per-application basis.
Refer to the https://kubernetes.io/docs/concepts/workloads/pods/init-containers/[Init Containers] section of the Kubernetes reference for more information.

The following example shows how you can configure an Init Container for an application:
The following example shows how you can configure an Init Container or multiple Init Containers for an application:

====
[source,options=nowrap]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should line 1131 be updated to say "The following example shows how you can configure an Init Container or containers for an application:"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

----
deployer.<application>.kubernetes.initContainer={containerName: 'test', imageName: 'busybox:latest', commands: ['sh', '-c', 'echo hello']}
# alternative for multiple init containers
deployer.<application>.kubernetes.initContainers=[{containerName:'test',imageName:'busybox:latest',commands:['sh','-c','echo hello']},{containerName:'test2',imageName:'busybox:latest',commands:['sh','-c','echo world']}]
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick : Make sure we have a space after the comma so samples line up with each other.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should the alternative example go below the multiple containers example?

Copy link
Contributor

Choose a reason for hiding this comment

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

inidividually is misspelled ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

# multiple containers can be created inidividually
deployer.<application>.kubernetes.initContainers[0]={containerName:'test',imageName:'busybox:latest',commands:['sh','-c','echo hello']}
deployer.<application>.kubernetes.initContainers[1]={containerName:'test2',imageName:'busybox:latest',commands:['sh','-c','echo world']}
----
====

Expand Down
Loading