Skip to content

Add Configured condition to DNS controller - #633

Merged
felix-kaestner merged 2 commits into
ironcore-dev:mainfrom
ObuMan:dns-configured-condition
Oct 14, 2026
Merged

felix-kaestner merged 2 commits into
ironcore-dev:mainfrom
ObuMan:dns-configured-condition

Conversation

@ObuMan

@ObuMan ObuMan commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Extract DNS controller + test changes from branch feat/configured-condition #426

Find error paths in the controller and handle them by setting the Configured condition via conditions.FromError(err).

Testing

Tested against a simulated Cisco N9K-C9300v (n9kv) in Containerlab using the provided DNS sample.

 % kubectl get dns -o wide
 NAME   DOMAIN          DEVICE   ADMIN STATE   READY   CONFIGURED   PAUSED   AGE
 dns    net.cloud.sap   leaf1    Up            True    True         False    41m

 % kubectl get dns.networking.metal.ironcore.dev dns -o yaml
 apiVersion: networking.metal.ironcore.dev/v1alpha1
 kind: DNS
 # ...
 status:
   conditions:
   - lastTransitionTime: "2026-10-12T11:48:28Z"
     message: All conditions are ready
     observedGeneration: 1
     reason: Ready
     status: "True"
     type: Ready
   - lastTransitionTime: "2026-10-12T11:47:25Z"
     message: Configured successfully
     observedGeneration: 1
     reason: Configured
     status: "True"
     type: Configured
   - lastTransitionTime: "2026-10-12T11:48:27Z"
     message: ""
     observedGeneration: 1
     reason: NotPaused
     type: Paused

Also verified the failure path: when the device is reachable but applying the configuration fails, the controller sets Configured=False with the provider error as the message, and Ready is recomputed to False. For example, pointing a name server at a non-existent VRF makes the device reject the Set:

 % kubectl get dns.networking.metal.ironcore.dev dns -o yaml
 # ...
 status:
   conditions:
   - lastTransitionTime: "2026-10-12T12:00:14Z"
     message: One or more conditions are not ready
     observedGeneration: 2
     reason: NotReady
     status: "False"
     type: Ready
   - lastTransitionTime: "2026-10-12T12:00:14Z"
     message: 'gnmiext: failed to perform set rpc: rpc error: code = Internal desc
       = descr:internal processing error [error:operation-failed msg:IP Nameserver
       with source interface config exist Commit Failed]'
     observedGeneration: 2
     reason: Internal
     status: "False"
     type: Configured
   - lastTransitionTime: "2026-10-12T11:56:49Z"
     message: ""
     observedGeneration: 2
     reason: NotPaused
     status: "False"
     type: Paused

@adamtrizuljak-sap

Copy link
Copy Markdown
Contributor

Nice! Please wait for the discussion with @felix-kaestner in #627 regarding error handling of provider.Connect()

@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Oct 13, 2026
@hardikdr hardikdr added this to Roadmap Oct 13, 2026

@adamtrizuljak-sap adamtrizuljak-sap 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.

Looks good. This controller doesn't have additional error cases that need to be considered (see discussion in #627).

Signed-off-by: Vasyl Paliuha <vasyl.paliuha@sap.com>
Signed-off-by: Vasyl Paliuha <vasyl.paliuha@sap.com>
@ObuMan
ObuMan force-pushed the dns-configured-condition branch from d8c0481 to 18558ae Compare October 14, 2026 12:09
@felix-kaestner
felix-kaestner merged commit 744eed0 into ironcore-dev:main Oct 14, 2026
20 of 22 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Oct 14, 2026
lparz1val pushed a commit to lparz1val/network-operator that referenced this pull request Oct 15, 2026
Signed-off-by: Vasyl Paliuha <vasyl.paliuha@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants