Documentation ¶
Overview ¶
Package kuma - Common operations for the adapter
Index ¶
- Constants
- Variables
- func ErrApplyHelmChart(err error) error
- func ErrClientConfig(err error) error
- func ErrClientSet(err error) error
- func ErrCustomOperation(err error) error
- func ErrDownloadBinary(err error) error
- func ErrFetchManifest(err error, des string) error
- func ErrGetKumactl(err error) error
- func ErrInstallBinary(err error) error
- func ErrInstallKuma(err error) error
- func ErrInvalidOAMComponentType(compName string) error
- func ErrKumaCoreComponentFail(err error) error
- func ErrMeshConfig(err error) error
- func ErrMoveBinary(err error) error
- func ErrParseKumaCoreComponent(err error) error
- func ErrProcessOAM(err error) error
- func ErrSampleApp(err error, status string) error
- func ErrStreamEvent(err error) error
- func ErrUntar(err error) error
- func New(c meshkitCfg.Handler, l logger.Handler, kc meshkitCfg.Handler) adapter.Handler
- type CompHandler
- type Kuma
- func (kuma *Kuma) ApplyOperation(ctx context.Context, opReq adapter.OperationRequest) error
- func (kuma *Kuma) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool) (string, error)
- func (kuma *Kuma) HandleComponents(comps []v1alpha1.Component, isDel bool) (string, error)
- func (kuma *Kuma) ProcessOAM(ctx context.Context, oamReq adapter.OAMRequest) (string, error)
Constants ¶
const (
// SMIManifest is the manifest.yaml file for smi conformance tool
SMIManifest = "https://raw.githubusercontent.com/layer5io/learn-layer5/master/smi-conformance/manifest.yml"
)
Variables ¶
var ( // ErrOpInvalidCode represents the errors which are generated // when an invalid operation is invoked ErrOpInvalidCode = "1002" // ErrInstallKumaCode represents the errors which are generated // during kuma service mesh install process ErrInstallKumaCode = "1003" // ErrMeshConfigCode represents the errors which are generated // when an invalid mesh config is found ErrMeshConfigCode = "1004" // ErrFetchManifestCode represents the errors which are generated // during the process of fetching manifest ErrFetchManifestCode = "1005" // ErrClientConfigCode represents the errors which are generated // during the process of setting client config ErrClientConfigCode = "1006" // ErrClientSetCode represents the errors which are generated // during the process of setting clientset ErrClientSetCode = "1007" // ErrStreamEventCode represents the errors which are generated // during the process of streaming events ErrStreamEventCode = "1008" // ErrSampleAppCode represents the errors which are generated // during the process of installing sample app ErrSampleAppCode = "1009" // ErrGetKumactlCode represents the errors which are generated // during the process of using kumactl for installation ErrGetKumactlCode = "1010" // ErrDownloadBinaryCode represents the errors which are generated // during the process of downloading binary ErrDownloadBinaryCode = "1011" // ErrInstallBinaryCode represents the errors which are generated // during the process of installing binary ErrInstallBinaryCode = "1012" // ErrUntarCode represents the errors which are generated // during the process of untaring a compressed file ErrUntarCode = "1013" // ErrUntarDefaultCode represents the errors which are generated // during the process of untaring a compressed file ErrUntarDefaultCode = "1014" // ErrMoveBinaryCode represents the errors which are generated // during the process of moving binaries ErrMoveBinaryCode = "1015" // ErrCustomOperationCode represents the errors which are generated // during the process of handeling a custom process ErrCustomOperationCode = "1016" // ErrNilClientCode represents the error code which is // generated when kubernetes client is nil ErrNilClientCode = "1017" // ErrApplyHelmChartCode represents the error which are generated // during the process of applying helm chart ErrApplyHelmChartCode = "1018" // ErrInvalidOAMComponentTypeCode represents the error code which is // generated when an invalid oam component is requested ErrInvalidOAMComponentTypeCode = "replace1" // ErrKumaCoreComponentFailCode represents the error code which is // generated when an kuma core operations fails ErrKumaCoreComponentFailCode = "replace2" // ErrProcessOAMCode represents the error code which is // generated when an OAM operations fails ErrProcessOAMCode = "replace3" // ErrParseKumaCoreComponentCode represents the error code which is // generated when kuma core component manifest parsing fails ErrParseKumaCoreComponentCode = "replace4" // ErrParseOAMComponentCode represents the error code which is // generated during the OAM component parsing ErrParseOAMComponentCode = "replace5" // ErrParseOAMConfigCode represents the error code which is // generated during the OAM configuration parsing ErrParseOAMConfigCode = "replace6" // ErrOpInvalid represents the errors which are generated // when an operation is invalid ErrOpInvalid = errors.New(ErrOpInvalidCode, errors.Alert, []string{"Invalid operation"}, []string{"Istio adapter recived 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"}) // ErrUntarDefault represents the errors which are generated // during the process of untaring a compressed file ErrUntarDefault = errors.New(ErrUntarDefaultCode, errors.Alert, []string{"Error untaring opeartion default"}, []string{"Error occured in the process of untaring a compressed file"}, []string{"The compressed file might be corrupted"}, []string{"Clear the cache and retry the operation"}) // 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 occured while prasing application component in the OAM request made"}, []string{"Invalid OAM component passed in OAM request"}, []string{"Check if your request has vaild OAM components"}) // 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 occured while prasing component config in the OAM request made"}, []string{"Invalid OAM config passed in OAM request"}, []string{"Check if your request has vaild OAM config"}) // 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"}) )
Functions ¶
func ErrApplyHelmChart ¶ added in v0.5.8
ErrApplyHelmChart is the error for applying helm chart
func ErrClientConfig ¶ added in v0.2.0
ErrClientConfig is the error for setting client config
func ErrClientSet ¶ added in v0.2.0
ErrClientSet is the error for setting clientset
func ErrCustomOperation ¶ added in v0.4.0
ErrCustomOperation is the error occured during the process of applying custom operation
func ErrDownloadBinary ¶ added in v0.3.8
ErrDownloadBinary is the error for downloading binary
func ErrFetchManifest ¶ added in v0.3.8
ErrFetchManifest is the error occured during the process fetching manifest
func ErrGetKumactl ¶ added in v0.3.8
ErrGetKumactl is the error for getting `kumactl`
func ErrInstallBinary ¶ added in v0.3.8
ErrInstallBinary is the error for installing binary
func ErrInstallKuma ¶ added in v0.3.8
ErrInstallKuma is the error for install mesh
func ErrInvalidOAMComponentType ¶ added in v0.5.8
ErrInvalidOAMComponentType is the error when the OAM component name is not valid
func ErrKumaCoreComponentFail ¶ added in v0.5.8
ErrKumaCoreComponentFail is the error when core kuma component processing fails
func ErrMoveBinary ¶ added in v0.3.8
ErrMoveBinary is the error for moving binary
func ErrParseKumaCoreComponent ¶ added in v0.5.8
ErrParseKumaCoreComponent is the error when kuma core component manifest parsing fails
func ErrProcessOAM ¶ added in v0.5.8
ErrProcessOAM is a generic error which is thrown when an OAM operations fails
func ErrSampleApp ¶ added in v0.3.8
ErrSampleApp is the error for applying/deleting Sample App
func ErrStreamEvent ¶ added in v0.2.0
ErrStreamEvent is the error for streaming event
func New ¶
func New(c meshkitCfg.Handler, l logger.Handler, kc meshkitCfg.Handler) adapter.Handler
New initializes kuma handler.
Types ¶
type CompHandler ¶ added in v0.5.8
CompHandler is the type for functions which can handle OAM components
type Kuma ¶ added in v0.3.8
Kuma represents the kuma adapter and embeds adapter.Adapter
func (*Kuma) ApplyOperation ¶ added in v0.3.8
ApplyOperation applies the operation on kuma
func (*Kuma) HandleApplicationConfiguration ¶ added in v0.5.8
func (kuma *Kuma) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool) (string, error)
HandleApplicationConfiguration handles the processing of OAM application configuration
func (*Kuma) HandleComponents ¶ added in v0.5.8
HandleComponents handles the processing of OAM components
func (*Kuma) ProcessOAM ¶ added in v0.5.8
ProcessOAM will handles the grpc invocation for handling OAM objects