Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,57 @@ ClusterConfigurator withReadinessProbeSettings(
ClusterConfigurator withLivenessProbeSettings(
Integer initialDelay, Integer timeout, Integer period);

/**
* Add a node label to the Cluster's node selector
*
* @param labelKey the pod label key
* @param labelValue the pod label value
* @return this object
*/
ClusterConfigurator withNodeSelector(String labelKey, String labelValue);

/**
* Add a resource requirement at cluster level. The requests for memory are measured in bytes. You
* can express memory as a plain integer or as a fixed-point integer using one of these suffixes:
* E, P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. The
* requests for cpu are mesured in cpu units and can be expressed in millicores i.e. 100m is the
* same as 0.1
*
* @param resource the resource to be added as requirement cpu or memory
* @param quantity the quantity required for the resource
* @return this object
*/
ClusterConfigurator withRequestRequirement(String resource, String quantity);

/**
* Add a resource limit at cluster level, the requests for memory are measured in bytes. You can
* express memory as a plain integer or as a fixed-point integer using one of these suffixes: E,
* P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. The
* requests for cpu are mesured in cpu units and can be expressed in millicores i.e. 100m is the
* same as 0.1
*
* @param resource the resource to be added as requirement cpu or memory
* @param quantity the quantity required for the resource
* @return this object
*/
ClusterConfigurator withLimitRequirement(String resource, String quantity);

/**
* Add security constraints at container level, if the same constraint is also defined at pod
* level then container constraint take precedence
*
* @param containerSecurityContext the security context object
* @return this object
*/
ClusterConfigurator withContainerSecurityContext(V1SecurityContext containerSecurityContext);

/**
* Add security constraints at container level, if the same constraint is also defined at pod
* level then container constraint take precedence
*
* @param podSecurityContext
* @return this object
*/
ClusterConfigurator withPodSecurityContext(V1PodSecurityContext podSecurityContext);

ClusterConfigurator withAdditionalVolume(String name, String path);
Expand All @@ -50,5 +93,17 @@ ClusterConfigurator withLivenessProbeSettings(

ClusterConfigurator withServiceAnnotation(String name, String value);

/**
* Tells the operator whether the customer wants to restart the server pods. The value can be any
* String and it can be defined on domain, cluster or server to restart the different pods. After
* the value is added, the corresponding pods will be terminated and created again. If customer
* modifies the value again after the pods were recreated, then the pods will again be terminated
* and recreated.
*
* @since 2.0
* @param restartVersion If preseent, every time this value is updated the operator will restart
* the required servers
* @return this object
*/
ClusterConfigurator withRestartVersion(String restartVersion);
}
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,15 @@ public abstract DomainConfigurator withPodSecurityContext(
V1PodSecurityContext podSecurityContext);

/**
* Set the restart version for the Domain
* Tells the operator whether the customer wants to restart the server pods. The value can be any
* String and it can be defined on domain, cluster or server to restart the different pods. After
* the value is added, the corresponding pods will be terminated and created again. If customer
* modifies the value again after the pods were recreated, then the pods will again be terminated
* and recreated.
*
* @param restartVersion
* @since 2.0
* @param restartVersion If preseent, every time this value is updated the operator will restart
* the required servers
* @return this object
*/
public abstract DomainConfigurator withRestartVersion(String restartVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,57 @@ ServerConfigurator withLivenessProbeSettings(
ServerConfigurator withReadinessProbeSettings(
Integer initialDelay, Integer timeout, Integer period);

/**
* Add a node label to the Servers's node selector
*
* @param labelKey the pod label key
* @param labelValue the pod label value
* @return this object
*/
ServerConfigurator withNodeSelector(String labelKey, String labelValue);

/**
* Add a resource requirement at server level. The requests for memory are measured in bytes. You
* can express memory as a plain integer or as a fixed-point integer using one of these suffixes:
* E, P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. The
* requests for cpu are mesured in cpu units and can be expressed in millicores i.e. 100m is the
* same as 0.1
*
* @param resource the resource to be added as requirement cpu or memory
* @param quantity the quantity required for the resource
* @return this object
*/
ServerConfigurator withRequestRequirement(String resource, String quantity);

/**
* Add a resource limit at server level, the requests for memory are measured in bytes. You can
* express memory as a plain integer or as a fixed-point integer using one of these suffixes: E,
* P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. The
* requests for cpu are mesured in cpu units and can be expressed in millicores i.e. 100m is the
* same as 0.1
*
* @param resource the resource to be added as requirement cpu or memory
* @param quantity the quantity required for the resource
* @return this object
*/
ServerConfigurator withLimitRequirement(String resource, String quantity);

/**
* Add security constraints at container level, if the same constraint is also defined at pod
* level then container constraint take precedence
*
* @param containerSecurityContext the security context object
* @return this object
*/
ServerConfigurator withContainerSecurityContext(V1SecurityContext containerSecurityContext);

/**
* Add security constraints at container level, if the same constraint is also defined at pod
* level then container constraint take precedence
*
* @param podSecurityContext
* @return this object
*/
ServerConfigurator withPodSecurityContext(V1PodSecurityContext podSecurityContext);

ServerConfigurator withAdditionalVolume(String name, String path);
Expand All @@ -46,5 +89,17 @@ ServerConfigurator withReadinessProbeSettings(

ServerConfigurator withServiceAnnotation(String name, String value);

/**
* Tells the operator whether the customer wants to restart the server pods. The value can be any
* String and it can be defined on domain, cluster or server to restart the different pods. After
* the value is added, the corresponding pods will be terminated and created again. If customer
* modifies the value again after the pods were recreated, then the pods will again be terminated
* and recreated.
*
* @since 2.0
* @param restartVersion If preseent, every time this value is updated the operator will restart
* the required servers
* @return this object
*/
ServerConfigurator withRestartVersion(String restartVersion);
}
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ void addServiceAnnotations(String name, String value) {
serverPod.addServiceAnnotations(name, value);
}

public String getRestartVersion() {
String getRestartVersion() {
return restartVersion;
}

public void setRestartVersion(String restartVersion) {
void setRestartVersion(String restartVersion) {
this.restartVersion = restartVersion;
}

Expand Down