Skip to content

[Epic] Topology and affinity settings for applications in Cozystack #1949

Open

Description

Summary

As a Cozystack user, I want to configure topology and affinity settings for managed applications, so that I can control how replicas are scheduled across availability zones and nodes.

Problem

Currently, managed applications (PostgreSQL, Redis, Kubernetes clusters, etc.) rely on the default kube-scheduler configuration for pod placement. Users have no way to explicitly control:

  • Whether replicas should be spread across availability zones (for HA)
  • Whether replicas should be co-located in a single zone (for lower latency)
  • Node affinity preferences based on labels

Proposed Solution

Add optional topology or affinity configuration to all managed application specs, allowing users to specify:

  • Topology spread constraints - e.g., spread across zones, or keep in single zone
  • Node affinity - e.g., prefer nodes with specific labels
  • Pod anti-affinity - e.g., avoid co-locating replicas on the same node

Example configuration:

spec:
  topologyPolicy: spreadAcrossZones  # or: singleZone, spreadAcrossNodes
  nodeSelector:
    disktype: ssd

Applications to Update

  • PostgreSQL
  • Redis
  • MongoDB
  • Kubernetes (worker nodes)
  • Virtual Machines
  • Other stateful applications

Related

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature
    on Feb 2, 2026
  2. github-actions commented on May 2, 2026

    @github-actions

    This issue has had no activity for 60 days and was marked lifecycle/stale.
    It will be closed in 14 days unless commented or labelled lifecycle/frozen.

  3. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale
    on May 2, 2026
  4. dosubot commented on Aug 1, 2026

    @dosubot

    Hi, Timofei Larkin (@lllamnyp). I'm Dosu, and I'm helping the cozystack team manage their backlog and am marking this issue as stale.

    Recap

    • You requested optional topology and affinity controls for Cozystack-managed applications so workloads can be spread across zones and nodes.
    • The proposal includes topology spread constraints, node affinity, and pod anti-affinity for services like PostgreSQL, Redis, MongoDB, Kubernetes workers, VMs, and other stateful apps.
    • The request appears to align with the existing Elasticsearch topology spread policy, but no implementation or further follow-up has been recorded.
    • The issue has already received a stale notice after a period of inactivity.

    Next Steps

    • If this is still relevant on the latest version of the cozystack repository, please comment here to keep the discussion open.
    • Otherwise, this issue will be automatically closed in 7 days.

    Thanks for your understanding and contribution.

  5. added
    epicA large development increment that brings definite value to Cozystack users
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete
    lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicA large development increment that brings definite value to Cozystack userskind/featureCategorizes issue or PR as related to a new featurelifecycle/frozenIndicates that an issue or PR should not be auto-closed due to stalenesspriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions