Skip to content

Conversation

@xkonni
Copy link
Contributor

@xkonni xkonni commented Dec 10, 2025

NetworkCheck indicates the network configuration validation status.
Possible values: Unknown/Pass/Fail, default Unknown.

Proposed Changes

  • add a networkCheck field to the servers crd

Fixes #

Allows an inventory check to compare the network definitions in netbox with the information in the crd and report on the outcome

NetworkCheck indicates the network configuration validation status.
Possible values: Unknown/Pass/Fail, default Unknown.
// +kubebuilder:validation:Enum=Pass;Fail;Unknown
// +kubebuilder:default=Unknown
// +optional
NetworkCheck string `json:"networkCheck,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Who exactly should react on changes to that field? Also this looks like something which is better kept in the status.conditions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's like a flag to check after buildup, reconfiguration. It will also be present in greenhouse/prometheus.

I agree that status.conditions is a better place.

Copy link
Member

Choose a reason for hiding this comment

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

What we are doing on our side is setting lables/annotations indicating that the Server is ready for consumption.

Copy link
Member

Choose a reason for hiding this comment

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

An idiomatic way of doing things like that would be e.g.:

Your controller which talks to netbox writes:

my-operator.io/network-validation-result: success

Then the ServerReconciler could populate e.g. the conditions slice with a corresponding Condition.

Alternatively we can define a dedicated substruct in the status for that e.g.:

status:
  state: Available
  conditions:
    - type: Ready
      # ... other fields ...

  # Managed by some external component
  networkConnectivity:
    status: "Unknown"  # "Ready", "Failure", "Checking"
    lastUpdateTime: "2025-12-10T12:00:00Z"
    message: "Awaiting connectivity check from external service."

The external component should have only PATCH RBAC permissions on the Server resources.

@afritzler
Copy link
Member

Can you please regenerate the Helm chart files via make helm.

@afritzler afritzler changed the title add networkCheck to servers crd Add network connectivity information to Server status Dec 10, 2025
@afritzler afritzler added the enhancement New feature or request label Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants