Documentation
¶
Index ¶
- func ApplyFile(file string) error
- func ApplyFileWithNamespace(file, namespace string) error
- func ApplyLable(itemType, itemName, labelName string, overWrite bool) error
- func CreateClusterRoleBinding(clusterRole, user string) error
- func CreateConfigMapWithNamespace(name, confFile, namespace string) error
- func CreateFile(file string) error
- func DefaultConfigDir() (string, error)
- func DefaultConfigFile() (string, error)
- func DeleteAllCells() error
- func DeleteCell(cellInstance string) (string, error)
- func DeleteFile(file string) error
- func DeleteFileWithNamespace(file, namespace string) error
- func DeleteNameSpace(nameSpace string) error
- func DeletePersistedVolume(persistedVolume string) error
- func DeleteResource(kind, instance string) (string, error)
- func GetContext() (string, error)
- func GetContexts() ([]byte, error)
- func GetDeployment(namespace, deployment string) (string, error)
- func GetDeploymentNames(namespace string) ([]string, error)
- func GetGatewayAsMapInterface(gw string) (map[string]interface{}, error)
- func GetMasterNodeName() (string, error)
- func JsonPatchWithNameSpace(kind, instance, jsonPatch, nameSpace string) error
- func UseContext(context string) error
- func WaitForCell(condition string, timeoutSeconds int, resourceName string, namespace string) error
- func WaitForCluster(timeout time.Duration) error
- func WaitForCondition(condition string, timeoutSeconds int, resourceName string, namespace string) error
- func WaitForDeployment(condition string, timeoutSeconds int, resourceName string, namespace string) error
- func WaitForDeployments(namespace string, timeout time.Duration) error
- func WriteConfig(file string, conf *Config) error
- type APIDefinition
- type ApiPublisherConfig
- type AuthInfo
- type AuthProviderConfig
- type Authority
- type AutoScalingPolicy
- type AutoscalePolicy
- type AutoscalePolicyMetadata
- type AutoscalePolicySpec
- type Cell
- type CellAnnotations
- type CellSpec
- type CellStatus
- type CelleryKubeCli
- func (kubeCli *CelleryKubeCli) ApplyFile(file string) error
- func (kubeCli *CelleryKubeCli) DeleteResource(kind, instance string) (string, error)
- func (kubeCli *CelleryKubeCli) DescribeCell(cellName string) error
- func (kubeCli *CelleryKubeCli) GetCell(cellName string) (Cell, error)
- func (kubeCli *CelleryKubeCli) GetCellInstanceAsMapInterface(cell string) (map[string]interface{}, error)
- func (kubeCli *CelleryKubeCli) GetCellLogsAllComponents(cellName string) (string, error)
- func (kubeCli *CelleryKubeCli) GetCellLogsUserComponents(cellName string) (string, error)
- func (kubeCli *CelleryKubeCli) GetCells() ([]Cell, error)
- func (kubeCli *CelleryKubeCli) GetComponentLogs(cellName, componentName string) (string, error)
- func (kubeCli *CelleryKubeCli) GetComposite(compositeName string) (Composite, error)
- func (kubeCli *CelleryKubeCli) GetCompositeInstanceAsMapInterface(composite string) (map[string]interface{}, error)
- func (kubeCli *CelleryKubeCli) GetComposites() ([]Composite, error)
- func (kubeCli *CelleryKubeCli) GetInstanceBytes(instanceKind, InstanceName string) ([]byte, error)
- func (kubeCli *CelleryKubeCli) GetInstancesNames() ([]string, error)
- func (kubeCli *CelleryKubeCli) GetPodsForCell(cellName string) (Pods, error)
- func (kubeCli *CelleryKubeCli) GetPodsForComposite(compName string) (Pods, error)
- func (kubeCli *CelleryKubeCli) GetServices(cellName string) (Services, error)
- func (kubeCli *CelleryKubeCli) JsonPatch(kind, instance, jsonPatch string) error
- func (kubeCli *CelleryKubeCli) SetVerboseMode(enable bool)
- func (kubeCli *CelleryKubeCli) Version() (string, string, error)
- type Cells
- type Cluster
- type ClusterInfo
- type ClusterIngress
- type ComponentDetail
- type ComponentScalePolicy
- type ComponentTemplate
- type ComponentTemplateMetadata
- type ComponentTemplateSpec
- type Composite
- type CompositeSpec
- type CompositeStatus
- type Composites
- type Config
- type ContainerTemplate
- type Context
- type ContextInfo
- type Destination
- type Env
- type ExecConfig
- type ExecEnvVar
- type Extensions
- type Gateway
- type GatewayConfig
- type GatewayDefinition
- type GatewayGrpcApi
- type GatewayHttpApi
- type GatewaySpec
- type GatewayTcpApi
- type GwScalePolicy
- type HTTP
- type HTTPMatch
- type HTTPRoute
- type Ingress
- type IngressDetail
- type InstanceKind
- type K8SMetaData
- type K8sVersion
- type KubeCli
- type Metric
- type Node
- type NodeInfo
- type NodeItem
- type NodeMetaData
- type NodeStatus
- type Pod
- type PodCondition
- type PodMetaData
- type PodStatus
- type PodTemplate
- type Pods
- type Policy
- type Port
- type Preferences
- type Resource
- type ScaleResource
- type ScaleTargetRef
- type ScalingPolicy
- type Service
- type ServiceMetaData
- type ServicePort
- type ServiceSpec
- type Services
- type StringMatch
- type TCP
- type TCPDestination
- type TCPMatch
- type TCPPort
- type TCPRoute
- type UserInfo
- type VirtualService
- type VsMetaData
- type VsSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFileWithNamespace ¶
func ApplyLable ¶
func CreateFile ¶
func DefaultConfigDir ¶
func DefaultConfigFile ¶
func DeleteAllCells ¶
func DeleteAllCells() error
func DeleteCell ¶
func DeleteFile ¶
func DeleteFileWithNamespace ¶
func DeleteNameSpace ¶
func DeletePersistedVolume ¶
func DeleteResource ¶
func GetContext ¶
func GetContexts ¶
func GetDeployment ¶
func GetDeploymentNames ¶
func GetMasterNodeName ¶
func JsonPatchWithNameSpace ¶
func UseContext ¶
func WaitForCell ¶
func WaitForCluster ¶
func WaitForCondition ¶
func WaitForDeployment ¶
func WriteConfig ¶
Types ¶
type APIDefinition ¶
type ApiPublisherConfig ¶
type AuthInfo ¶
type AuthInfo struct {
// LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
LocationOfOrigin string `json:"-"`
// ClientCertificate is the path to a client cert file for TLS.
// +optional
ClientCertificate string `json:"client-certificate,omitempty"`
// ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
// +optional
ClientCertificateData []byte `json:"client-certificate-data,omitempty"`
// ClientKey is the path to a client key file for TLS.
// +optional
ClientKey string `json:"client-key,omitempty"`
// ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey
// +optional
ClientKeyData []byte `json:"client-key-data,omitempty"`
// Token is the bearer token for authentication to the kubernetes cluster.
// +optional
Token string `json:"token,omitempty"`
// TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence.
// +optional
TokenFile string `json:"tokenFile,omitempty"`
// Impersonate is the username to act-as.
// +optional
Impersonate string `json:"act-as,omitempty"`
// ImpersonateGroups is the groups to imperonate.
// +optional
ImpersonateGroups []string `json:"act-as-groups,omitempty"`
// ImpersonateUserExtra contains additional information for impersonated user.
// +optional
ImpersonateUserExtra map[string][]string `json:"act-as-user-extra,omitempty"`
// Username is the username for basic authentication to the kubernetes cluster.
// +optional
Username string `json:"username,omitempty"`
// Password is the password for basic authentication to the kubernetes cluster.
// +optional
Password string `json:"password,omitempty"`
// AuthProvider specifies a custom authentication plugin for the kubernetes cluster.
// +optional
AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"`
// Exec specifies a custom exec-based authentication plugin for the kubernetes cluster.
// +optional
Exec *ExecConfig `json:"exec,omitempty"`
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
// +optional
Extensions map[string]interface{} `json:"extensions,omitempty"`
}
AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are.
type AuthProviderConfig ¶
type AuthProviderConfig struct {
Name string `json:"name"`
// +optional
Config map[string]string `json:"config,omitempty"`
}
AuthProviderConfig holds the configuration for a specified auth provider.
type AutoScalingPolicy ¶
type AutoScalingPolicy struct {
Components []ComponentScalePolicy `json:"components,omitempty"`
Gateway GwScalePolicy `json:"gateway,omitempty"`
}
type AutoscalePolicy ¶
type AutoscalePolicy struct {
Kind string `json:"kind"`
APIVersion string `json:"apiVersion"`
Metadata AutoscalePolicyMetadata `json:"metadata"`
Spec AutoscalePolicySpec `json:"spec"`
}
type AutoscalePolicyMetadata ¶
type AutoscalePolicyMetadata struct {
Name string `json:"name"`
}
type AutoscalePolicySpec ¶
type Cell ¶
type Cell struct {
//TODO: Remove components from Cell Struct
Component map[string]ComponentDetail `json:"components,omitempty"`
Kind string `json:"kind"`
APIVersion string `json:"apiVersion"`
CellMetaData K8SMetaData `json:"metadata"`
CellSpec CellSpec `json:"spec"`
CellStatus CellStatus `json:"status"`
}
type CellAnnotations ¶
type CellAnnotations struct {
Organization string `json:"mesh.cellery.io/cell-image-org"`
Name string `json:"mesh.cellery.io/cell-image-name"`
Version string `json:"mesh.cellery.io/cell-image-version"`
Dependencies string `json:"mesh.cellery.io/cell-dependencies"`
ApiVersion string `json:"mesh.cellery.io/apiVersion"`
OriginalDependencyComponentServices string `json:"mesh.cellery.io/original-component-svcs,omitempty"`
}
type CellSpec ¶
type CellSpec struct {
ComponentTemplates []ComponentTemplate `json:"components"`
GateWayTemplate Gateway `json:"gateway,omitempty"`
}
type CellStatus ¶
type CelleryKubeCli ¶
type CelleryKubeCli struct {
}
func NewCelleryKubeCli ¶
func NewCelleryKubeCli() *CelleryKubeCli
NewCelleryCli returns a CelleryCli instance.
func (*CelleryKubeCli) ApplyFile ¶
func (kubeCli *CelleryKubeCli) ApplyFile(file string) error
func (*CelleryKubeCli) DeleteResource ¶
func (kubeCli *CelleryKubeCli) DeleteResource(kind, instance string) (string, error)
func (*CelleryKubeCli) DescribeCell ¶
func (kubeCli *CelleryKubeCli) DescribeCell(cellName string) error
func (*CelleryKubeCli) GetCell ¶
func (kubeCli *CelleryKubeCli) GetCell(cellName string) (Cell, error)
func (*CelleryKubeCli) GetCellInstanceAsMapInterface ¶
func (kubeCli *CelleryKubeCli) GetCellInstanceAsMapInterface(cell string) (map[string]interface{}, error)
func (*CelleryKubeCli) GetCellLogsAllComponents ¶
func (kubeCli *CelleryKubeCli) GetCellLogsAllComponents(cellName string) (string, error)
func (*CelleryKubeCli) GetCellLogsUserComponents ¶
func (kubeCli *CelleryKubeCli) GetCellLogsUserComponents(cellName string) (string, error)
func (*CelleryKubeCli) GetCells ¶
func (kubeCli *CelleryKubeCli) GetCells() ([]Cell, error)
GetCells returns mock cell instances array.
func (*CelleryKubeCli) GetComponentLogs ¶
func (kubeCli *CelleryKubeCli) GetComponentLogs(cellName, componentName string) (string, error)
func (*CelleryKubeCli) GetComposite ¶
func (kubeCli *CelleryKubeCli) GetComposite(compositeName string) (Composite, error)
func (*CelleryKubeCli) GetCompositeInstanceAsMapInterface ¶
func (kubeCli *CelleryKubeCli) GetCompositeInstanceAsMapInterface(composite string) (map[string]interface{}, error)
func (*CelleryKubeCli) GetComposites ¶
func (kubeCli *CelleryKubeCli) GetComposites() ([]Composite, error)
func (*CelleryKubeCli) GetInstanceBytes ¶
func (kubeCli *CelleryKubeCli) GetInstanceBytes(instanceKind, InstanceName string) ([]byte, error)
func (*CelleryKubeCli) GetInstancesNames ¶
func (kubeCli *CelleryKubeCli) GetInstancesNames() ([]string, error)
func (*CelleryKubeCli) GetPodsForCell ¶
func (kubeCli *CelleryKubeCli) GetPodsForCell(cellName string) (Pods, error)
func (*CelleryKubeCli) GetPodsForComposite ¶
func (kubeCli *CelleryKubeCli) GetPodsForComposite(compName string) (Pods, error)
func (*CelleryKubeCli) GetServices ¶
func (kubeCli *CelleryKubeCli) GetServices(cellName string) (Services, error)
func (*CelleryKubeCli) JsonPatch ¶
func (kubeCli *CelleryKubeCli) JsonPatch(kind, instance, jsonPatch string) error
func (*CelleryKubeCli) SetVerboseMode ¶
func (kubeCli *CelleryKubeCli) SetVerboseMode(enable bool)
type Cluster ¶
type Cluster struct {
// LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
LocationOfOrigin string `json:"-"`
// Server is the address of the kubernetes cluster (https://hostname:port).
Server string `json:"server"`
// InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.
// +optional
InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`
// CertificateAuthority is the path to a cert file for the certificate authority.
// +optional
CertificateAuthority string `json:"certificate-authority,omitempty"`
// CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority
// +optional
CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"`
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
// +optional
Extensions map[string]interface{} `json:"extensions,omitempty"`
}
Cluster contains information about how to communicate with a kubernetes cluster
type ClusterInfo ¶
type ClusterIngress ¶
type ClusterIngress struct {
Host string `json:"host,omitempty"`
Tls interface{} `json:"tls,omitempty"`
}
type ComponentDetail ¶
type ComponentDetail struct {
Ingress map[string]IngressDetail `json:"ingresses"`
ComponentName string `json:"name"`
}
type ComponentScalePolicy ¶
type ComponentScalePolicy struct {
Name string `json:"name,omitempty"`
ScalingPolicy interface{} `json:"scalingPolicy,omitempty"`
}
type ComponentTemplate ¶
type ComponentTemplate struct {
Metadata ComponentTemplateMetadata `json:"metadata"`
Spec ComponentTemplateSpec `json:"spec"`
}
type ComponentTemplateMetadata ¶
type ComponentTemplateMetadata struct {
Name string `json:"name"`
}
type ComponentTemplateSpec ¶
type ComponentTemplateSpec struct {
PodTemplate PodTemplate `json:"template"`
Ports []Port `json:"ports"`
}
type Composite ¶
type Composite struct {
Kind string `json:"kind"`
APIVersion string `json:"apiVersion"`
CompositeMetaData K8SMetaData `json:"metadata"`
CompositeSpec CompositeSpec `json:"spec"`
CompositeStatus CompositeStatus `json:"status"`
}
func GetComposite ¶
type CompositeSpec ¶
type CompositeSpec struct {
ComponentTemplates []ComponentTemplate `json:"components"`
}
type CompositeStatus ¶
type Composites ¶
type Composites struct {
Items []Composite `json:"items"`
}
func GetComposites ¶
func GetComposites() (Composites, error)
type Config ¶
type Config struct {
// Legacy field from pkg/api/types.go TypeMeta.
// TODO(jlowdermilk): remove this after eliminating downstream dependencies.
// +optional
Kind string `json:"kind,omitempty"`
// Legacy field from pkg/api/types.go TypeMeta.
// TODO(jlowdermilk): remove this after eliminating downstream dependencies.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Preferences holds general information to be use for cli interactions
Preferences Preferences `json:"preferences"`
// Clusters is a map of referencable names to cluster configs
Clusters []*ClusterInfo `json:"clusters"`
// AuthInfos is a map of referencable names to user configs
AuthInfos []*UserInfo `json:"users"`
// Contexts is a map of referencable names to context configs
Contexts []*ContextInfo `json:"contexts"`
// CurrentContext is the name of the context that you would like to use by default
CurrentContext string `json:"current-context"`
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
// +optional
Extensions map[string]interface{} `json:"extensions,omitempty"`
}
Config holds the information needed to build connect to remote kubernetes clusters as a given user IMPORTANT if you add fields to this struct, please update IsConfigEmpty() +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func MergeConfig ¶
func ReadConfig ¶
type ContainerTemplate ¶
type Context ¶
type Context struct {
// LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
LocationOfOrigin string `json:"-"`
// Cluster is the name of the cluster for this context
Cluster string `json:"cluster"`
// AuthInfo is the name of the authInfo for this context
AuthInfo string `json:"user"`
// Namespace is the default namespace to use on unspecified requests
// +optional
Namespace string `json:"namespace,omitempty"`
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
// +optional
Extensions map[string]interface{} `json:"extensions,omitempty"`
}
Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with)
type ContextInfo ¶
type Destination ¶
type Destination struct {
Host string `json:"host"`
}
type ExecConfig ¶
type ExecConfig struct {
// Command to execute.
Command string `json:"command"`
// Arguments to pass to the command when executing it.
// +optional
Args []string `json:"args"`
// Env defines additional environment variables to expose to the process. These
// are unioned with the host's environment, as well as variables client-go uses
// to pass argument to the plugin.
// +optional
Env []ExecEnvVar `json:"env"`
// Preferred input version of the ExecInfo. The returned ExecCredentials MUST use
// the same encoding version as the input.
APIVersion string `json:"apiVersion,omitempty"`
}
ExecConfig specifies a command to provide client credentials. The command is exec'd and outputs structured stdout holding credentials.
See the client.authentiction.k8s.io API group for specifications of the exact input and output format
type ExecEnvVar ¶
ExecEnvVar is used for setting environment variables when executing an exec-based credential plugin.
type Extensions ¶
type Extensions struct {
ApiPublisher ApiPublisherConfig `json:"apiPublisher,omitempty"`
ClusterIngress ClusterIngress `json:"clusterIngress"`
Oidc interface{} `json:"oidc,omitempty"`
}
type Gateway ¶
type Gateway struct {
GatewaySpec GatewaySpec `json:"spec,omitempty"`
}
type GatewayConfig ¶
type GatewayDefinition ¶
type GatewayGrpcApi ¶
type GatewayGrpcApi struct {
Backend string `json:"backend"`
Context string `json:"context"`
Definitions []GatewayDefinition `json:"definitions"`
Global bool `json:"global"`
Vhost string `json:"vhost"`
}
type GatewayHttpApi ¶
type GatewayHttpApi struct {
Context string `json:"context"`
Version string `json:"version"`
Definitions []APIDefinition `json:"definitions"`
Global bool `json:"global"`
Authenticate bool `json:"authenticate"`
Port uint32 `json:"port"`
Destination Destination `json:"destination,omitempty"`
ZeroScale bool `json:"zeroScale,omitempty"`
}
type GatewaySpec ¶
type GatewaySpec struct {
Ingress Ingress `json:"ingress,omitempty"`
}
type GatewayTcpApi ¶
type GatewayTcpApi struct {
Backend string `json:"backend"`
Context string `json:"context"`
Definitions []GatewayDefinition `json:"definitions"`
Global bool `json:"global"`
Vhost string `json:"vhost"`
}
type GwScalePolicy ¶
type GwScalePolicy struct {
ScalingPolicy interface{} `json:"scalingPolicy,omitempty"`
}
type HTTPMatch ¶
type HTTPMatch struct {
Authority Authority `json:"authority"`
SourceLabels map[string]string `json:"sourceLabels"`
Headers map[string]*StringMatch `json:"headers,omitempty"`
}
type HTTPRoute ¶
type HTTPRoute struct {
Destination Destination `json:"destination"`
Weight int `json:"weight,omitempty"`
}
type Ingress ¶
type Ingress struct {
Extensions Extensions `json:"extensions,omitempty"`
HttpApis []GatewayHttpApi `json:"http,omitempty"`
TcpApis []GatewayTcpApi `json:"tcp,omitempty"`
GrpcApis []GatewayGrpcApi `json:"grpc,omitempty"`
}
type IngressDetail ¶
type IngressDetail struct {
IngressType string `json:"ingressType"`
IngressTypeTCP string `json:"ingressTypeTCP"`
ApiVersion string `json:"apiVersion"`
Port int `json:"port"`
Context string `json:"context"`
Expose string `json:"expose"`
Definition map[string][]APIDefinition `json:"definition"`
GatewayPort int `json:"gatewayPort"`
GatewayConfig GatewayConfig `json:"gatewayConfig"`
}
type InstanceKind ¶
type InstanceKind string
const ( InstanceKindCell InstanceKind = "cells.mesh.cellery.io" InstanceKindComposite InstanceKind = "composites.mesh.cellery.io" )
type K8SMetaData ¶
type K8SMetaData struct {
CreationTimestamp string `json:"creationTimestamp"`
Annotations CellAnnotations `json:"annotations"`
Name string `json:"name"`
}
type K8sVersion ¶
type KubeCli ¶
type KubeCli interface {
GetCells() ([]Cell, error)
SetVerboseMode(enable bool)
DeleteResource(kind, instance string) (string, error)
GetComposites() ([]Composite, error)
GetInstancesNames() ([]string, error)
GetCell(cellName string) (Cell, error)
GetComposite(compositeName string) (Composite, error)
GetInstanceBytes(instanceKind, InstanceName string) ([]byte, error)
DescribeCell(cellName string) error
Version() (string, string, error)
GetServices(cellName string) (Services, error)
GetCellLogsUserComponents(cellName string) (string, error)
GetCellLogsAllComponents(cellName string) (string, error)
GetComponentLogs(cellName, componentName string) (string, error)
JsonPatch(kind, instance, jsonPatch string) error
ApplyFile(file string) error
GetCellInstanceAsMapInterface(cell string) (map[string]interface{}, error)
GetCompositeInstanceAsMapInterface(composite string) (map[string]interface{}, error)
GetPodsForCell(cellName string) (Pods, error)
GetPodsForComposite(compName string) (Pods, error)
}
KubeCli represents kubernetes client.
type NodeItem ¶
type NodeItem struct {
Metadata NodeMetaData `json:"metadata"`
Status NodeStatus `json:"status"`
}
type NodeMetaData ¶
type NodeMetaData struct {
Name string `json:"name"`
}
type NodeStatus ¶
type NodeStatus struct {
NodeInfo NodeInfo `json:"nodeInfo"`
}
type Pod ¶
type Pod struct {
MetaData PodMetaData `json:"metadata"`
PodStatus PodStatus `json:"status"`
}
type PodCondition ¶
type PodMetaData ¶
type PodMetaData struct {
Name string `json:"name"`
}
type PodStatus ¶
type PodStatus struct {
Phase string `json:"phase"`
StartTime string `json:"startTime"`
Conditions []PodCondition `json:"conditions"`
}
type PodTemplate ¶
type PodTemplate struct {
Containers []ContainerTemplate `json:"containers"`
}
type Policy ¶
type Policy struct {
MinReplicas string `json:"minReplicas"`
MaxReplicas int `json:"maxReplicas"`
ScaleTargetRef ScaleTargetRef `json:"scaleTargetRef"`
Metrics []Metric `json:"metrics"`
}
type Preferences ¶
type Preferences struct {
// +optional
Colors bool `json:"colors,omitempty"`
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
// +optional
Extensions map[string]interface{} `json:"extensions,omitempty"`
}
IMPORTANT if you add fields to this struct, please update IsConfigEmpty()
type ScaleResource ¶
type ScaleResource struct {
Spec struct {
Components []struct {
Metadata struct {
Name string `json:"name,omitempty"`
} `json:"metadata,omitempty"`
Spec struct {
ScalingPolicy interface{} `json:"scalingPolicy,omitempty"`
} `json:"spec,omitempty"`
} `json:"components,omitempty"`
Gateway struct {
Metadata struct {
Name string `json:"name,omitempty"`
} `json:"metadata,omitempty"`
Spec struct {
ScalingPolicy interface{} `json:"scalingPolicy,omitempty"`
} `json:"spec,omitempty"`
} `json:"gateway,omitempty"`
} `json:"spec,omitempty"`
}
type ScaleTargetRef ¶
type ScalingPolicy ¶
type ScalingPolicy struct {
Hpa struct {
Overridable *bool `json:"overridable,omitempty"`
} `json:"hpa,omitempty"`
}
type Service ¶
type Service struct {
Metadata ServiceMetaData `json:"metadata"`
Spec ServiceSpec `json:"spec"`
}
func GetService ¶
type ServiceMetaData ¶
type ServiceMetaData struct {
Name string `json:"name"`
}
type ServicePort ¶
type ServicePort struct {
Port int `json:"port"`
}
type ServiceSpec ¶
type ServiceSpec struct {
Ports []ServicePort `json:"ports"`
ExternalIPs []string `json:"externalIPs"`
}
type StringMatch ¶
type TCPDestination ¶
type TCPRoute ¶
type TCPRoute struct {
Destination TCPDestination `json:"destination"`
Weight int `json:"weight,omitempty"`
}
type VirtualService ¶
type VirtualService struct {
Kind string `json:"kind"`
APIVersion string `json:"apiVersion"`
VsMetaData VsMetaData `json:"metadata"`
VsSpec VsSpec `json:"spec"`
}
func GetVirtualService ¶
func GetVirtualService(vs string) (VirtualService, error)
type VsMetaData ¶
type VsMetaData struct {
Name string `json:"name"`
}