|
7626 | 7626 | "distributedLogs": { |
7627 | 7627 | ...(this.hasProp(previous, 'spec.distributedLogs') && previous.spec.distributedLogs), |
7628 | 7628 | ...(( (typeof this.distributedLogs !== 'undefined') && this.distributedLogs.length ) && { "sgDistributedLogs": this.distributedLogs }), |
7629 | | - ...(this.retention.length && { |
| 7629 | + ...(this.retention && this.retention.length && { |
7630 | 7630 | "retention": this.retention |
7631 | 7631 | }) |
7632 | 7632 | } |
|
7722 | 7722 | "postgres": { |
7723 | 7723 | ...(this.hasProp(previous, 'spec.postgres') && previous.spec.postgres), |
7724 | 7724 | "version": this.postgresVersion, |
7725 | | - ...(this.selectedExtensions.length && { |
| 7725 | + ...(this.selectedExtensions && this.selectedExtensions.length && { |
7726 | 7726 | "extensions": this.selectedExtensions |
7727 | 7727 | } || {"extensions": null} ), |
7728 | 7728 | "flavor": this.flavor, |
|
7739 | 7739 | "coordinator": { |
7740 | 7740 | ...(this.hasProp(previous, 'spec.coordinator') && previous.spec.coordinator), |
7741 | 7741 | "instances": this.coordinator.instances, |
7742 | | - ...(this.coordinator.sgInstanceProfile.length && { |
| 7742 | + ...(this.coordinator.sgInstanceProfile && this.coordinator.sgInstanceProfile.length && { |
7743 | 7743 | "sgInstanceProfile": this.coordinator.sgInstanceProfile |
7744 | 7744 | }), |
7745 | 7745 | ...( (this.hasProp(previous, 'spec.coordinator.configurations') || this.coordinator.configurations.sgPoolingConfig.length || this.coordinator.configurations.sgPostgresConfig.length) && ({ |
7746 | 7746 | "configurations": { |
7747 | 7747 | ...(this.hasProp(previous, 'spec.coordinator.configurations') && previous.spec.coordinator.configurations), |
7748 | | - ...(this.coordinator.configurations.sgPoolingConfig.length && { |
| 7748 | + ...(this.coordinator.configurations.sgPoolingConfig && this.coordinator.configurations.sgPoolingConfig.length && { |
7749 | 7749 | "sgPoolingConfig": this.coordinator.configurations.sgPoolingConfig |
7750 | 7750 | }), |
7751 | | - ...(this.coordinator.configurations.sgPostgresConfig.length && { |
| 7751 | + ...(this.coordinator.configurations.sgPostgresConfig && this.coordinator.configurations.sgPostgresConfig.length && { |
7752 | 7752 | "sgPostgresConfig": this.coordinator.configurations.sgPostgresConfig |
7753 | 7753 | }), |
7754 | 7754 | } |
|
7792 | 7792 | this.hasProp(previous, 'spec.coordinator.pods.scheduling') || |
7793 | 7793 | (this.hasProp(this.coordinator, 'pods.scheduling.nodeSelector') && this.hasNodeSelectors(this.coordinator.pods.scheduling.nodeSelector)) || |
7794 | 7794 | (this.hasProp(this.coordinator, 'pods.scheduling.tolerations') && this.hasTolerations(this.coordinator.pods.scheduling.tolerations)) || |
7795 | | - requiredAffinity.coordinator.length || preferredAffinity.coordinator.length |
| 7795 | + (requiredAffinity.coordinator && requiredAffinity.coordinator.length) || (preferredAffinity.coordinator && preferredAffinity.coordinator.length) |
7796 | 7796 | ) && { |
7797 | 7797 | "scheduling": { |
7798 | 7798 | ...(this.hasProp(previous, 'spec.coordinator.pods.scheduling') && previous.spec.coordinator.pods.scheduling), |
7799 | 7799 | ...( (this.hasProp(this.coordinator, 'pods.scheduling.nodeSelector') && this.hasNodeSelectors(this.coordinator.pods.scheduling.nodeSelector)) && {"nodeSelector": this.parseProps(this.coordinator.pods.scheduling.nodeSelector, 'label')} || {"nodeSelector": null} ), |
7800 | 7800 | ...( (this.hasProp(this.coordinator, 'pods.scheduling.tolerations') && this.hasTolerations(this.coordinator.pods.scheduling.tolerations)) && {"tolerations": this.coordinator.pods.scheduling.tolerations} || {"tolerations": null} ), |
7801 | | - ...(requiredAffinity.coordinator.length || preferredAffinity.coordinator.length ) && { |
| 7801 | + ...((requiredAffinity.coordinator && requiredAffinity.coordinator.length) || (preferredAffinity.coordinator && preferredAffinity.coordinator.length) ) && { |
7802 | 7802 | "nodeAffinity": { |
7803 | | - ...(requiredAffinity.coordinator.length && { |
| 7803 | + ...(requiredAffinity.coordinator && requiredAffinity.coordinator.length && { |
7804 | 7804 | "requiredDuringSchedulingIgnoredDuringExecution": { |
7805 | 7805 | "nodeSelectorTerms": requiredAffinity.coordinator |
7806 | 7806 | } |
7807 | 7807 | }), |
7808 | | - ...(preferredAffinity.coordinator.length && { |
| 7808 | + ...(preferredAffinity.coordinator && preferredAffinity.coordinator.length && { |
7809 | 7809 | "preferredDuringSchedulingIgnoredDuringExecution": preferredAffinity.coordinator |
7810 | 7810 | }) |
7811 | 7811 | } |
|
7861 | 7861 | ...(this.hasProp(previous, 'spec.shards') && previous.spec.shards), |
7862 | 7862 | "clusters": this.shards.clusters, |
7863 | 7863 | "instancesPerCluster": this.shards.instancesPerCluster, |
7864 | | - ...(this.shards.sgInstanceProfile.length && { |
| 7864 | + ...(this.shards.sgInstanceProfile && this.shards.sgInstanceProfile.length && { |
7865 | 7865 | "sgInstanceProfile": this.shards.sgInstanceProfile |
7866 | 7866 | }), |
7867 | 7867 | ...( (this.hasProp(previous, 'spec.shards.configurations') || this.shards.configurations.sgPoolingConfig.length || this.shards.configurations.sgPostgresConfig.length) && ({ |
7868 | 7868 | "configurations": { |
7869 | 7869 | ...(this.hasProp(previous, 'spec.shards.configurations') && previous.spec.shards.configurations), |
7870 | | - ...(this.shards.configurations.sgPoolingConfig.length && { |
| 7870 | + ...(this.shards.configurations.sgPoolingConfig && this.shards.configurations.sgPoolingConfig.length && { |
7871 | 7871 | "sgPoolingConfig": this.shards.configurations.sgPoolingConfig |
7872 | 7872 | }), |
7873 | | - ...(this.shards.configurations.sgPostgresConfig.length && { |
| 7873 | + ...(this.shards.configurations.sgPostgresConfig && this.shards.configurations.sgPostgresConfig.length && { |
7874 | 7874 | "sgPostgresConfig": this.shards.configurations.sgPostgresConfig |
7875 | 7875 | }), |
7876 | 7876 | } |
|
7914 | 7914 | this.hasProp(previous, 'spec.shards.pods.scheduling') || |
7915 | 7915 | (this.hasProp(this.shards, 'pods.scheduling.nodeSelector') && this.hasNodeSelectors(this.shards.pods.scheduling.nodeSelector)) || |
7916 | 7916 | (this.hasProp(this.shards, 'pods.scheduling.tolerations') && this.hasTolerations(this.shards.pods.scheduling.tolerations)) || |
7917 | | - requiredAffinity.shards.length || preferredAffinity.shards.length |
| 7917 | + (requiredAffinity.shards && requiredAffinity.shards.length) || (preferredAffinity.shards && preferredAffinity.shards.length) |
7918 | 7918 | ) && { |
7919 | 7919 | "scheduling": { |
7920 | 7920 | ...(this.hasProp(previous, 'spec.shards.pods.scheduling') && previous.spec.shards.pods.scheduling), |
7921 | 7921 | ...( (this.hasProp(this.shards, 'pods.scheduling.nodeSelector') && this.hasNodeSelectors(this.shards.pods.scheduling.nodeSelector)) && {"nodeSelector": this.parseProps(this.shards.pods.scheduling.nodeSelector, 'label')} || {"nodeSelector": null} ), |
7922 | 7922 | ...( (this.hasProp(this.shards, 'pods.scheduling.tolerations') && this.hasTolerations(this.shards.pods.scheduling.tolerations)) && {"tolerations": this.shards.pods.scheduling.tolerations} || {"tolerations": null} ), |
7923 | | - ...(requiredAffinity.shards.length || preferredAffinity.shards.length ) && { |
| 7923 | + ...((requiredAffinity.shards && requiredAffinity.shards.length) || (preferredAffinity.shards && preferredAffinity.shards.length) ) && { |
7924 | 7924 | "nodeAffinity": { |
7925 | | - ...(requiredAffinity.shards.length && { |
| 7925 | + ...(requiredAffinity.shards && requiredAffinity.shards.length && { |
7926 | 7926 | "requiredDuringSchedulingIgnoredDuringExecution": { |
7927 | 7927 | "nodeSelectorTerms": requiredAffinity.shards |
7928 | 7928 | } |
7929 | 7929 | }), |
7930 | | - ...(preferredAffinity.shards.length && { |
| 7930 | + ...(preferredAffinity.shards && preferredAffinity.shards.length && { |
7931 | 7931 | "preferredDuringSchedulingIgnoredDuringExecution": preferredAffinity.shards |
7932 | 7932 | }) |
7933 | 7933 | } |
|
8288 | 8288 | override.pods.scheduling = ( |
8289 | 8289 | (this.hasProp(override, 'pods.scheduling.nodeSelector') && this.hasNodeSelectors(override.pods.scheduling.nodeSelector)) || |
8290 | 8290 | (this.hasProp(override, 'pods.scheduling.tolerations') && this.hasTolerations(override.pods.scheduling.tolerations)) || |
8291 | | - requiredAffinity.length || preferredAffinity.length |
| 8291 | + (requiredAffinity && requiredAffinity.length) || (preferredAffinity && preferredAffinity.length) |
8292 | 8292 | ) |
8293 | 8293 | ? { |
8294 | 8294 | ...( (this.hasProp(override, 'pods.scheduling.nodeSelector') && this.hasNodeSelectors(override.pods.scheduling.nodeSelector)) && { |
|
8297 | 8297 | ...( (this.hasProp(override, 'pods.scheduling.tolerations') && this.hasTolerations(override.pods.scheduling.tolerations)) && { |
8298 | 8298 | "tolerations": override.pods.scheduling.tolerations |
8299 | 8299 | } || {"tolerations": null} ), |
8300 | | - ...(requiredAffinity.length || preferredAffinity.length ) && { |
| 8300 | + ...((requiredAffinity && requiredAffinity.length) || (preferredAffinity && preferredAffinity.length) ) && { |
8301 | 8301 | "nodeAffinity": { |
8302 | | - ...(requiredAffinity.length && { |
| 8302 | + ...(requiredAffinity && requiredAffinity.length && { |
8303 | 8303 | "requiredDuringSchedulingIgnoredDuringExecution": { |
8304 | 8304 | "nodeSelectorTerms": requiredAffinity |
8305 | 8305 | } |
8306 | 8306 | }), |
8307 | | - ...(preferredAffinity.length && { |
| 8307 | + ...(preferredAffinity && preferredAffinity.length && { |
8308 | 8308 | "preferredDuringSchedulingIgnoredDuringExecution": preferredAffinity |
8309 | 8309 | }) |
8310 | 8310 | } |
|
0 commit comments