Skip to content

Commit

Permalink
Add an initialization container for delayed exposure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phixsura committed Oct 24, 2023
1 parent 950603c commit 6d9836f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class KubernetesService {
private Map<String,String> environment;

private Map<String,String> init;

private List<String> initCommand;

public String getName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,20 @@ spec:
spec:
<#if service.init??>
initContainers:
<#if service.init?has_key("name")>
<#assign nameValue = service.init.name>
<#assign _ = service.init.remove("name")>
- name: ${nameValue}
</#if>
<#list service.init as key,value>
${key}: ${value}
</#list>
<#if service.initCommand??>
command:
command:
<#list service.initCommand as cmd>
- "${cmd}"
- "${cmd}"
</#list>
</#if>
<#list service.init as key,value>
${key}: ${value}
</#list>
</#if>
containers:
- name: ${service.name}
Expand Down

0 comments on commit 6d9836f

Please sign in to comment.