v1

package
v0.0.0-...-46eb484 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the v1 API group +kubebuilder:object:generate=true +groupName=hepa.erda.cloud

Index

Constants

View Source
const (
	ConfigZoneLabelKey = "configZone"
)
View Source
const (
	HeaderKVXPeerIPRemoteAddr = "x-peer-ip $remote_addr"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "hepa.erda.cloud", Version: "v1"}

	// 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 (
	IngressClassNameMSE   = "mse"
	IngressClassNameNginx = "nginx"
)

Functions

func StatEqual

func StatEqual(a1, a2 interface{}) ([]string, bool)

Types

type Annotation

type Annotation string
const (
	AnnotationUpstreamVHost Annotation = "nginx.ingress.kubernetes.io/upstream-vhost"
	AnnotationRewriteTarget Annotation = "nginx.ingress.kubernetes.io/rewrite-target"

	WhiteListSourceRange       Annotation = "nginx.ingress.kubernetes.io/whitelist-source-range"
	BlackListSourceRange       Annotation = "mse.ingress.kubernetes.io/blacklist-source-range"
	DomainWhiteListSourceRange Annotation = "mse.ingress.kubernetes.io/domain-whitelist-source-range"
	DomainBlackListSourceRange Annotation = "mse.ingress.kubernetes.io/domain-blacklist-source-range"
	RequestHeaderControlAdd    Annotation = "mse.ingress.kubernetes.io/request-header-control-add"

	RouteLimitRpm             Annotation = "mse.ingress.kubernetes.io/route-limit-rpm"
	RouteLimitRps             Annotation = "mse.ingress.kubernetes.io/route-limit-rps"
	RouteLimitBurstMultiplier Annotation = "mse.ingress.kubernetes.io/route-limit-burst-multiplier"

	ForceSSLRedirect Annotation = "nginx.ingress.kubernetes.io/force-ssl-redirect"
	Timeout          Annotation = "mse.ingress.kubernetes.io/timeout"

	EnableCORS           Annotation = "nginx.ingress.kubernetes.io/enable-cors"            // Ingress开启或关闭跨域。
	CORSAllowOrigin      Annotation = "nginx.ingress.kubernetes.io/cors-allow-origin"      // Ingress	允许的第三方站点。
	CORSAllowMethods     Annotation = "nginx.ingress.kubernetes.io/cors-allow-methods"     // Ingress	允许的请求方法,如GET、POST、PUT等。
	CORSAllowHeaders     Annotation = "nginx.ingress.kubernetes.io/cors-allow-headers"     // Ingress	允许的请求Header。
	CORSExposeHeaders    Annotation = "nginx.ingress.kubernetes.io/cors-expose-headers"    // Ingress	允许的暴露给浏览器的响应Header。
	CORSAllowCredentials Annotation = "nginx.ingress.kubernetes.io/cors-allow-credentials" // Ingress	是否允许携带凭证信息。
	CORSMaxAge           Annotation = "nginx.ingress.kubernetes.io/cors-max-age"           // Ingress 预检结果的最大缓存时间。
)

https://help.aliyun.com/document_detail/424813.htm

func (Annotation) String

func (in Annotation) String() string

type Auth

type Auth struct {
	Switch    `json:",inline"`
	AuthType  MSEAuthType `json:"authType,omitempty"`
	Consumers []Consumer  `json:"consumers,omitempty"`
}

func (*Auth) DeepCopy

func (in *Auth) DeepCopy() *Auth

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

func (*Auth) DeepCopyInto

func (in *Auth) DeepCopyInto(out *Auth)

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

func (Auth) DeepEqual

func (in Auth) DeepEqual(i interface{}) ([]string, bool)

func (*Auth) SwitchOffForIngress

func (in *Auth) SwitchOffForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*Auth) SwitchOnForIngress

func (in *Auth) SwitchOnForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*Auth) SwitchOnForMiddleware

func (in *Auth) SwitchOnForMiddleware(ctx context.Context, mw middleware.Middleware) error

func (*Auth) SwitcherOffForMiddleware

func (in *Auth) SwitcherOffForMiddleware(ctx context.Context, mw middleware.Middleware) error

type Backend

