v1alpha1

package
v0.0.2-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubernetes-sigs/federation-v2/pkg/apis/multiclusterdns +k8s:defaulter-gen=TypeMeta +groupName=multiclusterdns.federation.k8s.io

Copyright 2018 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	// Define CRDs for resources
	DNSEndpointCRD = v1beta1.CustomResourceDefinition{
		ObjectMeta: metav1.ObjectMeta{
			Name: "dnsendpoints.multiclusterdns.federation.k8s.io",
		},
		Spec: v1beta1.CustomResourceDefinitionSpec{
			Group:   "multiclusterdns.federation.k8s.io",
			Version: "v1alpha1",
			Names: v1beta1.CustomResourceDefinitionNames{
				Kind:   "DNSEndpoint",
				Plural: "dnsendpoints",
			},
			Scope: "Namespaced",
			Validation: &v1beta1.CustomResourceValidation{
				OpenAPIV3Schema: &v1beta1.JSONSchemaProps{
					Type: "object",
					Properties: map[string]v1beta1.JSONSchemaProps{
						"apiVersion": v1beta1.JSONSchemaProps{
							Type: "string",
						},
						"kind": v1beta1.JSONSchemaProps{
							Type: "string",
						},
						"metadata": v1beta1.JSONSchemaProps{
							Type: "object",
						},
						"spec": v1beta1.JSONSchemaProps{
							Type: "object",
							Properties: map[string]v1beta1.JSONSchemaProps{
								"endpoints": v1beta1.JSONSchemaProps{
									Type: "array",
									Items: &v1beta1.JSONSchemaPropsOrArray{
										Schema: &v1beta1.JSONSchemaProps{
											Type: "object",
											Properties: map[string]v1beta1.JSONSchemaProps{
												"dnsName": v1beta1.JSONSchemaProps{
													Type: "string",
												},
												"labels": v1beta1.JSONSchemaProps{
													Type: "object",
												},
												"recordTTL": v1beta1.JSONSchemaProps{
													Type:   "integer",
													Format: "int64",
												},
												"recordType": v1beta1.JSONSchemaProps{
													Type: "string",
												},
												"targets": v1beta1.JSONSchemaProps{
													Type: "array",
													Items: &v1beta1.JSONSchemaPropsOrArray{
														Schema: &v1beta1.JSONSchemaProps{
															Type: "string",
														},
													},
												},
											},
										},
									},
								},
							},
						},
						"status": v1beta1.JSONSchemaProps{
							Type:       "object",
							Properties: map[string]v1beta1.JSONSchemaProps{},
						},
					},
				},
			},
		},
	}
	// Define CRDs for resources
	MultiClusterIngressDNSRecordCRD = v1beta1.CustomResourceDefinition{
		ObjectMeta: metav1.ObjectMeta{
			Name: "multiclusteringressdnsrecords.multiclusterdns.federation.k8s.io",
		},
		Spec: v1beta1.CustomResourceDefinitionSpec{
			Group:   "multiclusterdns.federation.k8s.io",
			Version: "v1alpha1",
			Names: v1beta1.CustomResourceDefinitionNames{
				Kind:   "MultiClusterIngressDNSRecord",
				Plural: "multiclusteringressdnsrecords",
			},
			Scope: "Namespaced",
			Validation: &v1beta1.CustomResourceValidation{
				OpenAPIV3Schema: &v1beta1.JSONSchemaProps{
					Properties: map[string]v1beta1.JSONSchemaProps{
						"apiVersion": v1beta1.JSONSchemaProps{
							Type: "string",
						},
						"kind": v1beta1.JSONSchemaProps{
							Type: "string",
						},
						"metadata": v1beta1.JSONSchemaProps{
							Type: "object",
						},
						"spec": v1beta1.JSONSchemaProps{
							Type: "object",
							Properties: map[string]v1beta1.JSONSchemaProps{
								"hosts": v1beta1.JSONSchemaProps{
									Type: "array",
									Items: &v1beta1.JSONSchemaPropsOrArray{
										Schema: &v1beta1.JSONSchemaProps{
											Type: "string",
										},
									},
								},
								"recordTTL": v1beta1.JSONSchemaProps{
									Type:   "integer",
									Format: "int64",
								},
							},
						},
						"status": v1beta1.JSONSchemaProps{
							Type: "object",
							Properties: map[string]v1beta1.JSONSchemaProps{
								"dns": v1beta1.JSONSchemaProps{
									Type: "array",
									Items: &v1beta1.JSONSchemaPropsOrArray{
										Schema: &v1beta1.JSONSchemaProps{
											Type: "object",
											Properties: map[string]v1beta1.JSONSchemaProps{
												"cluster": v1beta1.JSONSchemaProps{
													Type: "string",
												},
												"loadBalancer": v1beta1.JSONSchemaProps{
													Type:       "object",
													Properties: map[string]v1beta1.JSONSchemaProps{},
												},
											},
										},
									},
								},
							},
						},
					},
				},
			},
			Subresources: &v1beta1.CustomResourceSubresources{
				Status: &v1beta1.CustomResourceSubresourceStatus{},
			},
		},
	}
	// Define CRDs for resources
	MultiClusterServiceDNSRecordCRD = v1beta1.CustomResourceDefinition{
		ObjectMeta: metav1.ObjectMeta{
			Name: "multiclusterservicednsrecords.multiclusterdns.federation.k8s.io",
		},
		Spec: v1beta1.CustomResourceDefinitionSpec{
			Group:   "multiclusterdns.federation.k8s.io",
			Version: "v1alpha1",
			Names: v1beta1.CustomResourceDefinitionNames{
				Kind:   "MultiClusterServiceDNSRecord",
				Plural: "multiclusterservicednsrecords",
			},
			Scope: "Namespaced",
			Validation: &v1beta1.CustomResourceValidation{
				OpenAPIV3Schema: &v1beta1.JSONSchemaProps{
					Properties: map[string]v1beta1.JSONSchemaProps{
						"apiVersion": v1beta1.JSONSchemaProps{
							Type: "string",
						},
						"kind": v1beta1.JSONSchemaProps{
							Type: "string",
						},
						"metadata": v1beta1.JSONSchemaProps{
							Type: "object",
						},
						"spec": v1beta1.JSONSchemaProps{
							Type: "object",
							Properties: map[string]v1beta1.JSONSchemaProps{
								"dnsSuffix": v1beta1.JSONSchemaProps{
									Type: "string",
								},
								"federationName": v1beta1.JSONSchemaProps{
									Type: "string",
								},
								"recordTTL": v1beta1.JSONSchemaProps{
									Type:   "integer",
									Format: "int64",
								},
							},
						},
						"status": v1beta1.JSONSchemaProps{
							Type: "object",
							Properties: map[string]v1beta1.JSONSchemaProps{
								"dns": v1beta1.JSONSchemaProps{
									Type: "array",
									Items: &v1beta1.JSONSchemaPropsOrArray{
										Schema: &v1beta1.JSONSchemaProps{
											Type: "object",
											Properties: map[string]v1beta1.JSONSchemaProps{
												"cluster": v1beta1.JSONSchemaProps{
													Type: "string",
												},
												"loadBalancer": v1beta1.JSONSchemaProps{
													Type:       "object",
													Properties: map[string]v1beta1.JSONSchemaProps{},
												},
												"region": v1beta1.JSONSchemaProps{
													Type: "string",
												},
												"zone": v1beta1.JSONSchemaProps{
													Type: "string",
												},
											},
										},
									},
								},
							},
						},
					},
				},
			},
			Subresources: &v1beta1.CustomResourceSubresources{
				Status: &v1beta1.CustomResourceSubresourceStatus{},
			},
		},
	}
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "multiclusterdns.federation.k8s.io", Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ClusterDNS

