Skip to content

Commit

Permalink
add soft and hard container constraints data model to titus batch job…
Browse files Browse the repository at this point in the history
… request
  • Loading branch information
enicloom committed Aug 23, 2022
1 parent abe4f23 commit 44258eb
Showing 1 changed file with 22 additions and 0 deletions.
Expand Up @@ -20,7 +20,9 @@
import lombok.Builder;
import lombok.Data;
import lombok.NonNull;
import org.apache.logging.log4j.util.Strings;

import javax.annotation.Nullable;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
Expand Down Expand Up @@ -108,6 +110,10 @@ public static class Container {
@NotNull
@NonNull
private Map<String, String> attributes;
@Nullable
private ContainerConstraints softConstraints;
@Nullable
private ContainerConstraints hardConstraints;
}

/**
Expand Down Expand Up @@ -140,6 +146,22 @@ public static class SecurityProfile {
private String iamRole;
}

/**
* Titus job container constraints.
*/
@Data
@Builder
public static class ContainerConstraints {
@NotNull
@NonNull
private Map<String, String> constraints;

@NotNull
@NonNull
@Builder.Default()
private String expression = Strings.EMPTY;
}

/**
* Titus job container image.
*/
Expand Down

0 comments on commit 44258eb

Please sign in to comment.