type Backend struct {
	RedirectBy    RedirectBy `json:"redirectBy,omitempty"`
	ServiceName   string     `json:"serviceName,omitempty"`
	ServicePort   int        `json:"servicePort,omitempty"`
	UpstreamHost  string     `json:"upstreamHost,omitempty"`
	RewriteTarget string     `json:"rewriteTarget,omitempty"`
}

func (*Backend) DeepCopy

func (in *Backend) DeepCopy() *Backend

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

func (*Backend) DeepCopyInto

func (in *Backend) DeepCopyInto(out *Backend)

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

func (Backend) DeepEqual

func (in Backend) DeepEqual(i interface{}) ([]string, bool)

func (Backend) GetUpstreamHostName

func (in Backend) GetUpstreamHostName() string

func (Backend) GetUpstreamHostPort

func (in Backend) GetUpstreamHostPort(defaults int) string

type BaseStat

type BaseStat struct {
	Hosts           string                    `json:"hosts,omitempty"`
	Path            string                    `json:"path,omitempty"`
	RedirectBy      RedirectBy                `json:"redirectBy,omitempty"`
	Policy          Policy                    `json:"policy,omitempty"`
	ResourceVersion HapiStatusResourceVersion `json:"resourceVersion"`
}

func (*BaseStat) DeepCopy

func (in *BaseStat) DeepCopy() *BaseStat

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

func (*BaseStat) DeepCopyInto

func (in *BaseStat) DeepCopyInto(out *BaseStat)

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

func (BaseStat) DeepEqual

func (in BaseStat) DeepEqual(i interface{}) ([]string, bool)

type CORS

type CORS struct {
	Switch `json:",inline"`

	EnableCORS           bool   `json:"enableCORS,omitempty"`
	CORSAllowOrigin      string `json:"corsAllowOrigin,omitempty"`
	CORSAllowMethods     string `json:"corsAllowMethods,omitempty"`
	CORSAllowHeaders     string `json:"corsAllowHeaders,omitempty"`
	CORSExposeHeaders    string `json:"corsExposeHeaders,omitempty"`
	CORSAllowCredentials bool   `json:"corsAllowCredentials,omitempty"`
	CORSMaxAge           int    `json:"corsMaxAge,omitempty"`
}

func (*CORS) DeepCopy

func (in *CORS) DeepCopy() *CORS

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

func (*CORS) DeepCopyInto

func (in *CORS) DeepCopyInto(out *CORS)

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

func (CORS) DeepEqual

func (in CORS) DeepEqual(i interface{}) ([]string, bool)

func (*CORS) SwitchOffForIngress

func (in *CORS) SwitchOffForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*CORS) SwitchOnForIngress

func (in *CORS) SwitchOnForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*CORS) SwitchOnForMiddleware

func (in *CORS) SwitchOnForMiddleware(ctx context.Context, mw middleware.Middleware) error

func (*CORS) SwitcherOffForMiddleware

func (in *CORS) SwitcherOffForMiddleware(ctx context.Context, mw middleware.Middleware) error

type ConfigZone

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

	Spec   ConfigZoneSpec   `json:"spec,omitempty"`
	Status ConfigZoneStatus `json:"status,omitempty"`
}

ConfigZone is the Schema for the configzones API +kubebuilder:resource:shortName={cz,czr} +kubebuilder:printcolumn:name="Scene",type=string,JSONPath=`.spec.scene` +kubebuilder:printcolumn:name="Hosts",type=string,JSONPath=`.spec.hosts` +kubebuilder:printcolumn:name="Hapi_Count",type=integer,JSONPath=`.status.hapisCount` +kubebuilder:printcolumn:name="Policies",type=string,JSONPath=`.status.policies` +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`

func (*ConfigZone) DeepCopy

func (in *ConfigZone) DeepCopy() *ConfigZone

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

func (*ConfigZone) DeepCopyInto

func (in *ConfigZone) DeepCopyInto(out *ConfigZone)

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

func (*ConfigZone) DeepCopyObject

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

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

func (ConfigZone) DeepEqual

func (in ConfigZone) DeepEqual(i interface{}) ([]string, bool)

type ConfigZoneList

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

ConfigZoneList contains a list of ConfigZone

func (*ConfigZoneList) DeepCopy

func (in *ConfigZoneList) DeepCopy() *ConfigZoneList

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

func (*ConfigZoneList) DeepCopyInto

func (in *ConfigZoneList) DeepCopyInto(out *ConfigZoneList)

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

func (*ConfigZoneList) DeepCopyObject

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

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

func (ConfigZoneList) DeepEqual

func (in ConfigZoneList) DeepEqual(i interface{}) ([]string, bool)

type ConfigZoneSpec

type ConfigZoneSpec struct {
	Scene  string `json:"scene,omitempty"`
	Hosts  Hosts  `json:"hosts,omitempty"`
	Policy Policy `json:"policy,omitempty"`
}

ConfigZoneSpec defines the desired state of ConfigZone

func (*ConfigZoneSpec) DeepCopy

func (in *ConfigZoneSpec) DeepCopy() *ConfigZoneSpec

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

func (*ConfigZoneSpec) DeepCopyInto

func (in *ConfigZoneSpec) DeepCopyInto(out *ConfigZoneSpec)

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

func (ConfigZoneSpec) DeepEqual

func (in ConfigZoneSpec) DeepEqual(i interface{}) ([]string, bool)

type ConfigZoneStatus

type ConfigZoneStatus struct {
	Phase      StatusPhase    `json:"phase,omitempty"`
	HapisCount int            `json:"hapisCount,omitempty"`
	Hapis      []string       `json:"hapis,omitempty"`
	Policies   []string       `json:"policies,omitempty"`
	Spec       ConfigZoneSpec `json:"spec,omitempty"`
}

ConfigZoneStatus defines the observed state of ConfigZone

func (*ConfigZoneStatus) DeepCopy

func (in *ConfigZoneStatus) DeepCopy() *ConfigZoneStatus

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

func (*ConfigZoneStatus) DeepCopyInto

func (in *ConfigZoneStatus) DeepCopyInto(out *ConfigZoneStatus)

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

func (ConfigZoneStatus) DeepEqual

func (in ConfigZoneStatus) DeepEqual(i interface{}) ([]string, bool)

type Consumer

type Consumer struct {
	Key    string `json:"key"`
	Secret string `json:"secret"`
}

func (*Consumer) DeepCopy

func (in *Consumer) DeepCopy() *Consumer

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

func (*Consumer) DeepCopyInto

func (in *Consumer) DeepCopyInto(out *Consumer)

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

func (Consumer) DeepEqual

func (in Consumer) DeepEqual(i interface{}) ([]string, bool)

type Hapi

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

	Spec   HapiSpec   `json:"spec,omitempty"`
	Status HapiStatus `json:"status,omitempty"`
}

Hapi is the Schema for the hapis API +kubebuilder:printcolumn:name="Endpoint",type=string,JSONPath=`.status.endpoint` +kubebuilder:printcolumn:name="RedirectTo",type=string,JSONPath=`.status.redirectTo` +kubebuilder:printcolumn:name="Policies",type=string,JSONPath=`.status.policies` +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`

func (*Hapi) DeepCopy

func (in *Hapi) DeepCopy() *Hapi

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

func (*Hapi) DeepCopyInto

func (in *Hapi) DeepCopyInto(out *Hapi)

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

func (*Hapi) DeepCopyObject

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

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

func (Hapi) DeepEqual

func (in Hapi) DeepEqual(i interface{}) ([]string, bool)

func (*Hapi) GetExternalServiceName

func (in *Hapi) GetExternalServiceName() string

func (*Hapi) ReverseProxyRule

func (in *Hapi) ReverseProxyRule(global *Policy) *ReverseProxyRule

type HapiList

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

HapiList contains a list of Hapi

func (*HapiList) DeepCopy

func (in *HapiList) DeepCopy() *HapiList

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

func (*HapiList) DeepCopyInto

func (in *HapiList) DeepCopyInto(out *HapiList)

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

func (*HapiList) DeepCopyObject

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

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

func (HapiList) DeepEqual

func (in HapiList) DeepEqual(i interface{}) ([]string, bool)

type HapiSpec

type HapiSpec struct {
	Hosts   Hosts   `json:"hosts,omitempty"`
	Path    string  `json:"path,omitempty"`
	Backend Backend `json:"backend,omitempty"`
	Policy  Policy  `json:"policy,omitempty"`
}

HapiSpec defines the desired state of Hapi

func (*HapiSpec) DeepCopy

func (in *HapiSpec) DeepCopy() *HapiSpec

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

func (*HapiSpec) DeepCopyInto

func (in *HapiSpec) DeepCopyInto(out *HapiSpec)

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

func (HapiSpec) DeepEqual

func (in HapiSpec) DeepEqual(i interface{}) ([]string, bool)

type HapiStatus

type HapiStatus struct {
	Phase           StatusPhase               `json:"phase,omitempty"`
	Endpoint        string                    `json:"endpoint,omitempty"`
	RedirectTo      string                    `json:"redirectTo,omitempty"`
	Policies        []string                  `json:"policies,omitempty"`
	Spec            HapiSpec                  `json:"spec,omitempty"`
	ResourceVersion HapiStatusResourceVersion `json:"resourceVersion,omitempty"`
}

HapiStatus defines the observed state of Hapi

func (*HapiStatus) DeepCopy

func (in *HapiStatus) DeepCopy() *HapiStatus

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

func (*HapiStatus) DeepCopyInto

func (in *HapiStatus) DeepCopyInto(out *HapiStatus)

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

func (HapiStatus) DeepEqual

func (in HapiStatus) DeepEqual(i interface{}) ([]string, bool)

func (*HapiStatus) SetConfigZoneResourceVersion

func (in *HapiStatus) SetConfigZoneResourceVersion(version string)

func (*HapiStatus) SetIngressResourceVersion

func (in *HapiStatus) SetIngressResourceVersion(version string)

func (*HapiStatus) SetServiceResourceVersion

func (in *HapiStatus) SetServiceResourceVersion(version string)

type HapiStatusResourceVersion

type HapiStatusResourceVersion struct {
	Service    string `json:"service,omitempty"`
	Ingress    string `json:"ingress,omitempty"`
	ConfigZone string `json:"configZone,omitempty"`
}

func (*HapiStatusResourceVersion) DeepCopy

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

func (*HapiStatusResourceVersion) DeepCopyInto

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

func (HapiStatusResourceVersion) DeepEqual

func (in HapiStatusResourceVersion) DeepEqual(i interface{}) ([]string, bool)

type Hosts

type Hosts []string

+kubebuilder:validation:MinItems=1

func (Hosts) DeepCopy

func (in Hosts) DeepCopy() Hosts

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

func (Hosts) DeepCopyInto

func (in Hosts) DeepCopyInto(out *Hosts)

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

func (Hosts) String

func (h Hosts) String() string

type IPType

type IPType string
const (
	PeerIP       IPType = "x-peer-ip"
	XRealIP      IPType = "x-real-ip"
	XForwardedIP IPType = "x-forwarded-ip"
)

func (IPType) String

func (ipType IPType) String() string

type KongPlugin

type KongPlugin struct {
	Name      string   `json:"name,omitempty"`
	Config    string   `json:"config,omitempty"`
	Protocols []string `json:"protocols,omitempty"`
	Enabled   bool     `json:"enabled,omitempty"`
	Tags      []string `json:"tags,omitempty"`
}

func (*KongPlugin) DeepCopy

func (in *KongPlugin) DeepCopy() *KongPlugin

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

func (*KongPlugin) DeepCopyInto

func (in *KongPlugin) DeepCopyInto(out *KongPlugin)

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

func (KongPlugin) DeepEqual

func (in KongPlugin) DeepEqual(i interface{}) ([]string, bool)

type KongRoute

type KongRoute struct {
	Name      string   `json:"name,omitempty"`
	Protocols []string `json:"protocols,omitempty"`
	Methods   []string `json:"methods,omitempty"`
	Paths     []string `json:"paths,omitempty"`
	Tags      []string `json:"tags,omitempty"`
}

func (*KongRoute) DeepCopy

func (in *KongRoute) DeepCopy() *KongRoute

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

func (*KongRoute) DeepCopyInto

func (in *KongRoute) DeepCopyInto(out *KongRoute)

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

func (KongRoute) DeepEqual

