File tree Expand file tree Collapse file tree
rust/olm-deployer/src/tolerations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,13 +7,16 @@ use crate::data::get_or_create;
77
88/// Copies the pod tolerations from the `source` to the `target`.
99/// Does nothing if there are no tolerations or if the `target` is not
10- /// a DaemonSet.
10+ /// a DaemonSet or a Deployment.
11+ /// Admins can configure Subscription tolerations when installing the operator
12+ /// and these need to be copied over to the objects created by the deployer.
1113pub ( super ) fn maybe_copy_tolerations (
1214 source : & Deployment ,
1315 target : & mut DynamicObject ,
1416 target_gvk : & GroupVersionKind ,
1517) -> anyhow:: Result < ( ) > {
16- if target_gvk. kind == "DaemonSet" {
18+ let target_kind_set = [ "DaemonSet" , "Deployment" ] ;
19+ if target_kind_set. contains ( & target_gvk. kind . as_str ( ) ) {
1720 if let Some ( tolerations) = deployment_tolerations ( source) {
1821 let path = "template/spec/tolerations" . split ( "/" ) ;
1922 * get_or_create ( target. data . pointer_mut ( "/spec" ) . unwrap ( ) , path) ? = serde_json:: json!(
You can’t perform that action at this time.
0 commit comments