Documentation ¶
Index ¶
- type Config
- type Istio
- func (i *Istio) ApplyService(ctx context.Context, service *model.Service) error
- func (i *Istio) ApplyServiceRole(ctx context.Context, role *model.Role) error
- func (i *Istio) ApplyServiceRoutes(ctx context.Context, projectID, serviceID string, routes model.Routes) error
- func (i *Istio) CreateProject(ctx context.Context, project *model.Project) error
- func (i *Istio) CreateSecret(ctx context.Context, projectID string, secretObj *model.Secret) error
- func (i *Istio) DeleteKey(ctx context.Context, projectID string, secretName string, secretKey string) error
- func (i *Istio) DeleteProject(ctx context.Context, projectID string) error
- func (i *Istio) DeleteSecret(ctx context.Context, projectID string, secretName string) error
- func (i *Istio) DeleteService(ctx context.Context, projectID, serviceID, version string) error
- func (i *Istio) DeleteServiceRole(ctx context.Context, projectID, serviceID, id string) error
- func (i *Istio) GetLogs(ctx context.Context, projectID string, info *model.LogRequest) (io.ReadCloser, error)
- func (i *Istio) GetServiceRole(ctx context.Context, projectID string) ([]*model.Role, error)
- func (i *Istio) GetServiceRoutes(ctx context.Context, projectID string) (map[string]model.Routes, error)
- func (i *Istio) GetServiceStatus(ctx context.Context, projectID string) ([]*model.ServiceStatus, error)
- func (i *Istio) GetServices(ctx context.Context, projectID string) ([]*model.Service, error)
- func (i *Istio) ListSecrets(ctx context.Context, projectID string) ([]*model.Secret, error)
- func (i *Istio) ScaleUp(ctx context.Context, projectID, serviceID, version string) error
- func (i *Istio) SetFileSecretRootPath(ctx context.Context, projectID string, secretName, rootPath string) error
- func (i *Istio) SetKey(ctx context.Context, projectID string, secretName string, secretKey string, ...) error
- func (i *Istio) Type() model.DriverType
- func (i *Istio) WaitForService(ctx context.Context, service *model.Service) error
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 ¶
GenerateOutsideClusterConfig returns an out-of-cluster config
func (*Config) SetProxyPort ¶
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 ¶
NewIstioDriver creates a new instance of the istio driver
func (*Istio) ApplyService ¶
ApplyService deploys the service on istio
func (*Istio) ApplyServiceRole ¶
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 ¶
CreateProject creates a new namespace for the client
func (*Istio) CreateSecret ¶
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 ¶
DeleteProject deletes a namespace for the client
func (*Istio) DeleteSecret ¶
DeleteSecret is used to delete secrets!
func (*Istio) DeleteService ¶
DeleteService deletes a service version
func (*Istio) DeleteServiceRole ¶
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 ¶
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 ¶
GetServices gets the services for istio
func (*Istio) ListSecrets ¶
ListSecrets lists all the secrets in the provided name-space!
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) WaitForService ¶
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