func (in KongRoute) DeepEqual(i interface{}) ([]string, bool)

type KongService

type KongService struct {
	Name     string   `json:"name,omitempty"`
	Protocol string   `json:"protocol,omitempty"`
	Host     string   `json:"host,omitempty"`
	Port     int      `json:"port,omitempty"`
	Path     string   `json:"path,omitempty"`
	Tags     []string `json:"tags,omitempty"`
}

func (*KongService) DeepCopy

func (in *KongService) DeepCopy() *KongService

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

func (*KongService) DeepCopyInto

func (in *KongService) DeepCopyInto(out *KongService)

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

func (KongService) DeepEqual

func (in KongService) DeepEqual(i interface{}) ([]string, bool)

type Kongress

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

	Spec   KongressSpec   `json:"spec,omitempty"`
	Status KongressStatus `json:"status,omitempty"`
}

Kongress is the Schema for the kongresses API

func (*Kongress) DeepCopy

func (in *Kongress) DeepCopy() *Kongress

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

func (*Kongress) DeepCopyInto

func (in *Kongress) DeepCopyInto(out *Kongress)

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

func (*Kongress) DeepCopyObject

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

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

func (Kongress) DeepEqual

func (in Kongress) DeepEqual(i interface{}) ([]string, bool)

type KongressList

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

KongressList contains a list of Kongress

func (*KongressList) DeepCopy

func (in *KongressList) DeepCopy() *KongressList

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

func (*KongressList) DeepCopyInto

func (in *KongressList) DeepCopyInto(out *KongressList)

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

func (*KongressList) DeepCopyObject

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

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

func (KongressList) DeepEqual

func (in KongressList) DeepEqual(i interface{}) ([]string, bool)

type KongressSpec

type KongressSpec struct {
	Route    KongRoute         `json:"route,omitempty"`
	Services []KongService     `json:"services,omitempty"`
	Plugins  map[string]string `json:"plugins,omitempty"`
}

KongressSpec defines the desired state of Kongress

func (*KongressSpec) DeepCopy

func (in *KongressSpec) DeepCopy() *KongressSpec

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

func (*KongressSpec) DeepCopyInto

func (in *KongressSpec) DeepCopyInto(out *KongressSpec)

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

func (KongressSpec) DeepEqual

func (in KongressSpec) DeepEqual(i interface{}) ([]string, bool)

type KongressStatus

type KongressStatus struct {
	Route    KongRoute     `json:"route,omitempty"`
	Services []KongService `json:"services,omitempty"`
}

KongressStatus defines the observed state of Kongress

func (*KongressStatus) DeepCopy

func (in *KongressStatus) DeepCopy() *KongressStatus

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

func (*KongressStatus) DeepCopyInto

func (in *KongressStatus) DeepCopyInto(out *KongressStatus)

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

func (KongressStatus) DeepEqual

func (in KongressStatus) DeepEqual(i interface{}) ([]string, bool)

type MSEAuthType

type MSEAuthType string
const (
	KeyAuth  MSEAuthType = "key-auth"
	SingAuth MSEAuthType = "sign-auth"
	OAuth2   MSEAuthType = "oauth2"
	HmacAuth MSEAuthType = "hmac-auth"
)

type Metric

type Metric struct {
	Switch `json:",inline"`
}

func (*Metric) DeepCopy

func (in *Metric) DeepCopy() *Metric

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

func (*Metric) DeepCopyInto

func (in *Metric) DeepCopyInto(out *Metric)

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

func (Metric) DeepEqual

func (in Metric) DeepEqual(i interface{}) ([]string, bool)

func (*Metric) SwitchOffForIngress

func (in *Metric) SwitchOffForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*Metric) SwitchOnForIngress

func (in *Metric) SwitchOnForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*Metric) SwitchOnForMiddleware

func (in *Metric) SwitchOnForMiddleware(ctx context.Context, mw middleware.Middleware) error

func (*Metric) SwitcherOffForMiddleware

func (in *Metric) SwitcherOffForMiddleware(ctx context.Context, mw middleware.Middleware) error

type Policy

type Policy struct {
	Auth        Auth        `json:"auth,omitempty"`
	CORS        CORS        `json:"cors,omitempty"`
	Metric      Metric      `json:"metric,omitempty"`
	Proxy       Proxy       `json:"proxy,omitempty"`
	SafetyCSRF  SafetyCSRF  `json:"safetyCSRF,omitempty"`
	SafetyIP    SafetyIP    `json:"safetyIP,omitempty"`
	SafetySBAC  SafetySBAC  `json:"safetySBAC,omitempty"`
	ServerGuard ServerGuard `json:"serverGuard,omitempty"`
}

func (*Policy) DeepCopy

func (in *Policy) DeepCopy() *Policy

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

func (*Policy) DeepCopyInto

func (in *Policy) DeepCopyInto(out *Policy)

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

func (Policy) DeepEqual

func (in Policy) DeepEqual(i interface{}) ([]string, bool)

func (*Policy) ListAll

func (in *Policy) ListAll() map[string]interface {
	interfaces.Switcher
	interfaces.GlobalGetter
}

type Proxy

type Proxy struct {
	Switch `json:",inline"`

	ProxyTimeout int  `json:"proxyTimeout,omitempty"`
	SslRedirect  bool `json:"sslRedirect,omitempty"`
}

func (*Proxy) DeepCopy

func (in *Proxy) DeepCopy() *Proxy

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

func (*Proxy) DeepCopyInto

func (in *Proxy) DeepCopyInto(out *Proxy)

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

func (Proxy) DeepEqual

func (in Proxy) DeepEqual(i interface{}) ([]string, bool)

func (*Proxy) SwitchOffForIngress

func (in *Proxy) SwitchOffForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*Proxy) SwitchOnForIngress

func (in *Proxy) SwitchOnForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*Proxy) SwitchOnForMiddleware

func (in *Proxy) SwitchOnForMiddleware(ctx context.Context, mw middleware.Middleware) error

func (*Proxy) SwitcherOffForMiddleware

func (in *Proxy) SwitcherOffForMiddleware(ctx context.Context, mw middleware.Middleware) error

type RedirectBy

type RedirectBy string
const (
	RedirectByUrl     RedirectBy = "url"
	RedirectByService RedirectBy = "service"
)

func (RedirectBy) String

func (in RedirectBy) String() string

type RedirectByServiceStat

type RedirectByServiceStat struct {
	BaseStat `json:",inline"`

	ServiceName string `json:"serviceName,omitempty"`
	ServicePort int    `json:"servicePort,omitempty"`
}

func (*RedirectByServiceStat) DeepCopy

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

func (*RedirectByServiceStat) DeepCopyInto

func (in *RedirectByServiceStat) DeepCopyInto(out *RedirectByServiceStat)

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

func (RedirectByServiceStat) DeepEqual

func (in RedirectByServiceStat) DeepEqual(i interface{}) ([]string, bool)

type RedirectByUrlStat

type RedirectByUrlStat struct {
	BaseStat `json:",inline"`

	UpstreamHost  string `json:"upstreamHost,omitempty"`
	RewriteTarget string `json:"rewriteTarget,omitempty"`
}

func (*RedirectByUrlStat) DeepCopy

func (in *RedirectByUrlStat) DeepCopy() *RedirectByUrlStat

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

func (*RedirectByUrlStat) DeepCopyInto

func (in *RedirectByUrlStat) DeepCopyInto(out *RedirectByUrlStat)

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

func (RedirectByUrlStat) DeepEqual

func (in RedirectByUrlStat) DeepEqual(i interface{}) ([]string, bool)

type ReverseProxyRule

type ReverseProxyRule struct {
	// contains filtered or unexported fields
}

func NewReverseProxyRule

func NewReverseProxyRule(hapi *Hapi, global *Policy) *ReverseProxyRule

func (*ReverseProxyRule) DeepCopy

func (in *ReverseProxyRule) DeepCopy() *ReverseProxyRule

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

func (*ReverseProxyRule) DeepCopyInto

func (in *ReverseProxyRule) DeepCopyInto(out *ReverseProxyRule)

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

func (ReverseProxyRule) DeepEqual

func (in ReverseProxyRule) DeepEqual(i interface{}) ([]string, bool)

func (*ReverseProxyRule) GetGlobal

func (in *ReverseProxyRule) GetGlobal() *Policy

func (*ReverseProxyRule) GetHapi

func (in *ReverseProxyRule) GetHapi() *Hapi

func (*ReverseProxyRule) GetLocal

func (in *ReverseProxyRule) GetLocal() *Policy

func (*ReverseProxyRule) GetPolicies

func (in *ReverseProxyRule) GetPolicies() []string

func (*ReverseProxyRule) Patch

func (in *ReverseProxyRule) Patch(ctx context.Context, ingress *netv1.Ingress, request *mse.PluginRequest) error

func (*ReverseProxyRule) PatchBackend

func (in *ReverseProxyRule) PatchBackend(ctx context.Context, ingress *netv1.Ingress, request *mse.PluginRequest) error

func (*ReverseProxyRule) PatchExternal

func (in *ReverseProxyRule) PatchExternal(ctx context.Context, ingress *netv1.Ingress, request *mse.PluginRequest) error

todo: ut

func (*ReverseProxyRule) PatchPolicies

func (in *ReverseProxyRule) PatchPolicies(ctx context.Context, ingress *netv1.Ingress, mw middleware.Middleware) error

type SafetyCSRF

type SafetyCSRF struct {
	Switch `json:",inline"`

	CookieSecure   bool     `json:"cookieSecure,omitempty"`
	ErrMsg         string   `json:"errMsg,omitempty"`
	ErrStatus      int      `json:"errStatus,omitempty"`
	ExcludedMethod []string `json:"excludedMethod,omitempty"`
	Global         bool     `json:"global,omitempty"`
	RefreshTTL     int      `json:"refreshTTL,omitempty"`
	TokenDomain    string   `json:"tokenDomain,omitempty"`
	TokenName      string   `json:"tokenName,omitempty"`
	UserCookie     string   `json:"userCookie,omitempty"`
	ValidTTL       int      `json:"validTTL,omitempty"`
}

func (*SafetyCSRF) DeepCopy

func (in *SafetyCSRF) DeepCopy() *SafetyCSRF

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

func (*SafetyCSRF) DeepCopyInto

func (in *SafetyCSRF) DeepCopyInto(out *SafetyCSRF)

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

func (SafetyCSRF) DeepEqual

func (in SafetyCSRF) DeepEqual(i interface{}) ([]string, bool)

func (*SafetyCSRF) SwitchOffForIngress

func (in *SafetyCSRF) SwitchOffForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*SafetyCSRF) SwitchOnForIngress

func (in *SafetyCSRF) SwitchOnForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*SafetyCSRF) SwitchOnForMiddleware

func (in *SafetyCSRF) SwitchOnForMiddleware(ctx context.Context, mw middleware.Middleware) error

func (*SafetyCSRF) SwitcherOffForMiddleware

func (in *SafetyCSRF) SwitcherOffForMiddleware(ctx context.Context, mw middleware.Middleware) error

type SafetyIP

type SafetyIP struct {
	Switch `json:",inline"`

	IPType                     IPType `json:"ipType,omitempty"`
	WhiteListSourceRange       string `json:"whiteListSourceRange" annotation:"nginx.ingress.kubernetes.io/whitelist-source-range"`
	BlackListSourceRange       string `json:"blackListSourceRange" annotation:"mse.ingress.kubernetes.io/blacklist-source-range"`
	DomainWhiteListSourceRange string `json:"domainWhiteListSourceRange" annotation:"mse.ingress.kubernetes.io/domain-whitelist-source-range"`
	DomainBlackListSourceRange string `json:"domainBlackListSourceRange" annotation:"mse.ingress.kubernetes.io/domain-blacklist-source-range"`

	KeyRateLimitingValue string `json:"keyRateLimitingValue,omitempty"`
}

func (*SafetyIP) DeepCopy

func (in *SafetyIP) DeepCopy() *SafetyIP

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

func (*SafetyIP) DeepCopyInto

func (in *SafetyIP) DeepCopyInto(out *SafetyIP)

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

func (SafetyIP) DeepEqual

func (in SafetyIP) DeepEqual(i interface{}) ([]string, bool)

func (*SafetyIP) SwitchOffForIngress

func (in *SafetyIP) SwitchOffForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*SafetyIP) SwitchOnForIngress

func (in *SafetyIP) SwitchOnForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*SafetyIP) SwitchOnForMiddleware

func (in *SafetyIP) SwitchOnForMiddleware(ctx context.Context, mw middleware.Middleware) error

func (*SafetyIP) SwitcherOffForMiddleware

func (in *SafetyIP) SwitcherOffForMiddleware(ctx context.Context, mw middleware.Middleware) error

type SafetySBAC

type SafetySBAC struct {
	Switch `json:",inline"`

	AccessControlAPI string   `json:"accessControlAPI,omitempty"`
	Global           bool     `json:"global,omitempty"`
	Methods          []string `json:"methods,omitempty"`
	Patterns         []string `json:"patterns,omitempty"`
	WithBody         bool     `json:"withBody,omitempty"`
	WithCookie       bool     `json:"withCookie,omitempty"`
	WithHeaders      []string `json:"withHeaders,omitempty"`
}

func (*SafetySBAC) DeepCopy

func (in *SafetySBAC) DeepCopy() *SafetySBAC

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

func (*SafetySBAC) DeepCopyInto

func (in *SafetySBAC) DeepCopyInto(out *SafetySBAC)

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

func (SafetySBAC) DeepEqual

func (in SafetySBAC) DeepEqual(i interface{}) ([]string, bool)

func (*SafetySBAC) SwitchOffForIngress

func (in *SafetySBAC) SwitchOffForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*SafetySBAC) SwitchOnForIngress

func (in *SafetySBAC) SwitchOnForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*SafetySBAC) SwitchOnForMiddleware

func (in *SafetySBAC) SwitchOnForMiddleware(ctx context.Context, mw middleware.Middleware) error

func (*SafetySBAC) SwitcherOffForMiddleware

func (in *SafetySBAC) SwitcherOffForMiddleware(ctx context.Context, mw middleware.Middleware) error

type ServerGuard

type ServerGuard struct {
	Switch `json:",inline"`

	RouteLimitRpm             int `json:"routeLimitRpm,omitempty"`
	RouteLimitRps             int `json:"routeLimitRps,omitempty"`
	RouteLimitBurstMultiplier int `json:"routeLimitBurstMultiplier,omitempty"`
}

func (*ServerGuard) DeepCopy

func (in *ServerGuard) DeepCopy() *ServerGuard

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

func (*ServerGuard) DeepCopyInto

func (in *ServerGuard) DeepCopyInto(out *ServerGuard)

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

func (ServerGuard) DeepEqual

func (in ServerGuard) DeepEqual(i interface{}) ([]string, bool)

func (*ServerGuard) SwitchOffForIngress

func (in *ServerGuard) SwitchOffForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*ServerGuard) SwitchOnForIngress

func (in *ServerGuard) SwitchOnForIngress(ctx context.Context, ingress *netv1.Ingress) error

func (*ServerGuard) SwitchOnForMiddleware

func (in *ServerGuard) SwitchOnForMiddleware(ctx context.Context, mw middleware.Middleware) error

func (*ServerGuard) SwitcherOffForMiddleware

func (in *ServerGuard) SwitcherOffForMiddleware(ctx context.Context, mw middleware.Middleware) error

type StatusPhase

type StatusPhase string
const (
	Reconcile                StatusPhase = "Reconcile"
	ReconcileBackendService  StatusPhase = "ReconcileBackendService"
	ReconcileBackendUpstream StatusPhase = "ReconcileBackendUpstream"
	OK                       StatusPhase = "OK"
)

func (StatusPhase) String

func (in StatusPhase) String() string

type Switch

type Switch struct {
	Global bool `json:"global,omitempty"`
	Switch bool `json:"switch,omitempty"`
}

func (*Switch) DeepCopy

func (in *Switch) DeepCopy() *Switch

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

func (*Switch) DeepCopyInto

func (in *Switch) DeepCopyInto(out *Switch)

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

func (Switch) DeepEqual

func (in Switch) DeepEqual(i interface{}) ([]string, bool)

func (*Switch) GetGlobal

func (in *Switch) GetGlobal() bool

func (*Switch) GetSwitch

func (in *Switch) GetSwitch() bool

Jump to

Keyboard shortcuts

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