Skip to content

Add capi ipam support#67

Merged
defo89 merged 13 commits intomainfrom
ipam
Mar 17, 2025
Merged

Add capi ipam support#67
defo89 merged 13 commits intomainfrom
ipam

Conversation

@SzymonSAP
Copy link
Copy Markdown
Contributor

@SzymonSAP SzymonSAP commented Mar 3, 2025

Proposed Changes

  • There are ipamConfig and metadata fields added to IroncoreMetalMachineSpec
  • For each ipamConfig there is created an IPAddressClaim
  • There is a new file added to an ignition which contains metadata and IP addresses
  • When machine is deleted the IPAddressClaim is deleted
  • Tilt is updated to work with capi ipam
  • Tests for creation of an ignition are added

Fixes #66

@SzymonSAP
Copy link
Copy Markdown
Contributor Author

SzymonSAP commented Mar 6, 2025

Now there is a section:

{
    "storage": {
        "files": [
            ...,
            {
                "contents": {
                    "inline": "{\"bond\":{\"gateway\":\"10.10.10.1\",\"ip\":\"10.10.10.8\",\"prefix\":24},\"foo\":\"bar\"}"
                },
                "mode": 420,
                "path": "/var/lib/metal-cloud-config/metadata"
            }
        ]
    },
    ...
}

present in ignition-... secret when run tilt up.

@SzymonSAP SzymonSAP marked this pull request as ready for review March 7, 2025 07:54
@github-actions github-actions bot added size/XL and removed size/L labels Mar 11, 2025
@defo89
Copy link
Copy Markdown
Contributor

defo89 commented Mar 11, 2025

it seems we are creating an empty file in case no metadata or no IP is claimed. Should we just don't create anything in this case?

      {
        "contents": {
          "inline": "{}"
        },
        "mode": 420,
        "path": "/var/lib/metal-cloud-config/metadata"
      }

@SzymonSAP SzymonSAP requested a review from defo89 March 12, 2025 08:29
Copy link
Copy Markdown
Contributor

@defo89 defo89 left a comment

Choose a reason for hiding this comment

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

looks good, thanks Szymon!

@defo89 defo89 merged commit 3139ccf into main Mar 17, 2025
8 checks passed
@defo89 defo89 deleted the ipam branch March 17, 2025 14:58
@SzymonSAP SzymonSAP self-assigned this Apr 14, 2025
@hardikdr hardikdr added the area/metal-automation Automation processes within the Metal project. label May 4, 2025
@hardikdr hardikdr added this to Roadmap Jun 26, 2025
@hardikdr hardikdr moved this to Done in Roadmap Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change area/metal-automation Automation processes within the Metal project. size/XL

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add IPAM support

3 participants