type ClusterDNS struct {
	// Cluster name
	Cluster string `json:"cluster,omitempty"`
	// LoadBalancer for the corresponding service
	LoadBalancer corev1.LoadBalancerStatus `json:"loadBalancer,omitempty"`
	// Zone to which the cluster belongs
	Zone string `json:"zone,omitempty"`
	// Region to which the cluster belongs
	Region string `json:"region,omitempty"`
}

ClusterDNS defines the observed status of LoadBalancer within a cluster.

func (*ClusterDNS) DeepCopy

func (in *ClusterDNS) DeepCopy() *ClusterDNS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDNS.

func (*ClusterDNS) DeepCopyInto

func (in *ClusterDNS) DeepCopyInto(out *ClusterDNS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterIngressDNS added in v0.0.2

type ClusterIngressDNS struct {
	// Cluster name
	Cluster string `json:"cluster,omitempty"`
	// LoadBalancer for the corresponding ingress controller
	LoadBalancer corev1.LoadBalancerStatus `json:"loadBalancer,omitempty"`
}

ClusterIngressDNS defines the observed status of Ingress within a cluster.

func (*ClusterIngressDNS) DeepCopy added in v0.0.2

func (in *ClusterIngressDNS) DeepCopy() *ClusterIngressDNS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterIngressDNS.

func (*ClusterIngressDNS) DeepCopyInto added in v0.0.2

func (in *ClusterIngressDNS) DeepCopyInto(out *ClusterIngressDNS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DNSEndpoint added in v0.0.2

type DNSEndpoint struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DNSEndpointSpec   `json:"spec,omitempty"`
	Status DNSEndpointStatus `json:"status,omitempty"`
}

DNSEndpoint +k8s:openapi-gen=true +kubebuilder:resource:path=dnsendpoints

func (*DNSEndpoint) DeepCopy added in v0.0.2

func (in *DNSEndpoint) DeepCopy() *DNSEndpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSEndpoint.

func (*DNSEndpoint) DeepCopyInto added in v0.0.2

func (in *DNSEndpoint) DeepCopyInto(out *DNSEndpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DNSEndpoint) DeepCopyObject added in v0.0.2

func (in *DNSEndpoint) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DNSEndpointList added in v0.0.2

type DNSEndpointList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DNSEndpoint `json:"items"`
}

func (*DNSEndpointList) DeepCopy added in v0.0.2

func (in *DNSEndpointList) DeepCopy() *DNSEndpointList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSEndpointList.

func (*DNSEndpointList) DeepCopyInto added in v0.0.2

func (in *DNSEndpointList) DeepCopyInto(out *DNSEndpointList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DNSEndpointList) DeepCopyObject added in v0.0.2

func (in *DNSEndpointList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DNSEndpointSpec added in v0.0.2

type DNSEndpointSpec struct {
	Endpoints []*Endpoint `json:"endpoints,omitempty"`
}

DNSEndpointSpec defines the desired state of DNSEndpoint

func (*DNSEndpointSpec) DeepCopy added in v0.0.2

func (in *DNSEndpointSpec) DeepCopy() *DNSEndpointSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSEndpointSpec.

func (*DNSEndpointSpec) DeepCopyInto added in v0.0.2

func (in *DNSEndpointSpec) DeepCopyInto(out *DNSEndpointSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DNSEndpointStatus added in v0.0.2

type DNSEndpointStatus struct {
}

DNSEndpointStatus defines the observed state of DNSEndpoint

func (*DNSEndpointStatus) DeepCopy added in v0.0.2

func (in *DNSEndpointStatus) DeepCopy() *DNSEndpointStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSEndpointStatus.

func (*DNSEndpointStatus) DeepCopyInto added in v0.0.2

func (in *DNSEndpointStatus) DeepCopyInto(out *DNSEndpointStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Endpoint added in v0.0.2

type Endpoint struct {
	// The hostname of the DNS record
	DNSName string `json:"dnsName,omitempty"`
	// The targets the DNS record points to
	Targets Targets `json:"targets,omitempty"`
	// RecordType type of record, e.g. CNAME, A, SRV, TXT etc
	RecordType string `json:"recordType,omitempty"`
	// TTL for the record in seconds
	RecordTTL TTL `json:"recordTTL,omitempty"`
	// Labels stores labels defined for the Endpoint
	Labels Labels `json:"labels,omitempty"`
}

Endpoint is a high-level way of a connection between a service and an IP

func (*Endpoint) DeepCopy added in v0.0.2

func (in *Endpoint) DeepCopy() *Endpoint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.

func (*Endpoint) DeepCopyInto added in v0.0.2

func (in *Endpoint) DeepCopyInto(out *Endpoint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Labels added in v0.0.2

type Labels map[string]string

Labels store metadata related to the endpoint it is then stored in a persistent storage via serialization

func (Labels) DeepCopy added in v0.0.2

func (in Labels) DeepCopy() Labels

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Labels.

func (Labels) DeepCopyInto added in v0.0.2

func (in Labels) DeepCopyInto(out *Labels)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MultiClusterIngressDNSRecord added in v0.0.2

type MultiClusterIngressDNSRecord struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   MultiClusterIngressDNSRecordSpec   `json:"spec,omitempty"`
	Status MultiClusterIngressDNSRecordStatus `json:"status,omitempty"`
}

MultiClusterIngressDNSRecord +k8s:openapi-gen=true +kubebuilder:resource:path=multiclusteringressdnsrecords +kubebuilder:subresource:status

func (*MultiClusterIngressDNSRecord) DeepCopy added in v0.0.2

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterIngressDNSRecord.

func (*MultiClusterIngressDNSRecord) DeepCopyInto added in v0.0.2

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MultiClusterIngressDNSRecord) DeepCopyObject added in v0.0.2

func (in *MultiClusterIngressDNSRecord) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MultiClusterIngressDNSRecordList added in v0.0.2

type MultiClusterIngressDNSRecordList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []MultiClusterIngressDNSRecord `json:"items"`
}

func (*MultiClusterIngressDNSRecordList) DeepCopy added in v0.0.2

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterIngressDNSRecordList.

func (*MultiClusterIngressDNSRecordList) DeepCopyInto added in v0.0.2

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MultiClusterIngressDNSRecordList) DeepCopyObject added in v0.0.2

