-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report criteria
- This bug report is not security related, security issues should be disclosed privately via netbox operator maintainers.
- Existing open issues have been checked and this is not a duplicate.
What happened?
When creating an IpAddressClaim with a tenant which does not exist, an ipAddress resource is generated containing the next available IPAddress from the prefix.
What did you expect to happen?
There should be no IPAddress generated at all since the Tenant does not exist.
How can we reproduce it (as minimally and precisely as possible)?
Apply following cr and an ipaddress resource will be generated containing an ip:
apiVersion: netbox.dev/v1
kind: IpAddressClaim
metadata:
labels:
app.kubernetes.io/name: netbox-operator
app.kubernetes.io/managed-by: kustomize
name: ipaddressclaim-sample-2
spec:
tenant: "non-existant-tenant"
description: "some description"
comments: "your comments"
preserveInNetbox: true
parentPrefix: "2.0.0.0/16"Netbox operator version
Latest from main branch
Netbox operator configuration (command line flags or environment variables)
Followed the instructions from the readme
Relevant log output
IP Addres generated from claim above:
Name: ipaddressclaim-sample-2
Namespace: default
Labels: <none>
Annotations: <none>
API Version: netbox.dev/v1
Kind: IpAddress
Metadata:
Creation Timestamp: 2024-09-05T13:16:10Z
Generation: 1
Owner References:
API Version: netbox.dev/v1
Kind: IpAddressClaim
Name: ipaddressclaim-sample-2
UID: c568f9e5-1964-4f31-aab3-170cac459dea
Resource Version: 5641
UID: 493a998c-3753-4962-9ee1-932738ad0b91
Spec:
Comments: your comments
Custom Fields:
Netbox Operator Restoration Hash: 0e12f7d8e25476025adf6e5dba63c8b60f674c80
Description: some description
Ip Address: 2.0.0.2/32
Preserve In Netbox: true
Tenant: non-existant-tenant
Status:
Conditions:
Last Transition Time: 2024-09-05T13:16:10Z
Message: Failed to reserve IP in NetBox. 2.0.0.2/32
Reason: FailedToReserveIpInNetbox
Status: False
Type: Ready
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedToReserveIpInNetbox 4m ip-address-controller Failed to reserve IP in NetBox. 2.0.0.2/32Anything else we need to know?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working