Skip to content

Conversation

@tkelloggcribl
Copy link

@tkelloggcribl tkelloggcribl commented Apr 16, 2025

Pre-release versions for EKS are not respecting version constraints which means pre-release versions that are higher than 1.18 are not rendering topology constraints in deployment.yaml.

This change fixes that by comparing the semantic versioning before the pre-release version.

Description

We introduce a small change that allows semverCompare to parse only the first major|minor|patch values.

Testing

  • Add topologySpreadConstraints to values.yaml:

topologySpreadConstraints:
  - maxSkew: 1
    topologyKey: kubernetes.io/hostname
    whenUnsatisfiable: DoNotSchedule
    labelSelector:
      matchLabels:
        app.kubernetes.io/name: openfga

  • Setup environment:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency update
  • Test
helm template openfga . --kube-version "v1.31.6-eks-bc803b4" #  renders topologySpreadConstraints
helm template openfga . --kube-version "v1.31.6"  # renders
helm template openfga . --kube-version "v1.31"  # renders
helm template openfga . --kube-version "v1"  # does not render
helm template openfga . --kube-version "v1.18" # renders
helm template openfga . --kube-version "v1.17"  # does not render
helm template openfga . --kube-version "1.18" # renders

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@tkelloggcribl tkelloggcribl requested review from a team as code owners April 16, 2025 16:32
@linux-foundation-easycla
Copy link

CLA Not Signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant