Skip to content

Commit

Permalink
Docs for initContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjs committed Oct 30, 2019
1 parent f0a0203 commit 3eda69b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ These properties are also used when configuring the <<configuration-kubernetes-t
|A custom image name to use for the StatefulSet Init Container
|<none>

|initContainer
|An Init Container experessed in YAML format to be applied to a pod. e.g. ```{containerName: 'test', imageName: 'busybox:latest', commands: ['sh', '-c', 'echo hello']}```
|<none>

|===

[[configuration-kubernetes-tasks]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,3 +901,18 @@ data:

Replacing the `statefulSetInitContainerImageName` attribute with the appropriate value for your environment.

==== Init Containers

When applications are deployed, a custom Init Container can be set 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:

====
[source,options=nowrap]
----
deployer.<app>.kubernetes.initContainer={containerName: 'test', imageName: 'busybox:latest', commands: ['sh', '-c', 'echo hello']}
----
====

Replace `<app>` with the name of your application and set the values of the `initContainer` attributes appropriate for your Init Container.

0 comments on commit 3eda69b

Please sign in to comment.