v1alpha1

package
v0.0.0-...-8008f9c Latest Latest
Warning

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

Go to latest
Published: Sep 17, 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/kragniz/tor-controller/pkg/apis/tor +k8s:defaulter-gen=TypeMeta +groupName=tor.k8s.io

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	// Define CRDs for resources
	OnionServiceCRD = v1beta1.CustomResourceDefinition{
		ObjectMeta: metav1.ObjectMeta{
			Name: "onionservices.tor.k8s.io",
		},
		Spec: v1beta1.CustomResourceDefinitionSpec{
			Group:   "tor.k8s.io",
			Version: "v1alpha1",
			Names: v1beta1.CustomResourceDefinitionNames{
				Kind:   "OnionService",
				Plural: "onionservices",
			},
			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{
								"extraConfig": v1beta1.JSONSchemaProps{
									Type: "string",
								},
								"ports": v1beta1.JSONSchemaProps{
									Type: "array",
									Items: &v1beta1.JSONSchemaPropsOrArray{
										Schema: &v1beta1.JSONSchemaProps{
											Type: "object",
											Properties: map[string]v1beta1.JSONSchemaProps{
												"name": v1beta1.JSONSchemaProps{
													Type: "string",
												},
												"publicPort": v1beta1.JSONSchemaProps{
													Type:   "integer",
													Format: "int32",
												},
												"targetPort": v1beta1.JSONSchemaProps{
													Type:   "integer",
													Format: "int32",
												},
											},
											Required: []string{
												"publicPort",
											}},
									},
								},
								"privateKeySecret": v1beta1.JSONSchemaProps{
									Type: "object",
									Properties: map[string]v1beta1.JSONSchemaProps{
										"key": v1beta1.JSONSchemaProps{
											Type: "string",
										},
										"name": v1beta1.JSONSchemaProps{
											Type: "string",
										},
									},
								},
								"selector": v1beta1.JSONSchemaProps{
									Type: "object",
								},
								"version": v1beta1.JSONSchemaProps{
									Type:   "integer",
									Format: "int32",
									Enum:   []v1beta1.JSON{v1beta1.JSON{[]byte{48}}, v1beta1.JSON{[]byte{50}}, v1beta1.JSON{[]byte{51}}},
								},
							},
							Required: []string{
								"version",
							}},
						"status": v1beta1.JSONSchemaProps{
							Type: "object",
							Properties: map[string]v1beta1.JSONSchemaProps{
								"hostname": v1beta1.JSONSchemaProps{
									Type: "string",
								},
								"targetClusterIP": v1beta1.JSONSchemaProps{
									Type: "string",
								},
							},
							Required: []string{
								"hostname",
								"targetClusterIP",
							}},
					},
				},
			},
		},
	}
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "tor.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 OnionService

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

	Spec   OnionServiceSpec   `json:"spec,omitempty"`
	Status OnionServiceStatus `json:"status,omitempty"`
}

OnionService +k8s:openapi-gen=true +kubebuilder:resource:path=onionservices

func (*OnionService) DeepCopy

func (in *OnionService) DeepCopy() *OnionService

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

func (*OnionService) DeepCopyInto

func (in *OnionService) DeepCopyInto(out *OnionService)

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

func (*OnionService) DeepCopyObject

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

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

func (*OnionService) DeploymentName

func (s *OnionService) DeploymentName() string

func (*OnionService) RoleName

func (s *OnionService) RoleName() string

func (*OnionService) ServiceAccountName

func (s *OnionService) ServiceAccountName() string

func (*OnionService) ServiceName

func (s *OnionService) ServiceName() string

type OnionServiceList

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

func (*OnionServiceList) DeepCopy

func (in *OnionServiceList) DeepCopy() *OnionServiceList

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

func (*OnionServiceList) DeepCopyInto

func (in *OnionServiceList) DeepCopyInto(out *OnionServiceList)

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

func (*OnionServiceList) DeepCopyObject

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

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

type OnionServiceSpec

type OnionServiceSpec struct {
	// The list of ports that are exposed by this service.
	// +patchMergeKey=publicPort
	// +patchStrategy=merge
	Ports []ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"publicPort"`

	Selector map[string]string `json:"selector,omitempty"`

	// +optional
	PrivateKeySecret SecretReference `json:"privateKeySecret,omitempty"`

	// +kubebuilder:validation:Enum=0,2,3
	Version int32 `json:"version"`

	// +optional
	ExtraConfig string `json:"extraConfig,omitempty"`
}

OnionServiceSpec defines the desired state of OnionService

func (*OnionServiceSpec) DeepCopy

func (in *OnionServiceSpec) DeepCopy() *OnionServiceSpec

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

func (*OnionServiceSpec) DeepCopyInto

func (in *OnionServiceSpec) DeepCopyInto(out *OnionServiceSpec)

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

func (*OnionServiceSpec) GetVersion

func (s *OnionServiceSpec) GetVersion() int

type OnionServiceStatus

type OnionServiceStatus struct {
	Hostname        string `json:"hostname"`
	TargetClusterIP string `json:"targetClusterIP"`
}

OnionServiceStatus defines the observed state of OnionService

func (*OnionServiceStatus) DeepCopy

func (in *OnionServiceStatus) DeepCopy() *OnionServiceStatus

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

func (*OnionServiceStatus) DeepCopyInto

func (in *OnionServiceStatus) DeepCopyInto(out *OnionServiceStatus)

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

type SecretReference

type SecretReference struct {
	// Name is unique within a namespace to reference a secret resource.
	Name string `json:"name,omitempty"`

	Key string `json:"key,omitempty"`
}

SecretReference represents a Secret Reference

func (*SecretReference) DeepCopy

func (in *SecretReference) DeepCopy() *SecretReference

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

func (*SecretReference) DeepCopyInto

func (in *SecretReference) DeepCopyInto(out *SecretReference)

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

type ServicePort

type ServicePort struct {
	// Optional if only one ServicePort is defined on this service.
	// +optional
	Name string `json:"name,omitempty"`

	// The port that will be exposed by this service.
	PublicPort int32 `json:"publicPort"`

	// Number or name of the port to access on the pods targeted by the service.
	// Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
	// If this is a string, it will be looked up as a named port in the
	// target Pod's container ports. If this is not specified, the value
	// of the 'port' field is used (an identity map).
	// This field is ignored for services with clusterIP=None, and should be
	// omitted or set equal to the 'port' field.
	// More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
	// +optional
	TargetPort int32 `json:"targetPort,omitempty"`
}

func (*ServicePort) DeepCopy

func (in *ServicePort) DeepCopy() *ServicePort

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

func (*ServicePort) DeepCopyInto

func (in *ServicePort) DeepCopyInto(out *ServicePort)

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