v1beta2

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the decco v1 API group +kubebuilder:object:generate=true +groupName=decco.platform9.com

Index

Constants

View Source
const (
	AppPhaseNone     AppPhase = ""
	AppPhaseCreating          = "Creating"
	AppPhaseActive            = "Active"
	AppPhaseFailed            = "Failed"
)
View Source
const (
	SpacePhaseNone     SpacePhase = ""
	SpacePhaseCreating            = "Creating"
	SpacePhaseActive              = "Active"
	SpacePhaseFailed              = "Failed"
)
View Source
const (
	ReservedProjectName = "system"
)

Variables

View Source
var (
	ErrInvalidPort                    = errors.New("spec: endpoint has invalid port value")
	ErrInvalidUrlPath                 = errors.New("spec: invalid url path")
	ErrBothUrlPathAndDisableTcpVerify = errors.New("spec: url path and disable tcp verify cannot both be set")
	ErrNoTcpCert                      = errors.New("spec: space does not support TCP apps because cert info missing")
)
View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "decco.platform9.com", Version: "v1beta2"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	ErrDomainNameMissing         = errors.New("spec: missing domain name")
	ErrHttpCertSecretNameMissing = errors.New("spec: missing certificate secret name")
	ErrInvalidProjectName        = errors.New("spec: invalid project name")
)

Functions

This section is empty.

Types

type App

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

	Spec   AppSpec   `json:"spec,omitempty"`
	Status AppStatus `json:"status,omitempty"`
}

App is the Schema for the apps API

func (*App) DeepCopy

func (in *App) DeepCopy() *App

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

func (*App) DeepCopyInto

func (in *App) DeepCopyInto(out *App)

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

func (*App) DeepCopyObject

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

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

type AppCondition

type AppCondition struct {
	Type           AppConditionType `json:"type"`
	Reason         string           `json:"reason"`
	TransitionTime string           `json:"transitionTime"`
}

func (*AppCondition) DeepCopy

func (in *AppCondition) DeepCopy() *AppCondition

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

func (*AppCondition) DeepCopyInto

func (in *AppCondition) DeepCopyInto(out *AppCondition)

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

type AppConditionType

type AppConditionType string

type AppList

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

AppList contains a list of App

func (*AppList) DeepCopy

func (in *AppList) DeepCopy() *AppList

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

func (*AppList) DeepCopyInto

func (in *AppList) DeepCopyInto(out *AppList)

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

func (*AppList) DeepCopyObject

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

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

type AppPhase

type AppPhase string

type AppSpec

type AppSpec struct {
	PodSpec                 corev1.PodSpec      `json:"pod"`
	InitialReplicas         int32               `json:"initialReplicas"`
	Egresses                []TlsEgress         `json:"egresses"`
	RunAsJob                bool                `json:"runAsJob"`
	JobBackoffLimit         int32               `json:"jobBackoffLimit"`
	Endpoints               []EndpointSpec      `json:"endpoints"`
	FirstEndpointListenPort int32               `json:"firstEndpointListenPort"`
	Permissions             []rbacv1.PolicyRule `json:"permissions"`
	DomainEnvVarName        string              `json:"domainEnvVarName"`
}

AppSpec defines the desired state of App Important: Run "make" to regenerate code after modifying this file

func (*AppSpec) Cleanup

func (c *AppSpec) Cleanup()

Cleanup cleans up user passed spec, e.g. defaulting, transforming fields. TODO: move this to admission controller

func (*AppSpec) DeepCopy

func (in *AppSpec) DeepCopy() *AppSpec

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

func (*AppSpec) DeepCopyInto

func (in *AppSpec) DeepCopyInto(out *AppSpec)

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

func (*AppSpec) Validate

func (c *AppSpec) Validate(tcpCertAndCaSecretName string) error

type AppStatus

type AppStatus struct {
	// Phase is the app running phase
	Phase  AppPhase `json:"phase"`
	Reason string   `json:"reason"`
}

AppStatus defines the observed state of App Important: Run "make" to regenerate code after modifying this file

func (*AppStatus) DeepCopy

func (in *AppStatus) DeepCopy() *AppStatus

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