func (in *MultiClusterIngressDNSRecordList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MultiClusterIngressDNSRecordSpec added in v0.0.2

type MultiClusterIngressDNSRecordSpec struct {
	// Host from the IngressRule in Cluster Ingress Spec
	Hosts []string `json:"hosts,omitempty"`
	// RecordTTL is the TTL in seconds for DNS records created for the Ingress, if omitted a default would be used
	RecordTTL TTL `json:"recordTTL,omitempty"`
}

MultiClusterIngressDNSRecordSpec defines the desired state of MultiClusterIngressDNSRecord

func (*MultiClusterIngressDNSRecordSpec) DeepCopy added in v0.0.2

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterIngressDNSRecordSpec.

func (*MultiClusterIngressDNSRecordSpec) DeepCopyInto added in v0.0.2

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MultiClusterIngressDNSRecordStatus added in v0.0.2

type MultiClusterIngressDNSRecordStatus struct {
	// Array of Ingress Controller LoadBalancers
	DNS []ClusterIngressDNS `json:"dns,omitempty"`
}

MultiClusterIngressDNSRecordStatus defines the observed state of MultiClusterIngressDNSRecord

func (*MultiClusterIngressDNSRecordStatus) DeepCopy added in v0.0.2

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterIngressDNSRecordStatus.

func (*MultiClusterIngressDNSRecordStatus) DeepCopyInto added in v0.0.2

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MultiClusterServiceDNSRecord

type MultiClusterServiceDNSRecord struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   MultiClusterServiceDNSRecordSpec   `json:"spec,omitempty"`
	Status MultiClusterServiceDNSRecordStatus `json:"status,omitempty"`
}

MultiClusterServiceDNSRecord +k8s:openapi-gen=true +kubebuilder:resource:path=multiclusterservicednsrecords +kubebuilder:subresource:status

func (*MultiClusterServiceDNSRecord) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterServiceDNSRecord.

func (*MultiClusterServiceDNSRecord) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MultiClusterServiceDNSRecord) DeepCopyObject

func (in *MultiClusterServiceDNSRecord) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MultiClusterServiceDNSRecordList

type MultiClusterServiceDNSRecordList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []MultiClusterServiceDNSRecord `json:"items"`
}

func (*MultiClusterServiceDNSRecordList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterServiceDNSRecordList.

func (*MultiClusterServiceDNSRecordList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MultiClusterServiceDNSRecordList) DeepCopyObject

func (in *MultiClusterServiceDNSRecordList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MultiClusterServiceDNSRecordSpec

type MultiClusterServiceDNSRecordSpec struct {
	// FederationName is the name of the federation to which the corresponding federated service belongs
	FederationName string `json:"federationName,omitempty"`
	// DNSSuffix is the suffix (domain) to append to DNS names
	DNSSuffix string `json:"dnsSuffix,omitempty"`
	// RecordTTL is the TTL in seconds for DNS records created for this Service, if omitted a default would be used
	RecordTTL TTL `json:"recordTTL,omitempty"`
}

MultiClusterServiceDNSRecordSpec defines the desired state of MultiClusterServiceDNSRecord

func (*MultiClusterServiceDNSRecordSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterServiceDNSRecordSpec.

func (*MultiClusterServiceDNSRecordSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MultiClusterServiceDNSRecordStatus

type MultiClusterServiceDNSRecordStatus struct {
	DNS []ClusterDNS `json:"dns,omitempty"`
}

MultiClusterServiceDNSRecordStatus defines the observed state of MultiClusterServiceDNSRecord

func (*MultiClusterServiceDNSRecordStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterServiceDNSRecordStatus.

func (*MultiClusterServiceDNSRecordStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TTL added in v0.0.2

type TTL int64

TTL is a structure defining the TTL of a DNS record

type Targets added in v0.0.2

type Targets []string

Targets is a representation of a list of targets for an endpoint.

func (Targets) DeepCopy added in v0.0.2

func (in Targets) DeepCopy() Targets

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Targets.

func (Targets) DeepCopyInto added in v0.0.2

func (in Targets) DeepCopyInto(out *Targets)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL