Skip to content

Extract availabilityZoneLiveCount from Ev2 central config - #329

Merged
openshift-merge-bot[bot] merged 1 commit into
mainfrom
goberlec/ev2-az-live-count
Sep 4, 2026
Merged

Extract availabilityZoneLiveCount from Ev2 central config#329
openshift-merge-bot[bot] merged 1 commit into
mainfrom
goberlec/ev2-az-live-count

Conversation

@geoberle

@geoberle Gerd Oberlechner (geoberle) commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add availabilityZoneLiveCount to the sanitized Ev2 region config, alongside the existing availabilityZoneCount, so we know the real (live) number of AZs in a region, not just the planned count.
  • Lowercase region name keys during sanitization — the central config has a couple of regions with inconsistent casing (Finlandcentral, Netherlandsnortheast) which broke the lowercase convention used everywhere else.
  • Regenerated config/ev2config/config.yaml for both the public and ff clouds from fresh Ev2 central config exports.

Test plan

  • make test
  • make lint

We need the real (live) AZ count per region, not just the planned
count, so sanitize it into config.yaml alongside availabilityZoneCount,
for both the public and ff clouds.
Also lowercase region name keys during sanitization, since the source
central config has a couple of regions with inconsistent casing
(Finlandcentral, Netherlandsnortheast) and region keys must stay
lowercase to match Azure ARM region naming.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The embedded Ev2 config YAML adds availabilityZoneLiveCount for public but not for ff, which will break template execution for ff contexts if the new key is referenced due to missingkey=error.

Pull request overview

This PR updates the Ev2 config sanitization pipeline to surface a new per-region field (availabilityZoneLiveCount) representing the live (actual) number of availability zones, and normalizes region name keys to lowercase to match existing conventions and avoid casing inconsistencies from the central config export.

Changes:

  • Added availabilityZoneLiveCount to the sanitized region config output and regenerated the public cloud Ev2 config YAML accordingly.
  • Lowercased sanitized region map keys (region.Name) during sanitization to enforce consistent lowercase region identifiers.
  • Updated the embedded Ev2 config YAML (config/ev2config/config.yaml) for public with the refreshed central config export.
File summaries
File Description
config/ev2config/sanitizer/sanitizedconfig.go Extends sanitized region schema with availabilityZoneLiveCount.
config/ev2config/sanitizer/sanitize.go Populates the new field and lowercases region name keys during sanitization.
config/ev2config/config.yaml Regenerates public region entries to include availabilityZoneLiveCount and updated region keys/data.
Review details

Suppressed comments (1)

config/ev2config/config.yaml:115

  • availabilityZoneLiveCount is added for public regions, but the ff cloud region entries earlier in this same file still do not define availabilityZoneLiveCount. Because config preprocessing executes templates with missingkey=error, any template that starts using .availabilityZoneLiveCount will fail for ff contexts due to the missing key. To keep the schema consistent across clouds, add availabilityZoneLiveCount to all ff regions as well (even if temporarily equal to availabilityZoneCount until a refreshed central config export is available).
            tenantid: 33e01921-4d64-4f8c-a055-5bdaffd5e33d
            tenantname: msazurecloud
      geneva:
        actions:
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 4, 2026 17:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are additive, consistent with existing config consumption patterns, and appear correctly propagated into the regenerated embedded Ev2 config.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@stevekuznetsov

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@bennerv

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bennerv, geoberle, stevekuznetsov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [geoberle,stevekuznetsov]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 466f2f3 into main Sep 4, 2026
4 checks passed
@openshift-merge-bot
openshift-merge-bot Bot deleted the goberlec/ev2-az-live-count branch September 4, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants