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 05818d1 commit aa167a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -727,8 +727,9 @@ private static KubernetesService getKubernetesService(ServiceComponent dependenc

if(dependency.getInit() != null) {
Yaml yaml = new Yaml();
List<Map<String, Object>> inits = (List<Map<String, Object>>) dependency.getInit();
for (Map<String, Object> initMap : inits) {
List<Object> inits = dependency.getInit();
for (Object map : inits) {
Map<String, Object> initMap = (Map<String, Object>) map;
InitContainer initContainer = new InitContainer();
Map<String, String> newMap = new LinkedHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ public class ServiceComponent {
private List<String> depends_on;
private Map<String, Object> healthcheck;

private Map<String,Object> init;
private List<Object> init;

private List<String> initCommand;

private List<String> healthcheckExec;

Expand Down Expand Up @@ -319,19 +318,12 @@ public void setVolumes(List<String> volumes) {
}


public Map<String, Object> getInit() {
public List<Object> getInit() {
return init;
}

public void setInit(Map<String, Object> init) {
public void setInit( List<Object> init) {
this.init = init;
}

public List<String> getInitCommand() {
return initCommand;
}

public void setInitCommand(List<String> initCommand) {
this.initCommand = initCommand;
}
}

0 comments on commit aa167a2

Please sign in to comment.