-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ParentPrefixSelector guide empty docs
- Loading branch information
1 parent
74dea6a
commit 7decd40
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# A guide of `ParentPrefixSelector` in `PrefixClaim` | ||
|
||
There are 2 ways to make a Prefix claim: | ||
- provide a `parentPrefix` | ||
- provide a `parentPrefixSelector` | ||
|
||
In this documentation, we will focus on the `parentPrefixSelector` only. | ||
|
||
# CRD format | ||
|
||
The following is a sample of utilizing the `parentPrefixSelector`: | ||
```bash | ||
apiVersion: netbox.dev/v1 | ||
kind: PrefixClaim | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: netbox-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: prefixclaim-customfields-sample | ||
spec: | ||
tenant: "MY_TENANT" | ||
site: "DM-Akron" | ||
description: "some description" | ||
comments: "your comments" | ||
preserveInNetbox: true | ||
prefixLength: "/31" | ||
parentPrefixSelector: | ||
tenant: "MY_TENANT_2" | ||
site: "DM-Bryon" | ||
environment: "Production" | ||
poolName: "Pool 1" | ||
``` | ||
|
||
## `Spec.tenant` and `Spec.site` | ||
|
||
Please provide the *name*, not the *slug* value | ||
|
||
## `parentPrefixSelector` | ||
|
||
The `parentPrefixSelector` is a key-value map, where all the entries are of data type `<string-string>`. | ||
|
||
The `parentPrefixSelector` is a set of query conditions for selecting a set of prefixes that can be used as the parent prefix. | ||
|
||
The fields that can be used as query conditions in the `parentPrefixSelector` are: | ||
- `tenant` and `site` | ||
- these 2 fields come by design with NetBox, so you do *not* need to create custom fields for them | ||
- please provide the *name*, not the *slug* value | ||
- if either of the value is missing, it will *not* inherit from the tenant and site from the Spec | ||
- custom fields | ||
- the data types tested and supported so far are `string`, `integer`, and `boolean` | ||
- for `boolean` type, please use `true` and `false` as the value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters