Documentation ¶
Overview ¶
Package cilium - Error codes for the adapter
Index ¶
- Variables
- func ErrApplyHelmChart(err error) error
- func ErrCiliumCoreComponentFail(err error) error
- func ErrCreatingNS(err error) error
- func ErrCustomOperation(err error) error
- func ErrDownloadBinary(err error) error
- func ErrDownloadingTar(err error) error
- func ErrGetLatestRelease(err error) error
- func ErrGettingRelease(err error) error
- func ErrInstallBinary(err error) error
- func ErrInstallCilium(err error) error
- func ErrInvalidOAMComponentType(compName string) error
- func ErrLoadNamespace(err error, s string) error
- func ErrMakingBinExecutable(err error) error
- func ErrMeshConfig(err error) error
- func ErrParseCiliumCoreComponent(err error) error
- func ErrProcessOAM(err error) error
- func ErrRunCiliumCmd(err error, des string) error
- func ErrRunExecutable(err error) 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 Cilium
- func (h *Cilium) ApplyOperation(ctx context.Context, opReq adapter.OperationRequest) error
- func (h *Cilium) CreateKubeconfigs(kubeconfigs []string) error
- func (h *Cilium) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
- func (h *Cilium) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
- func (h *Cilium) ProcessOAM(ctx context.Context, oamReq adapter.OAMRequest) (string, error)
- type CompHandler
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInstallCiliumCode represents the errors which are generated // during Cilium service mesh install process ErrInstallCiliumCode = "1000" // ErrTarXZFCode represents the errors which are generated // during decompressing and extracting tar.gz file ErrTarXZFCode = "1001" // ErrMeshConfigCode represents the errors which are generated // when an invalid mesh config is found ErrMeshConfigCode = "1002" // ErrRunCiliumCmdCode represents the errors which are generated // during fetch manifest process ErrRunCiliumCmdCode = "1003" // ErrDownloadBinaryCode represents the errors which are generated // during binary download process ErrDownloadBinaryCode = "1004" // ErrInstallBinaryCode represents the errors which are generated // during binary installation process ErrInstallBinaryCode = "1005" // ErrSampleAppCode represents the errors which are generated // duing sample app installation ErrSampleAppCode = "1006" // ErrCustomOperationCode represents the errors which are generated // when an invalid addon operation is requested ErrCustomOperationCode = "1007" // ErrCreatingNSCode represents the errors which are generated // during the process of creating a namespace ErrCreatingNSCode = "1008" // ErrRunExecutableCode represents the errors which are generated // during the running a executable ErrRunExecutableCode = "1009" // ErrSidecarInjectionCode represents the errors which are generated // during the process of enabling/disabling sidecar injection ErrSidecarInjectionCode = "1010" // ErrOpInvalidCode represents the error which is generated when // there is an invalid operation ErrOpInvalidCode = "1011" // ErrApplyHelmChartCode represents the error which are generated // during the process of applying helm chart ErrApplyHelmChartCode = "1012" // ErrNilClientCode represents the error code which is // generated when kubernetes client is nil ErrNilClientCode = "1013" // ErrInvalidOAMComponentTypeCode represents the error code which is // generated when an invalid oam component is requested ErrInvalidOAMComponentTypeCode = "1014" // ErrCiliumCoreComponentFailCode represents the error code which is // generated when an Cilium core operations fails ErrCiliumCoreComponentFailCode = "1015" // ErrProcessOAMCode represents the error code which is // generated when an OAM operations fails ErrProcessOAMCode = "1016" // ErrParseCiliumCoreComponentCode represents the error code which is // generated when Cilium core component manifest parsing fails ErrParseCiliumCoreComponentCode = "1017" // ErrParseOAMComponentCode represents the error code which is // generated during the OAM component parsing ErrParseOAMComponentCode = "1018" // ErrParseOAMConfigCode represents the error code which is // generated during the OAM configuration parsing ErrParseOAMConfigCode = "1019" // ErrOpInvalid represents the errors which are generated // when an invalid operation is requested ErrOpInvalid = errors.New(ErrOpInvalidCode, errors.Alert, []string{"Invalid operation"}, []string{"Cilium 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"}) // 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 Meshplay server"}) // 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 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 occurred 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"}) // ErrGetLatestReleaseCode represents the error which is // generated when the latest stable version could not // be fetched during runtime component registeration ErrGetLatestReleaseCode = "1020" // ErrMakingBinExecutableCode implies error while makng cilium cli executable ErrMakingBinExecutableCode = "1025" //ErrLoadNamespaceCode occur during the process of applying namespace ErrLoadNamespaceCode = "1026" // ErrUnpackingTarCode implies error while unpacking cilium release // bundle tar ErrUnpackingTarCode = "1027" // ErrUnzipFileCode represents the errors which are generated // during unzip process ErrUnzipFileCode = "1028" // ErrDownloadingTarCode implies error while downloading cilium tar ErrDownloadingTarCode = "1029" // ErrGettingReleaseCode implies error while fetching latest release for cilium cli ErrGettingReleaseCode = "1030" ErrFetchCiliumVersionsCode = "1031" ErrFetchCiliumVersions = errors.New(ErrFetchCiliumVersionsCode, errors.Alert, []string{"could not get any cilium versions"}, []string{"versions for cilium could not be fetched"}, []string{"could not reach github.com/cilium/cilium/releases", "no versions could be fetched from cilium release page"}, []string{"make sure adapter is reachable"}) )
Functions ¶
func ErrApplyHelmChart ¶
ErrApplyHelmChart is the error for applying helm chart
func ErrCiliumCoreComponentFail ¶
ErrCiliumCoreComponentFail is the error when core Cilium component processing fails
func ErrCreatingNS ¶
ErrCreatingNS is the error while creating the namespace
func ErrCustomOperation ¶
ErrCustomOperation is the error for streaming event
func ErrDownloadBinary ¶
ErrDownloadBinary is the error while downloading Cilium binary
func ErrDownloadingTar ¶
ErrDownloadingTar is the error when tar download fails
func ErrGetLatestRelease ¶
ErrGetLatestRelease is the error for get latest versions
func ErrGettingRelease ¶
ErrGettingRelease is the error when getting release tag fails
func ErrInstallBinary ¶
ErrInstallBinary is the error while downloading Cilium binary
func ErrInstallCilium ¶
ErrInstallCilium is the error for install mesh
func ErrInvalidOAMComponentType ¶
ErrInvalidOAMComponentType is the error when the OAM component name is not valid
func ErrLoadNamespace ¶
ErrLoadNamespace is the occurend while applying namespace
func ErrMakingBinExecutable ¶
ErrMakingBinExecutable occurs when cilium cli binary couldn't be made executable
func ErrParseCiliumCoreComponent ¶
ErrParseCiliumCoreComponent is the error when Cilium core component manifest parsing fails
func ErrProcessOAM ¶
ErrProcessOAM is a generic error which is thrown when an OAM operations fails
func ErrRunCiliumCmd ¶
ErrRunCiliumCmd is the error for mesh port forward
func ErrRunExecutable ¶
ErrRunExecutable is the error while running an executable
func ErrSampleApp ¶
ErrSampleApp is the error for streaming event
func ErrUnpackingTar ¶
ErrUnpackingTar is the error when tar unpack fails
func ErrUnzipFile ¶
ErrUnzipFile is the error for unzipping the file
func New ¶
func New(c meshkitCfg.Handler, l logger.Handler, kc meshkitCfg.Handler, ev *events.EventStreamer) adapter.Handler
New initializes a new handler instance
Types ¶
type Cilium ¶
Cilium represents the Cilium adapter and embeds adapter.Adapter
func (*Cilium) ApplyOperation ¶
ApplyOperation function contains the operation handlers
func (*Cilium) CreateKubeconfigs ¶
CreateKubeconfigs creates and writes passed kubeconfig onto the filesystem
func (*Cilium) HandleApplicationConfiguration ¶
func (h *Cilium) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
HandleApplicationConfiguration handles the processing of OAM application configuration
func (*Cilium) HandleComponents ¶
func (h *Cilium) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
HandleComponents handles the processing of OAM components
func (*Cilium) ProcessOAM ¶
ProcessOAM will handles the grpc invocation for handling OAM objects