Documentation ¶
Overview ¶
Package istio - Common operations for the adapter
Package istio - Error codes for the adapter
Index ¶
- Variables
- func ErrAddonFromTemplate(err error) error
- func ErrApplyHelmChart(err error) error
- func ErrApplyPolicy(err error) error
- func ErrCreatingIstioClient(err error) error
- func ErrCustomOperation(err error) error
- func ErrDownloadingTar(err error) error
- func ErrEnvoyFilter(err error) error
- func ErrGettingIstioRelease(err error) error
- func ErrInstallUsingIstioctl(err error) error
- func ErrInvalidInstallationProfile(str string) error
- func ErrInvalidOAMComponentType(compName string) error
- func ErrIstioCoreComponentFail(err error) error
- func ErrIstioVet(err error) error
- func ErrIstioVetSync(err error) error
- func ErrLoadNamespace(err error, str string) error
- func ErrMakingBinExecutable(err error) error
- func ErrMeshConfig(err error) error
- func ErrParseIstioCoreComponent(err error) error
- func ErrProcessOAM(err error) error
- func ErrRunIstioCtlCmd(err error, des string) error
- func ErrSampleApp(err error) error
- func ErrTarXZF(err error) error
- func ErrUnpackingTar(err error) error
- func ErrUnzipFile(err error) error
- func New(c meshkitCfg.Handler, l logger.Handler, kc meshkitCfg.Handler, ...) adapter.Handler
- type CompHandler
- type Istio
- func (istio *Istio) ApplyOperation(ctx context.Context, opReq adapter.OperationRequest) error
- func (istio *Istio) CreateKubeconfigs(kubeconfigs []string) error
- func (istio *Istio) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
- func (istio *Istio) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
- func (istio *Istio) LoadNamespaceToMesh(namespace string, remove bool, kubeconfigs []string) error
- func (istio *Istio) LoadToMesh(namespace string, service string, remove bool, kubeconfigs []string) error
- func (istio *Istio) ProcessOAM(ctx context.Context, oamReq adapter.OAMRequest) (string, error)
- func (istio *Istio) RunVet(ch chan<- *meshes.EventsResponse, kubeconfigs []string)
- func (istio *Istio) StreamWarn(e *meshes.EventsResponse, err error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInstallUsingIstioctlCode represents the errors which are generated // during istio service mesh install process ErrInstallUsingIstioctlCode = "1003" // ErrUnzipFileCode represents the errors which are generated // during unzip process ErrUnzipFileCode = "1004" // ErrTarXZFCode represents the errors which are generated // during decompressing and extracting tar.gz file ErrTarXZFCode = "1005" // ErrMeshConfigCode represents the errors which are generated // when an invalid mesh config is found ErrMeshConfigCode = "1006" // ErrRunIstioCtlCmdCode represents the errors which are generated // during fetch manifest process ErrRunIstioCtlCmdCode = "1007" // ErrSampleAppCode represents the errors which are generated // duing sample app installation ErrSampleAppCode = "1008" // ErrEnvoyFilterCode represents the errors which are generated // duing envoy filter patching ErrEnvoyFilterCode = "1009" // ErrApplyPolicyCode represents the errors which are generated // duing policy apply operation ErrApplyPolicyCode = "1010" // ErrCustomOperationCode represents the errors which are generated // when an invalid addon operation is requested ErrCustomOperationCode = "1011" // ErrAddonFromTemplateCode represents the errors which are generated // during addon deployment process ErrAddonFromTemplateCode = "1012" //ErrInvalidInstallationProfileCode implies error while invalid profile option is passed in pattern file ErrInvalidInstallationProfileCode = "1013" // ErrCreatingIstioClientCode represents the errors which are generated // during creating istio client process ErrCreatingIstioClientCode = "1014" // ErrIstioVetSyncCode represents the errors which are generated // during istio-vet sync process ErrIstioVetSyncCode = "1015" // ErrIstioVetCode represents the errors which are generated // during istio-vet process ErrIstioVetCode = "1016" // ErrParseOAMComponentCode represents the error code which is // generated during the OAM component parsing ErrParseOAMComponentCode = "1017" // ErrParseOAMConfigCode represents the error code which is // generated during the OAM configuration parsing ErrParseOAMConfigCode = "1018" // ErrNilClientCode represents the error code which is // generated when kubernetes client is nil ErrNilClientCode = "1019" // ErrParseIstioCoreComponentCode represents the error code which is // generated when istio core component manifest parsing fails ErrParseIstioCoreComponentCode = "1020" // ErrInvalidOAMComponentTypeCode represents the error code which is // generated when an invalid oam component is requested ErrInvalidOAMComponentTypeCode = "1021" // ErrOpInvalidCode represents the error code which is // generated when an invalid operation is requested ErrOpInvalidCode = "1022" // ErrIstioCoreComponentFailCode represents the error code which is // generated when an istio core operations fails ErrIstioCoreComponentFailCode = "1023" // ErrProcessOAMCode represents the error code which is // generated when an OAM operations fails ErrProcessOAMCode = "1024" // ErrApplyHelmChartCode represents the error which are generated // during the process of applying helm chart ErrApplyHelmChartCode = "1025" // ErrGettingIstioReleaseCode implies failure while failing istio release // bundle ErrGettingIstioReleaseCode = "1026" // ErrUnsupportedPlatformCode implies unavailbility of Istio on the // requested platform ErrUnsupportedPlatformCode = "1027" // ErrIstioctlNotFoundCode implies istioctl couldn't be found anywhere // on the fs ErrIstioctlNotFoundCode = "1028" // ErrDownloadingTarCode implies error while downloading istio tar ErrDownloadingTarCode = "1029" // ErrUnpackingTarCode implies error while unpacking istio release // bundle tar ErrUnpackingTarCode = "1030" // ErrMakingBinExecutableCode implies error while makng istioctl executable ErrMakingBinExecutableCode = "1031" // ErrLoadNamespaceCode implies error while finding namespace ErrLoadNamespaceCode = "1032" // ErrLoadNamespaceCode implies error while finding namespace ErrFetchIstioVersionsCode = "1033" ErrFetchIstioVersions = errors.New(ErrFetchIstioVersionsCode, errors.Alert, []string{"could not get any istio versions"}, []string{"versions for istio could not be fetched"}, []string{"could not reach github.com/istio/istio/releases", "no versions could be fetched from istio release page"}, []string{"make sure adapter is reachable to github"}) // ErrOpInvalid represents the errors which are generated // when an invalid operation is requested ErrOpInvalid = errors.New(ErrOpInvalidCode, errors.Alert, []string{"Invalid operation"}, []string{"Istio adapter received an invalid operation from the meshey server"}, []string{"The operation is not supported by the adapter", "Invalid operation name"}, []string{"Check if the operation name is valid and supported by the adapter"}) // ErrParseOAMComponent represents the error which is // generated during the OAM component parsing ErrParseOAMComponent = errors.New(ErrParseOAMComponentCode, errors.Alert, []string{"error parsing the component"}, []string{"Error occurred while parsing application component in the OAM request made by Meshery server"}, []string{"Could not unmarshall configuration component received via ProcessOAM gRPC call into a valid Component struct"}, []string{"Check if Meshery Server is creating valid component for ProcessOAM gRPC call. This error should never happen and can be reported as a bug in Meshery Server. Also check if Meshery Server and adapters are referring to same component struct provided in MeshKit."}) // ErrParseOAMConfig represents the error which is // generated during the OAM configuration parsing ErrParseOAMConfig = errors.New(ErrParseOAMConfigCode, errors.Alert, []string{"error parsing the configuration"}, []string{"Error occurred while parsing configuration in the request made by Meshery Server"}, []string{"Could not unmarshall OAM config received via ProcessOAM gRPC call into a valid Config struct"}, []string{"Check if Meshery Server is creating valid config for ProcessOAM gRPC call. This error should never happen and can be reported as a bug in Meshery Server. Also, confirm that Meshery Server and Adapters are referring to same config struct provided in MeshKit"}) // ErrNilClient represents the error which is // generated when kubernetes client is nil ErrNilClient = errors.New(ErrNilClientCode, errors.Alert, []string{"kubernetes client not initialized"}, []string{"Kubernetes client is nil"}, []string{"kubernetes client not initialized"}, []string{"Reconnect the adaptor to Meshery server"}) // ErrUnsupportedPlatform represents runtime platform is // unsupported ErrUnsupportedPlatform = errors.New(ErrUnsupportedPlatformCode, errors.Alert, []string{"requested platform is not supported by Istio"}, []string{"Istio only supports Windows, Linux and Darwin"}, []string{}, []string{""}) // ErrIstioctlNotFound implies istioctl was not found locally ErrIstioctlNotFound = errors.New(ErrIstioctlNotFoundCode, errors.Alert, []string{"Unable to find Istioctl"}, []string{}, []string{}, []string{}) )
Functions ¶
func ErrAddonFromTemplate ¶ added in v0.4.11
ErrAddonFromTemplate is the error for streaming event
func ErrApplyHelmChart ¶ added in v0.5.15
ErrApplyHelmChart is the error for applying helm chart
func ErrApplyPolicy ¶ added in v0.4.14
ErrApplyPolicy is the error for streaming event
func ErrCreatingIstioClient ¶ added in v0.4.11
ErrCreatingIstioClient is the error for streaming event
func ErrCustomOperation ¶ added in v0.4.10
ErrCustomOperation is the error for streaming event
func ErrDownloadingTar ¶ added in v0.5.15
ErrDownloadingTar is the error when tar download fails
func ErrEnvoyFilter ¶ added in v0.4.14
ErrEnvoyFilter is the error for streaming event
func ErrGettingIstioRelease ¶ added in v0.5.15
ErrGettingIstioRelease is the error when the yaml unmarshal fails
func ErrInstallUsingIstioctl ¶ added in v0.5.15
ErrInstallUsingIstioctl is the error for install mesh
func ErrInvalidInstallationProfile ¶ added in v0.6.10
ErrInvalidInstallationProfile implies error while invalid profile option is passed in pattern file
func ErrInvalidOAMComponentType ¶ added in v0.5.9
ErrInvalidOAMComponentType is the error when the OAM component name is not valid
func ErrIstioCoreComponentFail ¶ added in v0.5.14
ErrIstioCoreComponentFail is the error when core Istion component processing fails
func ErrIstioVet ¶ added in v0.4.12
ErrIstioVet is the error for streaming event
func ErrIstioVetSync ¶ added in v0.4.11
ErrIstioVetSync is the error for streaming event
func ErrLoadNamespace ¶ added in v0.5.20
ErrLoadNamespace implies error while finding namespace
func ErrMakingBinExecutable ¶ added in v0.5.15
ErrMakingBinExecutable occurs when istioctl binary couldn't be made executable
func ErrMeshConfig ¶ added in v0.4.10
ErrMeshConfig is the error for mesh config
func ErrParseIstioCoreComponent ¶ added in v0.5.9
ErrParseIstioCoreComponent is the error when istio core component manifest parsing fails
func ErrProcessOAM ¶ added in v0.5.14
ErrProcessOAM is a generic error which is thrown when an OAM operations fails
func ErrRunIstioCtlCmd ¶ added in v0.4.17
ErrRunIstioCtlCmd is the error for mesh port forward
func ErrSampleApp ¶ added in v0.4.10
ErrSampleApp is the error for streaming event
func ErrUnpackingTar ¶ added in v0.5.15
ErrUnpackingTar is the error when tar unpack fails
func ErrUnzipFile ¶ added in v0.4.10
ErrUnzipFile is the error for unzipping the file
func New ¶ added in v0.4.10
func New(c meshkitCfg.Handler, l logger.Handler, kc meshkitCfg.Handler, ev *events.EventStreamer) adapter.Handler
New initializes istio handler.
Types ¶
type CompHandler ¶ added in v0.5.9
CompHandler is the type for functions which can handle OAM components
type Istio ¶ added in v0.4.10
Istio represents the istio adapter and embeds adapter.Adapter
func (*Istio) ApplyOperation ¶ added in v0.4.10
ApplyOperation applies the operation on istio
func (*Istio) CreateKubeconfigs ¶ added in v0.6.10
CreateKubeconfigs creates and writes passed kubeconfig onto the filesystem
func (*Istio) HandleApplicationConfiguration ¶ added in v0.4.19
func (istio *Istio) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
HandleApplicationConfiguration handles the processing of OAM application configuration
func (*Istio) HandleComponents ¶ added in v0.4.19
func (istio *Istio) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
HandleComponents handles the processing of OAM components
func (*Istio) LoadNamespaceToMesh ¶ added in v0.4.10
LoadNamespaceToMesh is used to mark namespaces for automatic sidecar injection (or not)
func (*Istio) LoadToMesh ¶ added in v0.4.10
func (istio *Istio) LoadToMesh(namespace string, service string, remove bool, kubeconfigs []string) error
LoadToMesh is used to mark deployment for automatic sidecar injection (or not)
func (*Istio) ProcessOAM ¶ added in v0.4.19
ProcessOAM will handles the grpc invocation for handling OAM objects
func (*Istio) RunVet ¶ added in v0.4.11
func (istio *Istio) RunVet(ch chan<- *meshes.EventsResponse, kubeconfigs []string)
RunVet runs istio-vet
func (*Istio) StreamWarn ¶ added in v0.4.11
func (istio *Istio) StreamWarn(e *meshes.EventsResponse, err error)
StreamWarn streams a warning message to the channel