Skip to content
Open
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 @@ -19,7 +19,7 @@
import io.fabric8.kubernetes.api.model.PodSecurityContext;
import io.fabric8.kubernetes.api.model.Toleration;

@JsonPropertyOrder({ "metadata", "imagePullSecrets", "affinity", "nodeSelector", "tolerations" })
@JsonPropertyOrder({ "metadata", "imagePullSecrets", "affinity", "nodeSelector", "tolerations", "priorityClassName" })
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
@Documented
public class PodTemplate implements HasMetadataTemplate, Serializable {
Expand Down Expand Up @@ -53,6 +53,10 @@ public class PodTemplate implements HasMetadataTemplate, Serializable {
@Documented.Field(k8Ref = "toleration-v1-core")
private List<Toleration> tolerations = List.of();

@JsonPropertyDescription("Name of the priority class used to assign a priority to the pod.")
@JsonInclude(JsonInclude.Include.NON_NULL)
private String priorityClassName;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add the Documented.Field annotation?


@Override
public MetadataTemplate getMetadata() {
return metadata;
Expand Down Expand Up @@ -102,4 +106,12 @@ public List<Toleration> getTolerations() {
public void setTolerations(List<Toleration> tolerations) {
this.tolerations = tolerations;
}

public String getPriorityClassName() {
return priorityClassName;
}

public void setPriorityClassName(String priorityClassName) {
this.priorityClassName = priorityClassName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ private void addTemplateConfigurationToPod(PodTemplate template, PodTemplateSpec
podSpec.setImagePullSecrets(template.getImagePullSecrets());
podSpec.setNodeSelector(template.getNodeSelector());
podSpec.setTolerations(template.getTolerations());
podSpec.setPriorityClassName(template.getPriorityClassName());
podMeta.getLabels().putAll(templateMeta.getLabels());
podMeta.getAnnotations().putAll(templateMeta.getAnnotations());
}
Expand Down
1 change: 1 addition & 0 deletions docs/reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ Used in: <<debezium-operator-schema-reference-templates, `+Templates+`>>
| [[debezium-operator-schema-reference-podtemplate-securitycontext]]<<debezium-operator-schema-reference-podtemplate-securitycontext, `+securityContext+`>> | https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#podsecuritycontext-v1-core[`+PodSecurityContext+`] | | Pod-level security attributes and container settings
| [[debezium-operator-schema-reference-podtemplate-nodeselector]]<<debezium-operator-schema-reference-podtemplate-nodeselector, `+nodeSelector+`>> | Map<String, String> | | NodeSelector is a selector which must be true for the pod to fit on a node.
| [[debezium-operator-schema-reference-podtemplate-tolerations]]<<debezium-operator-schema-reference-podtemplate-tolerations, `+tolerations+`>> | https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#toleration-v1-core[`+List<Toleration>+`] | | Tolerations applied to the pod to allow scheduling on tainted nodes.
| [[debezium-operator-schema-reference-podtemplate-priorityclassname]]<<debezium-operator-schema-reference-podtemplate-priorityclassname, `+priorityClassName+`>> | String | | Name of the priority class used to assign a priority to the pod.
|===

[#debezium-operator-schema-reference-predicate]
Expand Down
4 changes: 4 additions & 0 deletions k8/debeziumservers.debezium.io-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,10 @@ spec:
description: "NodeSelector is a selector which must be\
\ true for the pod to fit on a node."
type: "object"
priorityClassName:
description: "Name of the priority class used to assign\
\ a priority to the pod."
type: "string"
securityContext:
description: "Pod-level security attributes and container\
\ settings"
Expand Down
Loading