Documentation ¶
Overview ¶
Package linkerd - Error codes for the adapter
Package linkerd - for lifecycle management of Linkerd
Index ¶
- Constants
- Variables
- func ErrAddonFromHelm(err error) error
- func ErrAnnotatingNamespace(err error) error
- 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 ErrInstallBinary(err error) error
- func ErrInstallLinkerd(err error) error
- func ErrInvalidOAMComponentType(compName string) error
- func ErrLinkerdCoreComponentFail(err error) error
- func ErrMeshConfig(err error) error
- func ErrParseLinkerdCoreComponent(err error) error
- func ErrProcessOAM(err error) error
- func ErrSampleApp(err error) error
- func New(c adapterconfig.Handler, l logger.Handler, kc adapterconfig.Handler, ...) adapter.Handler
- type CompHandler
- type Linkerd
- func (linkerd *Linkerd) AnnotateNamespace(namespace string, remove bool, labels map[string]string, kubeconfigs []string) error
- func (linkerd *Linkerd) ApplyOperation(ctx context.Context, opReq adapter.OperationRequest) error
- func (linkerd *Linkerd) CreateKubeconfigs(kubeconfigs []string) error
- func (linkerd *Linkerd) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
- func (linkerd *Linkerd) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
- func (linkerd *Linkerd) LoadToMesh(namespace string, service string, remove bool, kubeconfigs []string) error
- func (linkerd *Linkerd) ProcessOAM(ctx context.Context, oamReq adapter.OAMRequest) (string, error)
Constants ¶
const ( // LinkerdHelmStableRepo is the URL for linkerd stable helm repo LinkerdHelmStableRepo = "https://helm.linkerd.io/stable" // LinkerdHelmEdgeRepo is the URL for linkerd edge helm repo LinkerdHelmEdgeRepo = "https://helm.linkerd.io/edge" )
Variables ¶
var ( // ErrInstallLinkerdCode is the error code for ErrInstallLinkerd ErrInstallLinkerdCode = "1003" // ErrMeshConfigCode is the error code for ErrMeshConfig ErrMeshConfigCode = "1004" // ErrFetchManifestCode is the error code for ErrFetchManifest ErrFetchManifestCode = "1005" // ErrDownloadBinaryCode is the error code for ErrDownloadBinary ErrDownloadBinaryCode = "1006" // ErrInstallBinaryCode is the error code for ErrInstallBinary ErrInstallBinaryCode = "1007" // ErrClientConfigCode is the error code for ErrClientConfig ErrClientConfigCode = "1008" // ErrClientSetCode is the error code for ErrClientSet ErrClientSetCode = "1009" // ErrSampleAppCode is the error code for ErrSampleApp ErrSampleAppCode = "1011" // ErrCustomOperationCode is the error code for ErrCustomOperation ErrCustomOperationCode = "1012" // ErrOpInvalidCode is the error code for ErrOpInvalid ErrOpInvalidCode = "1013" // ErrInvalidOAMComponentTypeCode represents the error code which is // generated when an invalid oam component is requested ErrInvalidOAMComponentTypeCode = "1014" // ErrLinkerdCoreComponentFailCode represents the error code which is // generated when an linkerd core operations fails ErrLinkerdCoreComponentFailCode = "1015" // ErrProcessOAMCode represents the error code which is // generated when an OAM operations fails ErrProcessOAMCode = "1016" // ErrParseLinkerdCoreComponentCode represents the error code which is // generated when linkerd core component manifest parsing fails ErrParseLinkerdCoreComponentCode = "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" // ErrApplyHelmChartCode represents the error code which is // generated during the Helm Chart installation ErrApplyHelmChartCode = "1020" // ErrNilClientCode represents the error code which is // generated when Kubernetes client is nil ErrNilClientCode = "1021" // ErrAddonFromHelmCode represents the error while installing addons through helm charts ErrAddonFromHelmCode = "1022" // ErrFetchLinkerdVersionsCode represents the error code which is // generated when linkerd version fetching fails ErrFetchLinkerdVersionsCode = "1033" // ErrInvalidVersionForMeshInstallationCode represents the error while installing mesh through helm charts with invalid version ErrInvalidVersionForMeshInstallationCode = "1023" // ErrAnnotatingNamespaceCode represents the error while annotating namespace ErrAnnotatingNamespaceCode = "1024" // ErrInvalidVersionForMeshInstallation represents the error while installing mesh through helm charts with invalid version ErrInvalidVersionForMeshInstallation = errors.New(ErrInvalidVersionForMeshInstallationCode, errors.Alert, []string{"Invalid version passed for helm based installation"}, []string{"Version passed is invalid"}, []string{"Version might not be prefixed with \"stable-\" or \"edge-\""}, []string{"Version should be prefixed with \"stable-\" or \"edge-\"", "Version might be empty"}) // ErrFetchLinkerdVersions represents the error while fetching linkerd versions ErrFetchLinkerdVersions = errors.New(ErrFetchLinkerdVersionsCode, errors.Alert, []string{"could not get any linkerd versions"}, []string{"versions for linkerd could not be fetched"}, []string{"could not reach github.com/linkerd/linkerd2", "no versions could be fetched from linkerd release page"}, []string{"make sure adapter is reachable to github"}) // ErrOpInvalid is the error for invalid operation ErrOpInvalid = errors.New(ErrOpInvalidCode, errors.Alert, []string{"Invalid operation"}, []string{}, []string{}, []string{}) // 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 Meshery Adapter to Meshery Server"}) )
Functions ¶
func ErrAddonFromHelm ¶ added in v0.5.15
ErrAddonFromHelm is the error for installing addons through helm chart
func ErrAnnotatingNamespace ¶ added in v0.5.15
ErrAnnotatingNamespace is the error while annotating the namespace
func ErrApplyHelmChart ¶ added in v0.5.9
ErrApplyHelmChart is an error which is thrown when apply helm chart fails
func ErrClientConfig ¶ added in v0.4.7
ErrClientConfig is the error for setting client config
func ErrClientSet ¶ added in v0.4.7
ErrClientSet is the error for setting clientset
func ErrCustomOperation ¶ added in v0.4.8
ErrCustomOperation is the error for streaming event
func ErrDownloadBinary ¶ added in v0.4.7
ErrDownloadBinary is the error while downloading linkerd binary
func ErrFetchManifest ¶ added in v0.4.7
ErrFetchManifest is the error for mesh port forward
func ErrInstallBinary ¶ added in v0.4.7
ErrInstallBinary is the error while downloading linkerd binary
func ErrInstallLinkerd ¶ added in v0.4.7
ErrInstallLinkerd 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 ErrLinkerdCoreComponentFail ¶ added in v0.5.8
ErrLinkerdCoreComponentFail is the error when core linkerd component processing fails
func ErrMeshConfig ¶ added in v0.4.7
ErrMeshConfig is the error for mesh config
func ErrParseLinkerdCoreComponent ¶ added in v0.5.8
ErrParseLinkerdCoreComponent is the error when linkerd 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.4.7
ErrSampleApp is the error for streaming event
func New ¶ added in v0.4.7
func New(c adapterconfig.Handler, l logger.Handler, kc adapterconfig.Handler, ev *events.EventStreamer) adapter.Handler
New initializes linkerd handler.
Types ¶
type CompHandler ¶ added in v0.5.8
CompHandler is the type for functions which can handle OAM components
type Linkerd ¶ added in v0.4.7
Linkerd is the handler for the adapter
func (*Linkerd) AnnotateNamespace ¶ added in v0.5.15
func (linkerd *Linkerd) AnnotateNamespace(namespace string, remove bool, labels map[string]string, kubeconfigs []string) error
AnnotateNamespace is used to label namespaces ,for cases like automatic sidecar injection (or not). If the namespace is not present, it will create one, instead of throwing error.
func (*Linkerd) ApplyOperation ¶ added in v0.4.7
ApplyOperation applies the operation on linkerd
func (*Linkerd) CreateKubeconfigs ¶ added in v0.5.26
CreateKubeconfigs creates and writes passed kubeconfig onto the filesystem
func (*Linkerd) HandleApplicationConfiguration ¶ added in v0.5.8
func (linkerd *Linkerd) HandleApplicationConfiguration(config v1alpha1.Configuration, isDel bool, kubeconfigs []string) (string, error)
HandleApplicationConfiguration handles the processing of OAM application configuration
func (*Linkerd) HandleComponents ¶ added in v0.5.8
func (linkerd *Linkerd) HandleComponents(comps []v1alpha1.Component, isDel bool, kubeconfigs []string) (string, error)
HandleComponents handles the processing of OAM components
func (*Linkerd) LoadToMesh ¶ added in v0.4.10
func (linkerd *Linkerd) LoadToMesh(namespace string, service string, remove bool, kubeconfigs []string) error
LoadToMesh adds annotation to service
func (*Linkerd) ProcessOAM ¶ added in v0.5.8
ProcessOAM will handles the grpc invocation for handling OAM objects
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package cert package provides basic utility functions to generate x509 certificates
|
Package cert package provides basic utility functions to generate x509 certificates |
Package oam contains the definitions for OAM objects as well as the parsers and register functions associated with it
|
Package oam contains the definitions for OAM objects as well as the parsers and register functions associated with it |