func (*AppStatus) DeepCopyInto

func (in *AppStatus) DeepCopyInto(out *AppStatus)

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

func (*AppStatus) IsFailed

func (in *AppStatus) IsFailed() bool

func (*AppStatus) SetPhase

func (in *AppStatus) SetPhase(p AppPhase)

func (*AppStatus) SetReason

func (in *AppStatus) SetReason(r string)

type EndpointSpec

type EndpointSpec struct {
	Name              string `json:"name"`
	Port              int32  `json:"port"`
	IsMetricsEndpoint bool   `json:"isMetricsEndpoint"` // optional, TCP only, no SNI / TLS / stunnel
	TlsListenPort     int32  `json:"tlsListenPort"`     // optional, defaults to 443 + endpoint index

	// optional Cert and CA if don't want to use default one for the space
	CertAndCaSecretName string `json:"certAndCaSecretName"`
	CreateClearTextSvc  bool   `json:"createClearTextSvc"`

	// The following only apply to http endpoints (httpPath not empty)
	// RewritePath value is interpreted as follows:
	// empty: the path is forwarded unmodified
	// non-empty: the specified HttpPath prefix is replaced with the value
	HttpPath          string `json:"httpPath"`
	RewritePath       string `json:"rewritePath"`
	HttpLocalhostOnly bool   `json:"httpLocalhostOnly"`

	// The following only apply to tcp endpoints (httpPath empty)
	CreateDnsRecord                 bool   `json:"createDnsRecord"`
	DisableTlsTermination           bool   `json:"disableTlsTermination"`
	DisableTcpClientTlsVerification bool   `json:"disableTcpClientTlsVerification"`
	SniHostname                     string `json:"sniHostname"` // optional SNI hostname override
	// Optional name suffix to append to server name for SNI routing purposes.
	// For e.g., if endpoint name is "foo", space domain name is "bar.com",
	// and nameSuffix is ".v0", then the SNI routing name becomes:
	// foo.v0.bar.com
	TcpHostnameSuffix string `json:"tcpHostnameSuffix"`

	// Optional ingress resource annotations
	AdditionalIngressAnnotations map[string]string `json:"additionalIngressAnnotations,omitempty"`
}

func (*EndpointSpec) DeepCopy

func (in *EndpointSpec) DeepCopy() *EndpointSpec

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

func (*EndpointSpec) DeepCopyInto

func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec)

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

type Space

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

	Spec   SpaceSpec   `json:"spec,omitempty"`
	Status SpaceStatus `json:"status,omitempty"`
}

Space is the Schema for the spaces API

func (*Space) AsOwner

func (in *Space) AsOwner() metav1.OwnerReference

func (*Space) DeepCopy

func (in *Space) DeepCopy() *Space

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

func (*Space) DeepCopyInto

func (in *Space) DeepCopyInto(out *Space)

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

func (*Space) DeepCopyObject

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

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

type SpaceCondition

type SpaceCondition struct {
	Type           SpaceConditionType `json:"type"`
	Reason         string             `json:"reason"`
	TransitionTime string             `json:"transitionTime"`
}

func (*SpaceCondition) DeepCopy

func (in *SpaceCondition) DeepCopy() *SpaceCondition

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

func (*SpaceCondition) DeepCopyInto

func (in *SpaceCondition) DeepCopyInto(out *SpaceCondition)

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

type SpaceConditionType

type SpaceConditionType string

type SpaceList

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

SpaceList contains a list of Space

func (*SpaceList) DeepCopy

func (in *SpaceList) DeepCopy() *SpaceList

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

func (*SpaceList) DeepCopyInto

func (in *SpaceList) DeepCopyInto(out *SpaceList)

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

func (*SpaceList) DeepCopyObject

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

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

type SpacePermissions

type SpacePermissions struct {
	Subject rbacv1.Subject      `json:"subject"`
	Rules   []rbacv1.PolicyRule `json:"rules"`
}

func (*SpacePermissions) DeepCopy

func (in *SpacePermissions) DeepCopy() *SpacePermissions

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

func (*SpacePermissions) DeepCopyInto

func (in *SpacePermissions) DeepCopyInto(out *SpacePermissions)

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

