Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions go/nautobotop/api/v1alpha1/config_maps.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package v1alpha1

// ConfigMapRef defines a reference to a specific ConfigMap
type ConfigMapRef struct {
// Name of this config set (logical name)
Name string `json:"name"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing this Name fields as it's dead weight. It adds a required field to the CRD that users have to fill in but the operator never reads.
It creates confusion too, since both ConfigMapRef.Name and ConfigMapRef.ConfigMapSelector.Name exist as "name" at different nesting levels in the YAML.


// The name of the ConfigMap resource being referred to
ConfigMapSelector ConfigMapKeySelector `json:"configMapSelector"`
}
Expand Down
3 changes: 3 additions & 0 deletions go/nautobotop/api/v1alpha1/nautobot_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ type NautobotSpec struct {
RackGroupRef []ConfigMapRef `json:"rackGroupRef,omitempty"`
RackRef []ConfigMapRef `json:"rackRef,omitempty"`
VlanGroupRef []ConfigMapRef `json:"vlanGroupRef,omitempty"`
ClusterTypeRef []ConfigMapRef `json:"clusterTypeRef,omitempty"`
ClusterGroupRef []ConfigMapRef `json:"clusterGroupRef,omitempty"`
ClusterRef []ConfigMapRef `json:"clusterRef,omitempty"`
NamespaceRef []ConfigMapRef `json:"namespaceRef,omitempty"`
}

Expand Down
21 changes: 21 additions & 0 deletions go/nautobotop/api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 100 additions & 24 deletions go/nautobotop/config/crd/bases/sync.rax.io_nautobots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,81 @@ spec:
cacheMaxSize:
default: 70000
type: integer
clusterGroupRef:
items:
description: ConfigMapRef defines a reference to a specific ConfigMap
properties:
configMapSelector:
description: The name of the ConfigMap resource being referred
to
properties:
key:
description: The key in the ConfigMap data
type: string
name:
description: The name of the ConfigMap
minLength: 1
type: string
namespace:
description: The namespace where the ConfigMap resides
type: string
required:
- name
type: object
required:
- configMapSelector
type: object
type: array
clusterRef:
items:
description: ConfigMapRef defines a reference to a specific ConfigMap
properties:
configMapSelector:
description: The name of the ConfigMap resource being referred
to
properties:
key:
description: The key in the ConfigMap data
type: string
name:
description: The name of the ConfigMap
minLength: 1
type: string
namespace:
description: The namespace where the ConfigMap resides
type: string
required:
- name
type: object
required:
- configMapSelector
type: object
type: array
clusterTypeRef:
items:
description: ConfigMapRef defines a reference to a specific ConfigMap
properties:
configMapSelector:
description: The name of the ConfigMap resource being referred
to
properties:
key:
description: The key in the ConfigMap data
type: string
name:
description: The name of the ConfigMap
minLength: 1
type: string
namespace:
description: The namespace where the ConfigMap resides
type: string
required:
- name
type: object
required:
- configMapSelector
type: object
type: array
deviceTypeRef:
items:
description: ConfigMapRef defines a reference to a specific ConfigMap
Expand All @@ -63,12 +138,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
isEnabled:
Expand All @@ -95,12 +166,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
locationTypesRef:
Expand All @@ -124,12 +191,33 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
namespaceRef:
items:
description: ConfigMapRef defines a reference to a specific ConfigMap
properties:
configMapSelector:
description: The name of the ConfigMap resource being referred
to
properties:
key:
description: The key in the ConfigMap data
type: string
name:
description: The name of the ConfigMap
minLength: 1
type: string
namespace:
description: The namespace where the ConfigMap resides
type: string
required:
- name
type: object
required:
- configMapSelector
type: object
type: array
nautobotSecretRef:
Expand Down Expand Up @@ -203,12 +291,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
rackRef:
Expand All @@ -232,12 +316,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
requeueAfter:
Expand Down Expand Up @@ -267,12 +347,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
type: object
Expand Down
99 changes: 75 additions & 24 deletions go/nautobotop/helm/crds/clients.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,81 @@ spec:
cacheMaxSize:
default: 70000
type: integer
clusterGroupRef:
items:
description: ConfigMapRef defines a reference to a specific ConfigMap
properties:
configMapSelector:
description: The name of the ConfigMap resource being referred
to
properties:
key:
description: The key in the ConfigMap data
type: string
name:
description: The name of the ConfigMap
minLength: 1
type: string
namespace:
description: The namespace where the ConfigMap resides
type: string
required:
- name
type: object
required:
- configMapSelector
type: object
type: array
clusterRef:
items:
description: ConfigMapRef defines a reference to a specific ConfigMap
properties:
configMapSelector:
description: The name of the ConfigMap resource being referred
to
properties:
key:
description: The key in the ConfigMap data
type: string
name:
description: The name of the ConfigMap
minLength: 1
type: string
namespace:
description: The namespace where the ConfigMap resides
type: string
required:
- name
type: object
required:
- configMapSelector
type: object
type: array
clusterTypeRef:
items:
description: ConfigMapRef defines a reference to a specific ConfigMap
properties:
configMapSelector:
description: The name of the ConfigMap resource being referred
to
properties:
key:
description: The key in the ConfigMap data
type: string
name:
description: The name of the ConfigMap
minLength: 1
type: string
namespace:
description: The namespace where the ConfigMap resides
type: string
required:
- name
type: object
required:
- configMapSelector
type: object
type: array
deviceTypeRef:
items:
description: ConfigMapRef defines a reference to a specific ConfigMap
Expand All @@ -63,12 +138,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
isEnabled:
Expand All @@ -95,12 +166,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
locationTypesRef:
Expand All @@ -124,12 +191,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
nautobotSecretRef:
Expand Down Expand Up @@ -203,12 +266,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
rackRef:
Expand All @@ -232,12 +291,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
requeueAfter:
Expand Down Expand Up @@ -267,12 +322,8 @@ spec:
required:
- name
type: object
name:
description: Name of this config set (logical name)
type: string
required:
- configMapSelector
- name
type: object
type: array
type: object
Expand Down
Loading
Loading