...

Source file src/github.com/kvaps/dnsmasq-controller/api/v1beta1/dnsmasqoptions_types.go

Documentation: github.com/kvaps/dnsmasq-controller/api/v1beta1

     1  /*
     2  
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package v1beta1
    18  
    19  import (
    20  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    21  )
    22  
    23  // DnsmasqOption defines option for dnsmasq
    24  type DnsmasqOption struct {
    25  	// +kubebuilder:validation:Enum=dhcp-range;dhcp-host;dhcp-userclass;dhcp-circuitid;dhcp-remoteid;dhcp-subscrid;dhcp-ignore;dhcp-broadcast;mx-host;dhcp-boot;dhcp-option;dhcp-option-force;server;rev-server;local;domain;dhcp-vendorclass;alias;dhcp-vendorclass;srv-host;txt-record;ptr-record;bootp-dynamic;dhcp-mac;dhcp-ignore-names;rebind-domain-ok;dhcp-match;dhcp-name-match;tag-if;naptr-record;dhcp-generate-names;cname;pxe-service;add-mac;dhcp-duid;host-record;caa-record;dns-rr;auth-zone;synth-domain
    26  	Key    string   `json:"key"`
    27  	Values []string `json:"values"`
    28  }
    29  
    30  // DnsmasqOptionsSpec defines the desired state of DnsmasqOptions
    31  type DnsmasqOptionsSpec struct {
    32  	Controller string          `json:"controller,omitempty"`
    33  	Options    []DnsmasqOption `json:"options,omitempty"`
    34  }
    35  
    36  // DnsmasqOptionsStatus defines the observed state of DnsmasqOptions
    37  type DnsmasqOptionsStatus struct {
    38  	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
    39  	// Important: Run "make" to regenerate code after modifying this file
    40  }
    41  
    42  // +kubebuilder:object:root=true
    43  // +kubebuilder:printcolumn:name="Controller",type="string",JSONPath=".spec.controller"
    44  // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
    45  
    46  // DnsmasqOptions is the Schema for the dnsmasqoptions API
    47  type DnsmasqOptions struct {
    48  	metav1.TypeMeta   `json:",inline"`
    49  	metav1.ObjectMeta `json:"metadata,omitempty"`
    50  
    51  	Spec   DnsmasqOptionsSpec   `json:"spec,omitempty"`
    52  	Status DnsmasqOptionsStatus `json:"status,omitempty"`
    53  }
    54  
    55  // +kubebuilder:object:root=true
    56  
    57  // DnsmasqOptionsList contains a list of DnsmasqOptions
    58  type DnsmasqOptionsList struct {
    59  	metav1.TypeMeta `json:",inline"`
    60  	metav1.ListMeta `json:"metadata,omitempty"`
    61  	Items           []DnsmasqOptions `json:"items,omitempty"`
    62  }
    63  
    64  func init() {
    65  	SchemeBuilder.Register(&DnsmasqOptions{}, &DnsmasqOptionsList{})
    66  }
    67  

View as plain text