istio

package
v0.0.0-...-260b785 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IsInsideCluster bool
	KubeConfigPath  string
	PrometheusAddr  string
	ProxyPort       uint32
}

Config describes the configuration used by the istio driver

func GenerateInClusterConfig

func GenerateInClusterConfig() *Config

GenerateInClusterConfig returns a in-cluster config

func GenerateOutsideClusterConfig

func GenerateOutsideClusterConfig(kubeConfigPath string) *Config

GenerateOutsideClusterConfig returns an out-of-cluster config

func (*Config) SetProxyPort

func (c *Config) SetProxyPort(port uint32)

SetProxyPort sets the port of the proxy runner

type Istio

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

Istio manages the istio on kubernetes deployment target

func NewIstioDriver

func NewIstioDriver(auth *auth.Module, c *Config) (*Istio, error)

NewIstioDriver creates a new instance of the istio driver

func (*Istio) ApplyService

func (i *Istio) ApplyService(ctx context.Context, service *model.Service) error

ApplyService deploys the service on istio

func (*Istio) ApplyServiceRole

func (i *Istio) ApplyServiceRole(ctx context.Context, role *model.Role) error

ApplyServiceRole sets role of each service

func (*Istio) ApplyServiceRoutes

func (i *Istio) ApplyServiceRoutes(ctx context.Context, projectID, serviceID string, routes model.Routes) error

ApplyServiceRoutes sets the traffic splitting logic of each service

func (*Istio) CreateProject

func (i *Istio) CreateProject(ctx context.Context, project *model.Project) error

CreateProject creates a new namespace for the client

func (*Istio) CreateSecret

func (i *Istio) CreateSecret(ctx context.Context, projectID string, secretObj *model.Secret) error

CreateSecret is used to upsert secret

func (*Istio) DeleteKey

func (i *Istio) DeleteKey(ctx context.Context, projectID string, secretName string, secretKey string) error

DeleteKey is used to delete a key from the secret!

func (*Istio) DeleteProject

func (i *Istio) DeleteProject(ctx context.Context, projectID string) error

DeleteProject deletes a namespace for the client

func (*Istio) DeleteSecret

func (i *Istio) DeleteSecret(ctx context.Context, projectID string, secretName string) error

DeleteSecret is used to delete secrets!

func (*Istio) DeleteService

func (i *Istio) DeleteService(ctx context.Context, projectID, serviceID, version string) error

DeleteService deletes a service version

func (*Istio) DeleteServiceRole

func (i *Istio) DeleteServiceRole(ctx context.Context, projectID, serviceID, id string) error

DeleteServiceRole deletes a service role

func (*Istio) GetLogs

func (i *Istio) GetLogs(ctx context.Context, projectID string, info *model.LogRequest) (io.ReadCloser, error)

GetLogs get logs of specified services

func (*Istio) GetServiceRole

func (i *Istio) GetServiceRole(ctx context.Context, projectID string) ([]*model.Role, error)

GetServiceRole gets the service role rules of each service

func (*Istio) GetServiceRoutes

func (i *Istio) GetServiceRoutes(ctx context.Context, projectID string) (map[string]model.Routes, error)

GetServiceRoutes gets the routing rules of each service

func (*Istio) GetServiceStatus

func (i *Istio) GetServiceStatus(ctx context.Context, projectID string) ([]*model.ServiceStatus, error)

GetServiceStatus gets the services status for istio

func (*Istio) GetServices

func (i *Istio) GetServices(ctx context.Context, projectID string) ([]*model.Service, error)

GetServices gets the services for istio

func (*Istio) ListSecrets

func (i *Istio) ListSecrets(ctx context.Context, projectID string) ([]*model.Secret, error)

ListSecrets lists all the secrets in the provided name-space!

func (*Istio) ScaleUp

func (i *Istio) ScaleUp(ctx context.Context, projectID, serviceID, version string) error

ScaleUp is notifies keda to scale up a service

func (*Istio) SetFileSecretRootPath

func (i *Istio) SetFileSecretRootPath(ctx context.Context, projectID string, secretName, rootPath string) error

SetFileSecretRootPath is used to set the file secret root path

func (*Istio) SetKey

func (i *Istio) SetKey(ctx context.Context, projectID string, secretName string, secretKey string, secretValObj *model.SecretValue) error

SetKey adds a new secret key-value pair

func (*Istio) Type

func (i *Istio) Type() model.DriverType

Type returns the type of the driver

func (*Istio) WaitForService

func (i *Istio) WaitForService(ctx context.Context, service *model.Service) error

WaitForService adjusts scales, up the service to scale up the number of nodes from zero to one TODO: Do one watch per service. Right now its possible to have multiple watches for the same service

Jump to

Keyboard shortcuts

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