Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the extensions v1alpha1 API group +kubebuilder:object:generate=true +groupName=extensions.tsuru.io
Index ¶
- Constants
- Variables
- func Bool(v bool) *bool
- func BoolValue(v *bool) bool
- type AllowedUpstream
- type AutoscaleKEDAOptions
- type Bind
- type BlockType
- type CacheSnapshotStorage
- type CacheSnapshotSyncSpec
- type CertManager
- type CertificateSpec
- type DNSConfig
- type DynamicCertificates
- type File
- type LoadBalanceAlgorithm
- type Location
- type NginxConfig
- type RpaasFlavor
- type RpaasFlavorList
- type RpaasFlavorSpec
- type RpaasInstance
- func (i *RpaasInstance) BelongsToCluster(clusterName string) bool
- func (i *RpaasInstance) ClusterName() string
- func (in *RpaasInstance) DeepCopy() *RpaasInstance
- func (in *RpaasInstance) DeepCopyInto(out *RpaasInstance)
- func (in *RpaasInstance) DeepCopyObject() runtime.Object
- func (i *RpaasInstance) GetBaseLabels(labels map[string]string) map[string]string
- func (i *RpaasInstance) SetClusterName(clusterName string)
- func (i *RpaasInstance) SetTeamOwner(team string)
- func (i *RpaasInstance) TeamOwner() string
- type RpaasInstanceAutoscaleSpec
- type RpaasInstanceExternalAddressesStatus
- type RpaasInstanceList
- type RpaasInstanceSpec
- type RpaasInstanceStatus
- type RpaasPlan
- type RpaasPlanList
- type RpaasPlanSpec
- type RpaasValidation
- type RpaasValidationList
- type RpaasValidationStatus
- type ScheduledWindow
- type ServerBlock
- type SessionTicketKeyLength
- type TLSSessionResumption
- type TLSSessionTicket
- type TrafficShapingPolicy
- type UpstreamOptions
- type Value
- type ValueSource
Constants ¶
const ( DefaultLabelKeyPrefix = "rpaas.extensions.tsuru.io" RpaasOperatorValidationNameLabelKey = DefaultLabelKeyPrefix + "/validation-name" RpaasOperatorValidationHashAnnotationKey = DefaultLabelKeyPrefix + "/validation-hash" RpaasOperatorInstanceNameLabelKey = DefaultLabelKeyPrefix + "/instance-name" RpaasOperatorServiceNameLabelKey = DefaultLabelKeyPrefix + "/service-name" RpaasOperatorPlanNameLabelKey = DefaultLabelKeyPrefix + "/plan-name" RpaasOperatorTeamOwnerLabelKey = DefaultLabelKeyPrefix + "/team-owner" RpaasOperatorClusterNameLabelKey = DefaultLabelKeyPrefix + "/cluster-name" LegacyRpaasOperatorInstanceNameLabelKey = "rpaas_instance" LegacyRpaasOperatorServiceNameLabelKey = "rpaas_service" )
const ( BlockTypeRoot = "root" BlockTypeHTTP = "http" BlockTypeServer = "server" BlockTypeLuaServer = "lua-server" BlockTypeLuaWorker = "lua-worker" )
const ( // SessionTicketKeyLength48 represents 48 bytes of session ticket key length. SessionTicketKeyLength48 = SessionTicketKeyLength(48) // SessionTicketKeyLength80 represents 80 bytes of session ticket key length. SessionTicketKeyLength80 = SessionTicketKeyLength(80) // DefaultSessionTicketKeyLength holds the default session ticket key length. DefaultSessionTicketKeyLength = SessionTicketKeyLength48 )
const CertificateNameDefault = "default"
const ( // DefaultSessionTicketKeyRotationInteval holds the default time interval to // rotate the session tickets: 1 hour. DefaultSessionTicketKeyRotationInteval uint32 = 60 )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "extensions.tsuru.io", Version: "v1alpha1"} // 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 )
Functions ¶
Types ¶
type AllowedUpstream ¶ added in v0.13.0
type AllowedUpstream struct {
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
}
func (*AllowedUpstream) DeepCopy ¶ added in v0.13.0
func (in *AllowedUpstream) DeepCopy() *AllowedUpstream
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedUpstream.
func (*AllowedUpstream) DeepCopyInto ¶ added in v0.13.0
func (in *AllowedUpstream) DeepCopyInto(out *AllowedUpstream)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutoscaleKEDAOptions ¶ added in v0.35.1
type AutoscaleKEDAOptions struct {
// Enabled whether should use KEDA as the autoscaling controller.
// +optional
Enabled bool `json:"enabled,omitempty"`
// PrometheusServerAddress is the Prometheus server (URL) address.
// Mandatory if Enabled field is true.
// +optional
PrometheusServerAddress string `json:"prometheusServerAddress,omitempty"`
// RPSQueryTemplate is a gotemplate used to define the requests per second Prometheus query.
// Mandatory if Enabled field is true.
// +optional
RPSQueryTemplate string `json:"rpsQueryTemplate,omitempty"`
// RPSAuthenticationRef is the reference to KEDA's authentication resource regarding the
// request per second trigger.
// +optional
RPSAuthenticationRef *kedav1alpha1.ScaledObjectAuthRef `json:"rpsAuthenticationRef,omitempty"`
// PollingInterval is the interval in seconds to check each trigger on.
// +optional
PollingInterval *int32 `json:"pollingInterval,omitempty"`
// Timezone is a zone name registered on IANA time zone database, e.g. "America/Sao_Paulo".
// +optional
Timezone string `json:"timezone,omitempty"`
}
func (*AutoscaleKEDAOptions) DeepCopy ¶ added in v0.35.1
func (in *AutoscaleKEDAOptions) DeepCopy() *AutoscaleKEDAOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscaleKEDAOptions.
func (*AutoscaleKEDAOptions) DeepCopyInto ¶ added in v0.35.1
func (in *AutoscaleKEDAOptions) DeepCopyInto(out *AutoscaleKEDAOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Bind ¶
func (*Bind) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bind.
func (*Bind) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CacheSnapshotStorage ¶
type CacheSnapshotStorage struct {
StorageClassName *string `json:"storageClassName,omitempty"`
StorageSize *resource.Quantity `json:"storageSize,omitempty"`
VolumeLabels map[string]string `json:"volumeLabels,omitempty"`
}
func (*CacheSnapshotStorage) DeepCopy ¶
func (in *CacheSnapshotStorage) DeepCopy() *CacheSnapshotStorage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheSnapshotStorage.
func (*CacheSnapshotStorage) DeepCopyInto ¶
func (in *CacheSnapshotStorage) DeepCopyInto(out *CacheSnapshotStorage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CacheSnapshotSyncSpec ¶
type CacheSnapshotSyncSpec struct {
// Schedule is the the cron time string format, see https://en.wikipedia.org/wiki/Cron.
Schedule string `json:"schedule,omitempty"`
// Container is the image used to sync the containers
// default is tsuru/kubectl:latest
Image string `json:"image,omitempty"`
// CmdPodToPVC is used to customize command used to sync memory cache (POD) to persistent storage (PVC)
CmdPodToPVC []string `json:"cmdPodToPVC,omitempty"`
// CmdPVCToPod is used to customize command used to sync persistent storage (PVC) to memory cache (POD)
CmdPVCToPod []string `json:"cmdPVCToPod,omitempty"`
}
func (*CacheSnapshotSyncSpec) DeepCopy ¶
func (in *CacheSnapshotSyncSpec) DeepCopy() *CacheSnapshotSyncSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheSnapshotSyncSpec.
func (*CacheSnapshotSyncSpec) DeepCopyInto ¶
func (in *CacheSnapshotSyncSpec) DeepCopyInto(out *CacheSnapshotSyncSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CertManager ¶ added in v0.15.0
type CertManager struct {
// Name is recently introduced to allow multiple certificates in the same instance.
// +optional
Name string `json:"name,omitempty"`
// Issuer refers either to Issuer or ClusterIssuer resource.
//
// NOTE: when there's no Issuer on this name, it tries using ClusterIssuer instead.
Issuer string `json:"issuer,omitempty"`
// DNSNames is a list of DNS names to be set in Subject Alternative Names.
// +optional
DNSNames []string `json:"dnsNames,omitempty"`
// IPAddresses is a list of IP addresses to be set in Subject Alternative Names.
// +optional
IPAddresses []string `json:"ipAddresses,omitempty"`
// DNSNamesDefault when is set use the provided DNSName from DNS Zone field.
// +optional
DNSNamesDefault bool `json:"dnsNamesDefault,omitempty"`
// Ignore CertificateSpec which is a subset of cert-manager's Certificate.Spec.
// It is used to customize the certificate that will be created by cert-manager.
// +optional
IgnoreCertificateSpec bool `json:"ignoreCertificateSpec,omitempty"`
}
func (*CertManager) DeepCopy ¶ added in v0.15.0
func (in *CertManager) DeepCopy() *CertManager
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertManager.
func (*CertManager) DeepCopyInto ¶ added in v0.15.0
func (in *CertManager) DeepCopyInto(out *CertManager)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CertManager) RequiredName ¶ added in v0.43.0
func (r *CertManager) RequiredName() string
type CertificateSpec ¶ added in v0.49.1
type CertificateSpec struct {
Subject *cmv1.X509Subject `json:"subject,omitempty"`
PrivateKey *cmv1.CertificatePrivateKey `json:"privateKey,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
}
func (*CertificateSpec) DeepCopy ¶ added in v0.50.1
func (in *CertificateSpec) DeepCopy() *CertificateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSpec.
func (*CertificateSpec) DeepCopyInto ¶ added in v0.50.1
func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DNSConfig ¶
type DNSConfig struct {
// Zone is the suffix which all DNS entries will be formed with
// using the rule `instance_name.zone`
Zone string `json:"zone"`
// TTL is the DNS entry time to live in seconds (default is 60s)
// +optional
TTL *int32 `json:"ttl"`
}
func (*DNSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSConfig.
func (*DNSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DynamicCertificates ¶ added in v0.15.0
type DynamicCertificates struct {
// CertManager contains specific configurations to enable Cert Manager integration.
// +optional
CertManager *CertManager `json:"certManager,omitempty"`
// CertManagerRequests is similar to CertManager field but for several requests.
// +optional
CertManagerRequests []CertManager `json:"certManagerRequests,omitempty"`
}
func (*DynamicCertificates) DeepCopy ¶ added in v0.15.0
func (in *DynamicCertificates) DeepCopy() *DynamicCertificates
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicCertificates.
func (*DynamicCertificates) DeepCopyInto ¶ added in v0.15.0
func (in *DynamicCertificates) DeepCopyInto(out *DynamicCertificates)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type File ¶ added in v0.32.0
type File struct {
// Name is the filaname of the file.
Name string `json:"name"`
// ConfigMap is a reference to ConfigMap in the namespace that contains the
// file content.
ConfigMap *corev1.ConfigMapKeySelector `json:"configMap,omitempty"`
}
func (*File) DeepCopy ¶ added in v0.32.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new File.
func (*File) DeepCopyInto ¶ added in v0.32.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LoadBalanceAlgorithm ¶ added in v0.51.0
type LoadBalanceAlgorithm string
const ( LoadBalanceRoundRobin LoadBalanceAlgorithm = "round_robin" // Round Robin LoadBalanceConsistentHash LoadBalanceAlgorithm = "chash" // Consistent Hashing LoadBalanceEWMA LoadBalanceAlgorithm = "ewma" // Exponentially Weighted Moving Average )
type Location ¶
type Location struct {
// ServerName is an optional parameter used to match the server name in the location block. If not provided, it will apply to all servers.
ServerName string `json:"serverName,omitempty"`
Path string `json:"path"`
Destination string `json:"destination,omitempty"`
Content *Value `json:"content,omitempty"`
ForceHTTPS bool `json:"forceHTTPS,omitempty"`
}
func (*Location) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Location.
func (*Location) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NginxConfig ¶
type NginxConfig struct {
User string `json:"user,omitempty"`
UpstreamKeepalive int `json:"upstreamKeepalive,omitempty"`
CacheEnabled *bool `json:"cacheEnabled,omitempty"`
CacheInactive string `json:"cacheInactive,omitempty"`
CacheLoaderFiles int `json:"cacheLoaderFiles,omitempty"`
CachePath string `json:"cachePath,omitempty"`
CacheExtraArgs string `json:"cacheExtraArgs,omitempty"`
CacheSize *resource.Quantity `json:"cacheSize,omitempty"`
CacheZoneSize *resource.Quantity `json:"cacheZoneSize,omitempty"`
CacheZonePurgeName string `json:"cacheZonePurgeName,omitempty"`
LogFormat string `json:"logFormat,omitempty"`
LogFormatEscape string `json:"logFormatEscape,omitempty"`
LogFormatName string `json:"logFormatName,omitempty"`
LogAdditionalHeaders []string `json:"logAdditionalHeaders,omitempty"`
LogAdditionalFields map[string]string `json:"logAdditionalFields,omitempty"`
MapHashBucketSize int `json:"mapHashBucketSize,omitempty"`
MapHashMaxSize int `json:"mapHashMaxSize,omitempty"`
HTTPListenOptions string `json:"httpListenOptions,omitempty"`
HTTPSListenOptions string `json:"httpsListenOptions,omitempty"`
VTSEnabled *bool `json:"vtsEnabled,omitempty"`
VTSStatusHistogramBuckets string `json:"vtsStatusHistogramBuckets,omitempty"`
ResolverAddresses []string `json:"resolverAddresses,omitempty"`
ResolverTTL string `json:"resolverTTL,omitempty"`
SyslogEnabled *bool `json:"syslogEnabled,omitempty"`
SyslogServerAddress string `json:"syslogServerAddress,omitempty"`
SyslogFacility string `json:"syslogFacility,omitempty"`
SyslogTag string `json:"syslogTag,omitempty"`
WorkerProcesses int `json:"workerProcesses,omitempty"`
WorkerConnections int `json:"workerConnections,omitempty"`
TemplateExtraVars map[string]string `json:"templateExtraVars,omitempty"`
}
func (*NginxConfig) DeepCopy ¶
func (in *NginxConfig) DeepCopy() *NginxConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxConfig.
func (*NginxConfig) DeepCopyInto ¶
func (in *NginxConfig) DeepCopyInto(out *NginxConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RpaasFlavor ¶
type RpaasFlavor struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec RpaasFlavorSpec `json:"spec,omitempty"`
}
RpaasFlavor is the Schema for the rpaasflavors API +k8s:openapi-gen=true
func (*RpaasFlavor) DeepCopy ¶
func (in *RpaasFlavor) DeepCopy() *RpaasFlavor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasFlavor.
func (*RpaasFlavor) DeepCopyInto ¶
func (in *RpaasFlavor) DeepCopyInto(out *RpaasFlavor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RpaasFlavor) DeepCopyObject ¶
func (in *RpaasFlavor) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RpaasFlavorList ¶
type RpaasFlavorList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RpaasFlavor `json:"items"`
}
RpaasFlavorList contains a list of RpaasFlavor
func (*RpaasFlavorList) DeepCopy ¶
func (in *RpaasFlavorList) DeepCopy() *RpaasFlavorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasFlavorList.
func (*RpaasFlavorList) DeepCopyInto ¶
func (in *RpaasFlavorList) DeepCopyInto(out *RpaasFlavorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RpaasFlavorList) DeepCopyObject ¶
func (in *RpaasFlavorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RpaasFlavorSpec ¶
type RpaasFlavorSpec struct {
// Description provides a human readable description about this flavor.
// +optional
Description string `json:"description,omitempty"`
// InstanceTemplate defines a template which allows to override the
// associated RpaasInstance.
// +optional
InstanceTemplate *RpaasInstanceSpec `json:"instanceTemplate,omitempty"`
// Default defines if the flavor should be applied by default on
// every service instance. Default flavors cannot be listed on RpaasFlavorList.
// +optional
Default bool `json:"default,omitempty"`
// CreationOnly defines if the flavor could be used only in the moment of creation of instance
// +optional
CreationOnly bool `json:"creationOnly,omitempty"`
// IncompatibleFlavors defines which other flavors cannot be used with this flavor
// +optional
IncompatibleFlavors []string `json:"incompatibleFlavors,omitempty"`
}
RpaasFlavorSpec defines the desired state of RpaasFlavor
func (*RpaasFlavorSpec) DeepCopy ¶
func (in *RpaasFlavorSpec) DeepCopy() *RpaasFlavorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasFlavorSpec.
func (*RpaasFlavorSpec) DeepCopyInto ¶
func (in *RpaasFlavorSpec) DeepCopyInto(out *RpaasFlavorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RpaasInstance ¶
type RpaasInstance struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Status RpaasInstanceStatus `json:"status,omitempty"`
Spec RpaasInstanceSpec `json:"spec,omitempty"`
}
RpaasInstance is the Schema for the rpaasinstances API
func (*RpaasInstance) BelongsToCluster ¶
func (i *RpaasInstance) BelongsToCluster(clusterName string) bool
func (*RpaasInstance) ClusterName ¶ added in v0.37.2
func (i *RpaasInstance) ClusterName() string
func (*RpaasInstance) DeepCopy ¶
func (in *RpaasInstance) DeepCopy() *RpaasInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasInstance.
func (*RpaasInstance) DeepCopyInto ¶
func (in *RpaasInstance) DeepCopyInto(out *RpaasInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RpaasInstance) DeepCopyObject ¶
func (in *RpaasInstance) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*RpaasInstance) GetBaseLabels ¶ added in v0.37.2
func (i *RpaasInstance) GetBaseLabels(labels map[string]string) map[string]string
func (*RpaasInstance) SetClusterName ¶
func (i *RpaasInstance) SetClusterName(clusterName string)
func (*RpaasInstance) SetTeamOwner ¶
func (i *RpaasInstance) SetTeamOwner(team string)
func (*RpaasInstance) TeamOwner ¶
func (i *RpaasInstance) TeamOwner() string
type RpaasInstanceAutoscaleSpec ¶
type RpaasInstanceAutoscaleSpec struct {
// MaxReplicas is the upper limit for the number of replicas that can be set
// by the HorizontalPodAutoscaler.
MaxReplicas int32 `json:"maxReplicas"`
// MinReplicas is the lower limit for the number of replicas that can be set
// by the HorizontalPodAutoscaler.
// Defaults to the RpaasInstance replicas value.
// +optional
MinReplicas *int32 `json:"minReplicas,omitempty"`
// TargetCPUUtilizationPercentage is the target average CPU utilization over
// all the pods. Represented as a percentage of requested CPU, e.g. int32(80)
// equals to 80%.
// +optional
TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty"`
// TargetMemoryUtilizationPercentage is the target average memory utilization
// over all the pods. Represented as a percentage of requested memory, e.g.
// int32(80) equals to 80%.
// +optional
TargetMemoryUtilizationPercentage *int32 `json:"targetMemoryUtilizationPercentage,omitempty"`
// TargetRequestsPerSecond is the target rate of HTTP requests (in a second)
// pods should keep before scaling up/down pods.
// +optional
TargetRequestsPerSecond *int32 `json:"targetRequestsPerSecond,omitempty"`
// Schedules are the time windows where the minimum replica count should change.
// +optional
Schedules []ScheduledWindow `json:"schedules,omitempty"`
// KEDAOptions defines the options used when creating autoscaling resources via KEDA's API.
// +optional
KEDAOptions *AutoscaleKEDAOptions `json:"kedaOptions,omitempty"`
}
RpaasInstanceAutoscaleSpec describes the behavior of HorizontalPodAutoscaler.
func (*RpaasInstanceAutoscaleSpec) DeepCopy ¶
func (in *RpaasInstanceAutoscaleSpec) DeepCopy() *RpaasInstanceAutoscaleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasInstanceAutoscaleSpec.
func (*RpaasInstanceAutoscaleSpec) DeepCopyInto ¶
func (in *RpaasInstanceAutoscaleSpec) DeepCopyInto(out *RpaasInstanceAutoscaleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RpaasInstanceExternalAddressesStatus ¶ added in v0.38.0
type RpaasInstanceExternalAddressesStatus struct {
IPs []string `json:"ips,omitempty"`
Hostnames []string `json:"hostnames,omitempty"`
}
func (*RpaasInstanceExternalAddressesStatus) DeepCopy ¶ added in v0.39.2
func (in *RpaasInstanceExternalAddressesStatus) DeepCopy() *RpaasInstanceExternalAddressesStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasInstanceExternalAddressesStatus.
func (*RpaasInstanceExternalAddressesStatus) DeepCopyInto ¶ added in v0.39.2
func (in *RpaasInstanceExternalAddressesStatus) DeepCopyInto(out *RpaasInstanceExternalAddressesStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RpaasInstanceList ¶
type RpaasInstanceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RpaasInstance `json:"items"`
}
RpaasInstanceList contains a list of RpaasInstance
func (*RpaasInstanceList) DeepCopy ¶
func (in *RpaasInstanceList) DeepCopy() *RpaasInstanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasInstanceList.
func (*RpaasInstanceList) DeepCopyInto ¶
func (in *RpaasInstanceList) DeepCopyInto(out *RpaasInstanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RpaasInstanceList) DeepCopyObject ¶
func (in *RpaasInstanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RpaasInstanceSpec ¶
type RpaasInstanceSpec struct {
// Number of desired pods. This is a pointer to distinguish between explicit
// zero and not specified. Defaults to 1.
// +optional
Replicas *int32 `json:"replicas,omitempty"`
// PlanName is the name of the rpaasplan instance.
// +optional
PlanName string `json:"planName,omitempty"`
// PlanNamespace is the namespace of target plan and their flavors, when empty uses the same namespace of instance.
// +optional
PlanNamespace string `json:"planNamespace,omitempty"`
// Flavors are references to RpaasFlavors resources. When provided, each flavor
// merges its instance template spec with this instance spec.
// +optional
Flavors []string `json:"flavors,omitempty"`
// PlanTemplate allow overriding fields in the specified plan.
// +optional
PlanTemplate *RpaasPlanSpec `json:"planTemplate,omitempty"`
// Binds is the list of apps bounded to the instance
// +optional
Binds []Bind `json:"binds,omitempty"`
// UpstreamOptions is the list of upstream options to be applied to the
// instance. Each upstream option defines a primary bind and canary binds
// with a traffic shaping policy and a load balancing algorithm.
// The primary bind is the main bind for the upstream, while canary binds
// are used to distribute traffic based on the defined traffic shaping policy.
// The load balancing algorithm is used to distribute traffic among the
// upstreams.
// +optional
UpstreamOptions []UpstreamOptions `json:"upstreamOptions,omitempty"`
// Blocks are configuration file fragments added to the generated nginx
// config.
Blocks map[BlockType]Value `json:"blocks,omitempty"`
// ServerBlocks are configuration file fragments added to a specific serverName
ServerBlocks []ServerBlock `json:"serverBlocks,omitempty"`
// Locations hold paths that can be configured to forward resquests to
// one destination app or include raw NGINX configurations itself.
// +optional
Locations []Location `json:"locations,omitempty"`
// DNS Configuration for the current flavor
// +optional
DNS *DNSConfig `json:"dns,omitempty"`
// TLS configuration.
// +optional
TLS []nginxv1alpha1.NginxTLS `json:"tls,omitempty"`
// CertificateSpec customize a relevant certificate.Spec object subset
// +optional
CertificateSpec *CertificateSpec `json:"certificateSpec,omitempty"`
// Service to expose the nginx instance
// +optional
Service *nginxv1alpha1.NginxService `json:"service,omitempty"`
// ExtraFiles points to a ConfigMap where the files are stored.
//
// Deprecated: ExtraFiles stores all files in a single ConfigMap. In other
// words, they share the limit of 1MiB due to etcd limitations. In order to
// get around it, use the Field field.
//
// +optional
ExtraFiles *nginxv1alpha1.FilesRef `json:"extraFiles,omitempty"`
// Files is a list of regular files of general purpose to be mounted on
// Nginx pods. As ConfigMap stores the file content, a file cannot exceed 1MiB.
// +optional
Files []File `json:"files,omitempty"`
// The number of old Configs to retain to allow rollback.
// +optional
ConfigHistoryLimit *int `json:"configHistoryLimit,omitempty"`
// PodTemplate used to configure the NGINX pod template.
// +optional
PodTemplate nginxv1alpha1.NginxPodTemplateSpec `json:"podTemplate,omitempty"`
// Autoscale holds the infos used to configure the HorizontalPodAutoscaler
// for this instance.
// +optional
Autoscale *RpaasInstanceAutoscaleSpec `json:"autoscale,omitempty"`
// Lifecycle describes actions that should be executed when
// some event happens to nginx container.
// +optional
Lifecycle *nginxv1alpha1.NginxLifecycle `json:"lifecycle,omitempty"`
// TLSSessionResumption configures the instance to support session resumption
// using either session tickets or session ID (in the future). Defaults to
// disabled.
// +optional
TLSSessionResumption *TLSSessionResumption `json:"tlsSessionResumption,omitempty"`
// AllowedUpstreams holds the endpoints to which the RpaasInstance should be able to access
// +optional
AllowedUpstreams []AllowedUpstream `json:"allowedUpstreams,omitempty"`
// DynamicCertificates enables automatic issuing and renewal for TLS certificates.
// +optional
DynamicCertificates *DynamicCertificates `json:"dynamicCertificates,omitempty"`
// Ingress defines a minimal set of configurations to expose the instance over
// an Ingress.
// +optional
Ingress *nginxv1alpha1.NginxIngress `json:"ingress,omitempty"`
// EnablePodDisruptionBudget defines whether a PodDisruptionBudget should be attached
// to Nginx or not. Defaults to disabled.
//
// If enabled, PDB's min available is calculated as:
// minAvailable = floor(N * 90%), where
// N:
// - rpaasinstance.spec.autoscale.minReplicas (if set and less than maxReplicas);
// - rpaasinstance.spec.autoscale.maxReplicas (if set);
// - rpaasinstance.spec.replicas (if set);
// - zero, otherwise.
//
// +optional
EnablePodDisruptionBudget *bool `json:"enablePodDisruptionBudget,omitempty"`
// ProxyProtocol defines whether allocate additional ports to expose via proxy protocol
// +optional
ProxyProtocol bool `json:"proxyProtocol,omitempty"`
// Suspend flag tells whether controller should suspend any further
// modifications on this resource. Defaults to false.
// +optional
// +kubebuilder:default:=false
Suspend *bool `json:"suspend,omitempty"`
// Shutdown flag tells whether controller should scale down Nginx instances.
// Any assosciated HorizontalPodAutoscaler is remove/created when this flag is toggled.
// +optional
// +kubebuilder:default:=false
Shutdown bool `json:"shutdown,omitempty"`
}
RpaasInstanceSpec defines the desired state of RpaasInstance
func (*RpaasInstanceSpec) CertManagerRequests ¶ added in v0.43.0
func (s *RpaasInstanceSpec) CertManagerRequests(name string) (reqs []CertManager)
func (*RpaasInstanceSpec) DeepCopy ¶
func (in *RpaasInstanceSpec) DeepCopy() *RpaasInstanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasInstanceSpec.
func (*RpaasInstanceSpec) DeepCopyInto ¶
func (in *RpaasInstanceSpec) DeepCopyInto(out *RpaasInstanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RpaasInstanceStatus ¶
type RpaasInstanceStatus struct {
//Revision hash calculated for the current spec of rpaasinstance
RevisionHash string `json:"revisionHash,omitempty"`
// Revision hash calculated for the current spec of nginx.
WantedNginxRevisionHash string `json:"wantedNginxRevisionHash,omitempty"`
// The revision hash observed by the controller in the nginx object.
ObservedNginxRevisionHash string `json:"observedNginxRevisionHash,omitempty"`
// PodSelector is the NGINX's pod label selector.
PodSelector string `json:"podSelector,omitempty"`
// The most recent generation observed by the rpaas operator controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// CurrentReplicas is the last observed number of pods.
CurrentReplicas int32 `json:"currentReplicas,omitempty"`
// NginxUpdated is true if the wanted nginx revision hash equals the
// observed nginx revision hash.
NginxUpdated bool `json:"nginxUpdated"`
// External IP addreses of Nginx
ExternalAddresses RpaasInstanceExternalAddressesStatus `json:"externalAddresses,omitempty"`
}
RpaasInstanceStatus defines the observed state of RpaasInstance
func (*RpaasInstanceStatus) DeepCopy ¶
func (in *RpaasInstanceStatus) DeepCopy() *RpaasInstanceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasInstanceStatus.
func (*RpaasInstanceStatus) DeepCopyInto ¶
func (in *RpaasInstanceStatus) DeepCopyInto(out *RpaasInstanceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RpaasPlan ¶
type RpaasPlan struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec RpaasPlanSpec `json:"spec,omitempty"`
}
RpaasPlan is the Schema for the rpaasplans API
func (*RpaasPlan) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasPlan.
func (*RpaasPlan) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RpaasPlan) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RpaasPlanList ¶
type RpaasPlanList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RpaasPlan `json:"items"`
}
RpaasPlanList contains a list of RpaasPlan
func (*RpaasPlanList) DeepCopy ¶
func (in *RpaasPlanList) DeepCopy() *RpaasPlanList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasPlanList.
func (*RpaasPlanList) DeepCopyInto ¶
func (in *RpaasPlanList) DeepCopyInto(out *RpaasPlanList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RpaasPlanList) DeepCopyObject ¶
func (in *RpaasPlanList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RpaasPlanSpec ¶
type RpaasPlanSpec struct {
// Image is the NGINX container image name. Defaults to Nginx image value.
// +optional
Image string `json:"image,omitempty"`
// Config defines some NGINX configurations values that can be used in the
// configuration template.
// +optional
Config NginxConfig `json:"config,omitempty"`
// Template contains the main NGINX configuration template.
// +optional
Template *Value `json:"template,omitempty"`
// Description describes the plan.
// +optional
Description string `json:"description,omitempty"`
// Default indicates whether plan is default.
// +optional
Default bool `json:"default,omitempty"`
// Resources requirements to be set on the NGINX container.
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}
RpaasPlanSpec defines the desired state of RpaasPlan
func (*RpaasPlanSpec) DeepCopy ¶
func (in *RpaasPlanSpec) DeepCopy() *RpaasPlanSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasPlanSpec.
func (*RpaasPlanSpec) DeepCopyInto ¶
func (in *RpaasPlanSpec) DeepCopyInto(out *RpaasPlanSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RpaasValidation ¶ added in v0.41.0
type RpaasValidation struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Status RpaasValidationStatus `json:"status,omitempty"`
// Spec reuse the same properties of RpaasInstance, just to avoid duplication of code
Spec RpaasInstanceSpec `json:"spec,omitempty"`
}
+kubebuilder:object:root=true +kubebuilder:resource:shortName=rpaas-validation +kubebuilder:subresource:status RpaasInstance is the Schema for the rpaasinstances API
func (*RpaasValidation) BelongsToCluster ¶ added in v0.41.0
func (i *RpaasValidation) BelongsToCluster(clusterName string) bool
func (*RpaasValidation) DeepCopy ¶ added in v0.41.0
func (in *RpaasValidation) DeepCopy() *RpaasValidation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasValidation.
func (*RpaasValidation) DeepCopyInto ¶ added in v0.41.0
func (in *RpaasValidation) DeepCopyInto(out *RpaasValidation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RpaasValidation) DeepCopyObject ¶ added in v0.41.0
func (in *RpaasValidation) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RpaasValidationList ¶ added in v0.41.0
type RpaasValidationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []RpaasValidation `json:"items"`
}
RpaasValidationList contains a list of RpaasInstance
func (*RpaasValidationList) DeepCopy ¶ added in v0.41.0
func (in *RpaasValidationList) DeepCopy() *RpaasValidationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasValidationList.
func (*RpaasValidationList) DeepCopyInto ¶ added in v0.41.0
func (in *RpaasValidationList) DeepCopyInto(out *RpaasValidationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RpaasValidationList) DeepCopyObject ¶ added in v0.41.0
func (in *RpaasValidationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RpaasValidationStatus ¶ added in v0.41.0
type RpaasValidationStatus struct {
//Revision hash calculated for the current spec of rpaasvalidation
RevisionHash string `json:"revisionHash,omitempty"`
// The most recent generation observed by the rpaas operator controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Valid determines whether validation is valid
Valid *bool `json:"valid,omitempty"`
// Feedback of validation of nginx
Error string `json:"error,omitempty"`
}
RpaasValidationStatus defines the observed state of RpaasValidation
func (*RpaasValidationStatus) DeepCopy ¶ added in v0.41.0
func (in *RpaasValidationStatus) DeepCopy() *RpaasValidationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RpaasValidationStatus.
func (*RpaasValidationStatus) DeepCopyInto ¶ added in v0.41.0
func (in *RpaasValidationStatus) DeepCopyInto(out *RpaasValidationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScheduledWindow ¶ added in v0.37.0
type ScheduledWindow struct {
// MinReplicas is the minimum replica count set while the scheduled window is active.
MinReplicas int32 `json:"minReplicas"`
// Start is a Cron expression indicating the start of the shedule window.
Start string `json:"start"`
// End is a Cron expression indicating the end of the scheduled window.
End string `json:"end"`
// Timezone is a zone name registered on IANA time zone database, e.g. "America/Sao_Paulo".
// +optional
Timezone string `json:"timezone,omitempty"`
}
func (*ScheduledWindow) DeepCopy ¶ added in v0.37.0
func (in *ScheduledWindow) DeepCopy() *ScheduledWindow
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledWindow.
func (*ScheduledWindow) DeepCopyInto ¶ added in v0.37.0
func (in *ScheduledWindow) DeepCopyInto(out *ScheduledWindow)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerBlock ¶ added in v0.45.0
type ServerBlock struct {
ServerName string `json:"serverName"`
Type BlockType `json:"type"`
Content *Value `json:"content"`
Extend bool `json:"extend,omitempty"` // Extend is a flag to indicate if the block should be appended to the default configuration
}
func (*ServerBlock) DeepCopy ¶ added in v0.45.0
func (in *ServerBlock) DeepCopy() *ServerBlock
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerBlock.
func (*ServerBlock) DeepCopyInto ¶ added in v0.45.0
func (in *ServerBlock) DeepCopyInto(out *ServerBlock)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SessionTicketKeyLength ¶
type SessionTicketKeyLength uint16
type TLSSessionResumption ¶
type TLSSessionResumption struct {
// SessionTicket defines the parameters to set the TLS session tickets.
// +optional
SessionTicket *TLSSessionTicket `json:"sessionTicket,omitempty"`
}
func (*TLSSessionResumption) DeepCopy ¶
func (in *TLSSessionResumption) DeepCopy() *TLSSessionResumption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSessionResumption.
func (*TLSSessionResumption) DeepCopyInto ¶
func (in *TLSSessionResumption) DeepCopyInto(out *TLSSessionResumption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSSessionTicket ¶
type TLSSessionTicket struct {
// KeepLastKeys defines how many session ticket encryption keys should be
// kept in addition to the current one. Zero means no old encryption keys.
// Defaults to zero.
// +optional
KeepLastKeys uint32 `json:"keepLastKeys,omitempty"`
// KeyRotationInterval defines the time interval, in minutes, that a
// key rotation job should occurs. Defaults to 60 minutes (an hour).
// +optional
KeyRotationInterval uint32 `json:"keyRotationInterval,omitempty"`
// KeyLength defines the length of bytes for a session tickets. Should be
// either 48 or 80 bytes. Defaults to 48 bytes.
// +optional
KeyLength SessionTicketKeyLength `json:"keyLength,omitempty"`
// Image is the container image name used to execute the session ticket
// rotation job. It requires either "bash", "base64", "openssl" and "kubectl"
// programs be installed into. Defaults to "tsuru/kubectl:latest".
// +optional
Image string `json:"image,omitempty"`
}
func (*TLSSessionTicket) DeepCopy ¶
func (in *TLSSessionTicket) DeepCopy() *TLSSessionTicket
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSessionTicket.
func (*TLSSessionTicket) DeepCopyInto ¶
func (in *TLSSessionTicket) DeepCopyInto(out *TLSSessionTicket)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TrafficShapingPolicy ¶ added in v0.51.0
type TrafficShapingPolicy struct {
// Weight-based routing: only ONE Bind in a canary group can have weight > 0
Weight int `json:"weight,omitempty"`
WeightTotal int `json:"weightTotal,omitempty"`
// Header on which to redirect requests to this backend
Header string `json:"header,omitempty"`
// HeaderValue on which to redirect requests to this backend
HeaderValue string `json:"headerValue,omitempty"`
// HeaderPattern the header value match pattern, support exact, regex.
HeaderPattern string `json:"headerPattern,omitempty"`
// Cookie on which to redirect requests to this backend
Cookie string `json:"cookie,omitempty"`
}
func (*TrafficShapingPolicy) DeepCopy ¶ added in v0.51.0
func (in *TrafficShapingPolicy) DeepCopy() *TrafficShapingPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficShapingPolicy.
func (*TrafficShapingPolicy) DeepCopyInto ¶ added in v0.51.0
func (in *TrafficShapingPolicy) DeepCopyInto(out *TrafficShapingPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpstreamOptions ¶ added in v0.51.0
type UpstreamOptions struct {
// Main bind for this upstream
PrimaryBind string `json:"app"`
// CanaryBinds contains the names of other Binds that participate in traffic distribution
// based on their individual TrafficShapingPolicy configurations.
// Currently limited to one canary per upstream.
CanaryBinds []string `json:"canary,omitempty"`
// TrafficShapingPolicy defines the traffic shaping policy for this upstream.
TrafficShapingPolicy TrafficShapingPolicy `json:"trafficShapingPolicy,omitempty"`
// LoadBalance defines the load balancing algorithm to be used for this upstream.
LoadBalance LoadBalanceAlgorithm `json:"loadBalance,omitempty"`
// LoadBalanceHashKey defines the nginx variable, text value or any combination thereof
// to use for consistent hashing when LoadBalance is "chash".
// Required when LoadBalance is "chash", ignored otherwise.
// Examples: "$remote_addr", "$request_uri", "$http_x_user_id", "$cookie_session", "$remote_addr$request_uri"
LoadBalanceHashKey string `json:"loadBalanceHashKey,omitempty"`
}
func (*UpstreamOptions) DeepCopy ¶ added in v0.51.0
func (in *UpstreamOptions) DeepCopy() *UpstreamOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamOptions.
func (*UpstreamOptions) DeepCopyInto ¶ added in v0.51.0
func (in *UpstreamOptions) DeepCopyInto(out *UpstreamOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Value ¶
type Value struct {
Value string `json:"value,omitempty"`
ValueFrom *ValueSource `json:"valueFrom,omitempty"`
}
func (*Value) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Value.
func (*Value) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValueSource ¶
type ValueSource struct {
ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`
Namespace string `json:"namespace,omitempty"`
}
func (*ValueSource) DeepCopy ¶
func (in *ValueSource) DeepCopy() *ValueSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueSource.
func (*ValueSource) DeepCopyInto ¶
func (in *ValueSource) DeepCopyInto(out *ValueSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.