This repository was archived by the owner on May 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 590
Update documentation for initContainers addition in spring-cloud-deployer #5866
Closed
corneil
wants to merge
2
commits into
spring-attic:main
from
corneil:corneil/docs-for-init-containers
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
---- | ||
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']}] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the alternative example go below the multiple containers example? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. inidividually is misspelled ;-) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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']} | ||
---- | ||
==== | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:"?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done