Skip to content

Centralise service resource limits #269

@accuser

Description

@accuser

Summary

Both environments define local.services maps in their respective locals.tf files with CPU and memory allocations per service. Shared services (e.g., prometheus, coredns) have identical limits in both places.

Current State

  • environments/iapetus/locals.tf — defines resource limits for ~10 services
  • environments/cluster01/locals.tf — defines resource limits for ~12 services
  • Overlapping services have identical values (e.g., prometheus: 2 CPU / 2GB, coredns: 1 CPU / 128MB)

Considerations

Some divergence is intentional — iapetus prometheus aggregates federation data and may need different resources than a cluster01 local prometheus. A centralised approach should allow per-environment overrides.

Options

  1. Shared locals file — Extract common service definitions to a symlinked file, with environment-specific overrides via merge()
  2. Defaults in module variables — Set sensible defaults for CPU/memory in each module's variables.tf so environments only specify overrides
  3. Leave as-is — The duplication is small and allows full per-environment control

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions