|
| 1 | +package v1beta1 |
| 2 | + |
| 3 | +/* |
| 4 | +Copyright 2021-2025 The k8gb Contributors. |
| 5 | +
|
| 6 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +you may not use this file except in compliance with the License. |
| 8 | +You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | +Unless required by applicable law or agreed to in writing, software |
| 13 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +See the License for the specific language governing permissions and |
| 16 | +limitations under the License. |
| 17 | +
|
| 18 | +Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic |
| 19 | +*/ |
| 20 | + |
| 21 | +import ( |
| 22 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 23 | +) |
| 24 | + |
| 25 | +// ZoneDelegationSpec defines the desired state of ZoneDelegation |
| 26 | + |
| 27 | +type ZoneDelegationSpec struct { |
| 28 | + // LoadBalancedZone is the DNS zone managed by this ZoneDelegation |
| 29 | + LoadBalancedZone string `json:"loadBalancedZone"` |
| 30 | + |
| 31 | + // ParentZone is the zone under which this load-balanced zone is delegated |
| 32 | + ParentZone string `json:"parentZone"` |
| 33 | + |
| 34 | + // DNSZoneNegTTL specifies the negative TTL for the DNS zone (in seconds) |
| 35 | + DNSZoneNegTTL int `json:"dnsZoneNegTTL"` |
| 36 | +} |
| 37 | + |
| 38 | +// ZoneDelegationStatus defines the observed state of ZoneDelegation |
| 39 | +type ZoneDelegationStatus struct { |
| 40 | + // DNSServers lists the authoritative DNS servers for the delegated zone |
| 41 | + DNSServers []DNSServer `json:"dnsServers,omitempty"` |
| 42 | +} |
| 43 | + |
| 44 | +// DNSServer represents a single DNS server for a zone delegation |
| 45 | +type DNSServer struct { |
| 46 | + // Name of the DNS server (FQDN) |
| 47 | + Name string `json:"name"` |
| 48 | + |
| 49 | + // Address of the DNS server (IPv4 or IPv6) |
| 50 | + Address string `json:"address"` |
| 51 | +} |
| 52 | + |
| 53 | +// ZoneDelegation is the Schema for the zonedelegations API |
| 54 | +// +kubebuilder:object:root=true |
| 55 | +// +kubebuilder:subresource:status |
| 56 | +// +kubebuilder:resource:scope=Cluster,shortName=zd |
| 57 | +// +kubebuilder:printcolumn:name="LoadBalancedZone",type=string,JSONPath=`.spec.loadBalancedZone` |
| 58 | +// +kubebuilder:printcolumn:name="ParentZone",type=string,JSONPath=`.spec.parentZone` |
| 59 | +// +kubebuilder:printcolumn:name="NegTTL",type=integer,JSONPath=`.spec.dnsZoneNegTTL` |
| 60 | +type ZoneDelegation struct { |
| 61 | + metav1.TypeMeta `json:",inline"` |
| 62 | + metav1.ObjectMeta `json:"metadata,omitempty"` |
| 63 | + |
| 64 | + Spec ZoneDelegationSpec `json:"spec,omitempty"` |
| 65 | + Status ZoneDelegationStatus `json:"status,omitempty"` |
| 66 | +} |
| 67 | + |
| 68 | +// +kubebuilder:object:root=true |
| 69 | + |
| 70 | +// ZoneDelegationList contains a list of ZoneDelegation |
| 71 | +type ZoneDelegationList struct { |
| 72 | + metav1.TypeMeta `json:",inline"` |
| 73 | + metav1.ListMeta `json:"metadata,omitempty"` |
| 74 | + Items []ZoneDelegation `json:"items"` |
| 75 | +} |
0 commit comments