-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a way to override operand image, env, and resources in CRD
Signed-off-by: Michael Edgar <[email protected]>
- Loading branch information
Showing
5 changed files
with
301 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
49 changes: 49 additions & 0 deletions
49
...in/java/com/github/streamshub/console/api/v1alpha1/spec/containers/ContainerTemplate.java
This file contains 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.github.streamshub.console.api.v1alpha1.spec.containers; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonPropertyDescription; | ||
|
||
import io.fabric8.kubernetes.api.model.EnvVar; | ||
import io.fabric8.kubernetes.api.model.ResourceRequirements; | ||
import io.sundr.builder.annotations.Buildable; | ||
|
||
@Buildable | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class ContainerTemplate { | ||
|
||
@JsonPropertyDescription("Container image to be used for the container") | ||
private String image; | ||
|
||
@JsonPropertyDescription("CPU and memory resources to reserve.") | ||
private ResourceRequirements resources; | ||
|
||
@JsonPropertyDescription("Environment variables which should be applied to the container.") | ||
private List<EnvVar> env; | ||
|
||
public String getImage() { | ||
return image; | ||
} | ||
|
||
public void setImage(String image) { | ||
this.image = image; | ||
} | ||
|
||
public ResourceRequirements getResources() { | ||
return resources; | ||
} | ||
|
||
public void setResources(ResourceRequirements resources) { | ||
this.resources = resources; | ||
} | ||
|
||
public List<EnvVar> getEnv() { | ||
return env; | ||
} | ||
|
||
public void setEnv(List<EnvVar> env) { | ||
this.env = env; | ||
} | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
.../src/main/java/com/github/streamshub/console/api/v1alpha1/spec/containers/Containers.java
This file contains 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.github.streamshub.console.api.v1alpha1.spec.containers; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonPropertyDescription; | ||
|
||
import io.sundr.builder.annotations.Buildable; | ||
|
||
@Buildable | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class Containers { | ||
|
||
@JsonPropertyDescription("Template for the Console API server container. " + | ||
"The template allows users to specify how the Kubernetes resources are generated.") | ||
ContainerTemplate api; | ||
|
||
@JsonPropertyDescription("Template for the Console UI server container. " + | ||
"The template allows users to specify how the Kubernetes resources are generated.") | ||
ContainerTemplate ui; | ||
|
||
public ContainerTemplate getApi() { | ||
return api; | ||
} | ||
|
||
public void setApi(ContainerTemplate api) { | ||
this.api = api; | ||
} | ||
|
||
public ContainerTemplate getUi() { | ||
return ui; | ||
} | ||
|
||
public void setUi(ContainerTemplate ui) { | ||
this.ui = ui; | ||
} | ||
} |
This file contains 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
Oops, something went wrong.