Skip to content

Commit

Permalink
Merge pull request #285 from omersch381/add_ns_records_api_fields
Browse files Browse the repository at this point in the history
Add NsRecords API fields under designateAPI
  • Loading branch information
openshift-merge-bot[bot] authored Feb 14, 2025
2 parents 7fc73e6 + 4840fb9 commit 962a5cb
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
20 changes: 20 additions & 0 deletions api/bases/designate.openstack.org_designates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,26 @@ spec:
description: NodeSelector to target subset of worker nodes running
this service
type: object
nsRecords:
description: NSRecords contains the list of nameserver records for
the Designate pool
items:
description: DesignateNSRecord defines a DNS nameserver record
properties:
hostname:
description: Hostname of the nameserver
minLength: 1
type: string
priority:
description: Priority of the nameserver
minimum: 1
type: integer
required:
- hostname
- priority
type: object
type: array
x-kubernetes-list-type: atomic
passwordSelectors:
default:
service: DesignatePassword
Expand Down
18 changes: 18 additions & 0 deletions api/v1beta1/designate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@ type DesignateSpec struct {
DesignateUnbound DesignateUnboundSpec `json:"designateUnbound"`
}

// DesignateNSRecord defines a DNS nameserver record
type DesignateNSRecord struct {
// Hostname of the nameserver
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
Hostname string `json:"hostname"`

// Priority of the nameserver
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum=1
Priority int `json:"priority"`
}

// DesignateSpecBase -
type DesignateSpecBase struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
Expand Down Expand Up @@ -204,6 +217,11 @@ type DesignateSpecBase struct {
// TopologyRef to apply the Topology defined by the associated CR referenced
// by name
TopologyRef *topologyv1.TopoRef `json:"topologyRef,omitempty"`

// +kubebuilder:validation:Optional
// +listType=atomic
// NSRecords contains the list of nameserver records for the Designate pool
NSRecords []DesignateNSRecord `json:"nsRecords,omitempty"`
}

// DesignateStatus defines the observed state of Designate
Expand Down
20 changes: 20 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

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

20 changes: 20 additions & 0 deletions config/crd/bases/designate.openstack.org_designates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,26 @@ spec:
description: NodeSelector to target subset of worker nodes running
this service
type: object
nsRecords:
description: NSRecords contains the list of nameserver records for
the Designate pool
items:
description: DesignateNSRecord defines a DNS nameserver record
properties:
hostname:
description: Hostname of the nameserver
minLength: 1
type: string
priority:
description: Priority of the nameserver
minimum: 1
type: integer
required:
- hostname
- priority
type: object
type: array
x-kubernetes-list-type: atomic
passwordSelectors:
default:
service: DesignatePassword
Expand Down

0 comments on commit 962a5cb

Please sign in to comment.