type SpacePhase

type SpacePhase string

type SpaceSpec

type SpaceSpec struct {
	DomainName                           string   `json:"domainName"`
	Project                              string   `json:"project"`
	HttpCertSecretName                   string   `json:"httpCertSecretName"`
	TcpCertAndCaSecretName               string   `json:"tcpCertAndCaSecretName"`
	EncryptHttp                          bool     `json:"encryptHttp"`
	DeleteHttpCertSecretAfterCopy        bool     `json:"deleteHttpCertSecretAfterCopy"`
	DeleteTcpCertAndCaSecretAfterCopy    bool     `json:"deleteTcpCertAndCaSecretAfterCopy"`
	DisablePrivateIngressController      bool     `json:"disablePrivateIngressController"`
	VerboseIngressControllerLogging      bool     `json:"verboseIngressControllerLogging"`
	PrivateIngressControllerTcpEndpoints []string `json:"privateIngressControllerTcpEndpoints"`
	// Optional suffix to append to host names of private ingress controller's tcp endpoints
	PrivateIngressControllerTcpHostnameSuffix string            `json:"privateIngressControllerTcpHostnameSuffix"`
	Permissions                               *SpacePermissions `json:"permissions"`
	CreateDefaultHttpDeploymentAndIngress     bool              `json:"createDefaultHttpDeploymentAndIngress"`
}

SpaceSpec defines the desired state of Space

func (*SpaceSpec) Cleanup

func (in *SpaceSpec) Cleanup()

Cleanup cleans up user passed spec, e.g. defaulting, transforming fields. TODO: move this to admission controller

func (*SpaceSpec) DeepCopy

func (in *SpaceSpec) DeepCopy() *SpaceSpec

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

func (*SpaceSpec) DeepCopyInto

func (in *SpaceSpec) DeepCopyInto(out *SpaceSpec)

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

func (*SpaceSpec) Validate

func (in *SpaceSpec) Validate() error

type SpaceStatus

type SpaceStatus struct {
	Phase  SpacePhase `json:"phase"`
	Reason string     `json:"reason"`
}

SpaceStatus defines the observed state of Space

func (*SpaceStatus) DeepCopy

func (in *SpaceStatus) DeepCopy() *SpaceStatus

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

func (*SpaceStatus) DeepCopyInto

func (in *SpaceStatus) DeepCopyInto(out *SpaceStatus)

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

func (*SpaceStatus) IsFailed

func (in *SpaceStatus) IsFailed() bool

func (*SpaceStatus) SetPhase

func (in *SpaceStatus) SetPhase(p SpacePhase)

func (*SpaceStatus) SetReason

func (in *SpaceStatus) SetReason(r string)

type TlsEgress

type TlsEgress struct {
	Fqdn                          string `json:"fqdn"`
	Endpoint                      string `json:"endpoint"`
	SpaceName                     string `json:"spaceName"`
	TargetPort                    int32  `json:"targetPort"`
	LocalPort                     int32  `json:"localPort"` // local listening port
	CertAndCaSecretName           string `json:"certAndCaSecretName"`
	SpringBoardDelaySeconds       int32  `json:"springBoardDelaySeconds"`
	DisableServerCertVerification bool   `json:"disableServerCertVerification"`
}

Specifies the stunnel client configuration for connecting to another app The following destination specifications are allowed: Fqdn not empty : fully qualified domain name for destination

Endpoint and SpaceName ignored.
Example: appname.spacename.svc.cluster.local

Endpoint not empty, Fqdn and SpaceName empty: connect to the app in the

same namespace. The constructed fqdn is internal and is:
${Endpoint}.${CURRENT_SPACE_NAME}.svc.cluster.local

Endpoint and SpaceName not empty, Fqdn empty: connect to the app in the

specified space. The constructed fqdn is internal and is:
${Endpoint}.${SpaceName}.svc.cluster.local

func (*TlsEgress) DeepCopy

func (in *TlsEgress) DeepCopy() *TlsEgress

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

func (*TlsEgress) DeepCopyInto

func (in *TlsEgress) DeepCopyInto(out *TlsEgress)

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