services

package
v1.16.2-keleustes.2019... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound indicates the release was not found.
	ErrNotFound = errors.New("release not found")

	// Base class for API exceptions and error handling.
	ApiException = errors.New("An unknown API error occurred.")

	// Exception that occurs during chart cleanup.
	ApiBaseException = errors.New("There was an error listing the Helm chart releases.")

	// Exception that occurs during chart cleanup.
	ApiJsonException = errors.New("There was an error listing the Helm chart releases.")

	// Exception that occurs when the server returns a 401 Unauthorized error.
	ClientUnauthorizedError = errors.New("There was an error listing the Helm chart releases.")

	// Exception that occurs when the server returns a 403 Forbidden error.
	ClientForbiddenError = errors.New("There was an error listing the Helm chart releases.")

	// Exception that occurs when the server returns a 500 Internal Server error.
	ClientError = errors.New("There was an error listing the Helm chart releases.")

	// Base class for Armada handler exception and error handling.
	ArmadaException = errors.New("An unknown Armada handler error occurred.")

	ArmadaTimeoutException = errors.New("Armada timed out waiting on: %s")

	// Exception that occurs when Armada encounters a release with status other
	// than DEPLOYED that is designated `protected` in the Chart and
	// continue_processing` is False.
	ProtectedReleaseException = errors.New("Armada encountered protected release {} in {} status")

	// Exception that occurs when Armada encounters invalid values.yaml content in
	// a helm chart.
	InvalidValuesYamlException = errors.New("Armada encountered invalid values.yaml in helm chart: %s")

	// Exception that occurs when Armada encounters invalid override yaml in
	// helm chart.
	InvalidOverrideValuesYamlException = errors.New("Armada encountered invalid values.yaml in helm chart: %s")

	// Exception that occurs while deploying charts.
	ChartDeployException = errors.New("Exception deploying charts: %s")

	// Exception that occurs while waiting for resources to become ready.
	WaitException = errors.New("message")

	// Exception that occurs when it is detected that an existing release
	// operation (e.g. install, update, rollback, delete) is likely still pending.
	DeploymentLikelyPendingException = errors.New("Existing deployment likely pending release={}, status={}")

	// Base class for Armada exception and error handling.
	ArmadaBaseException = errors.New("ArmadaBaseException")

	// Base class for the Chartbuilder handler exception and error handling.
	ChartBuilderException = errors.New("An unknown Armada handler error occurred.")

	// Exception that occurs when dependencies cannot be resolved.
	DependencyException = errors.New("Failed to resolve dependencies for chart_name.")

	// Exception that occurs when Helm Chart fails to build.
	HelmChartBuildException = errors.New("Failed to build Helm chart for {chart_name}.")

	// Exception that occurs while trying to read a file in the chart directory.
	FilesLoadException = errors.New("FilesLoadException")

	// Exception that occurs when there is an error loading files contained in .helmignore.
	IgnoredFilesLoadException = errors.New("An error occurred while loading the ignored files in .helmignore")

	// Exception that occurs when metadata loading fails.
	MetadataLoadException = errors.New("Failed to load metadata from chart yaml file")

	// Exception for unknown chart source type.
	UnknownChartSourceException = errors.New("Unknown source type source_type for chart chart_name")

	// Base class for Kubernetes exceptions and error handling.
	KubernetesException = errors.New("An unknown Kubernetes error occurred.")

	// Exception for timing out during a watch on a Kubernetes object
	KubernetesWatchTimeoutException = errors.New("Kubernetes Watch has timed out.")

	// Exception for getting an unknown event type from the Kubernetes API
	KubernetesUnknownStreamingEventTypeException = errors.New("An unknown event type was returned from the streaming API.")

	// Exception for getting an error from the Kubernetes API
	KubernetesErrorEventException = errors.New("An error event was returned from the streaming API.")

	// An exception occurred while attempting to build an Armada manifest. The
	// exception will return with details as to why.
	ManifestException = errors.New("An error occurred while generating the manifest: %(details)s.")

	// An exception occurred while attempting to build the chart for an
	// Armada manifest. The exception will return with details as to why.
	BuildChartException = errors.New("An error occurred while trying to build chart: %(details)s.")

	// An exception occurred while attempting to build the chart group for an
	// Armada manifest. The exception will return with details as to why.
	BuildChartGroupException = errors.New("An error occurred while building chart group: %(details)s.")

	// An exception occurred while attempting to build a chart dependency for an
	// Armada manifest. The exception will return with details as to why.
	ChartDependencyException = errors.New("An error occurred while building a dependency chart")

	// Base class for Override handler exception and error handling.
	OverrideException = errors.New("An unknown Override handler error occurred.")

	// Exception that occurs when an invalid override type is used with the
	// set flag.
	InvalidOverrideTypeException = errors.New("Override type {} is invalid")

	// Exception that occurs when an invalid override file is provided.
	InvalidOverrideFileException = errors.New("{} is not a valid override file")

	// Exception that occurs when an invalid value is used with the set flag.
	InvalidOverrideValueException = errors.New("{} is not a valid override statement.")

	// Exception that occurs when an invalid value is used with the set flag.
	UnknownDocumentOverrideException = errors.New("Unable to find {1} document schema: {0}")

	//Base class for Git exceptions and error handling.
	SourceException = errors.New("An unknown error occurred while accessing a chart source.")

	// Exception when an error occurs cloning a Git repository.
	GitException = errors.New("Git exception occurred location may not be a valid git repository.")

	// Exception that occurs when authentication fails for cloning a repo.
	GitAuthException = errors.New("Failed to authenticate for repo {} with ssh-key at path {}")

	// Exception when an error occurs cloning a Git repository
	// through a proxy.
	GitProxyException = errors.New("Could not resolve proxy [location].")

	// Exception that occurs when an SSH key could not be found.
	GitSSHException = errors.New("Failed to find specified SSH key: {}.")

	// Exception that occurs for an invalid dir.
	SourceCleanupException = errors.New("target_dir is not a valid directory.")

	// Exception that occurs when the tarball cannot be downloaded from the
	// provided URL.
	TarballDownloadException = errors.New("Unable to download from tarball_url")

	// Exception that occurs when extracting the tarball fails.
	TarballExtractException = errors.New("Unable to extract tarball_dir")

	// Exception that occurs when a nonexistant path is accessed.
	InvalidPathException = errors.New("Unable to access path path")

	// Exception for unknown chart source type.
	ChartSourceException = errors.New("Unknown source type source_type for chart chart_name")

	// Base class for Tiller exceptions and error handling.
	TillerException = errors.New("An unknown Tiller error occurred.")

	// Exception for tiller service being unavailable.
	TillerServicesUnavailableException = errors.New("Tiller services unavailable.")

	// Exception that occurs during chart cleanup.
	ChartCleanupException = errors.New("An error occurred during cleanup while removing {}")

	// Exception that occurs when listing charts
	ListChartsException = errors.New("There was an error listing the Helm chart releases.")

	// Exception that occurs when a job deletion
	PostUpdateJobDeleteException = errors.New("Failed to delete k8s job {} in {}")

	// Exception that occurs when a job creation fails.
	PostUpdateJobCreateException = errors.New("Failed to create k8s job {} in {}")

	//
	PreUpdateJobDeleteException = errors.New("Failed to delete k8s job {} in {}")

	// Exception that occurs when a release fails to install, upgrade, delete,
	// or test.
	ReleaseException = errors.New("Failed to {} release: {} - Tiller Message: {}")

	// Exception that occurs when a release test fails.
	TestFailedException = errors.New("Test failed for release: {}")

	// Exception that occurs during a failed gRPC channel creation
	ChannelException = errors.New("Failed to create gRPC channel.")

	// Exception that occurs during a failed Release Testing.
	GetReleaseStatusException = errors.New("Failed to get {} status {} version")

	// Exception that occurs during a failed Release Testing
	GetReleaseContentException = errors.New("Failed to get {} content {} version {}")

	// Exception that occurs during a failed Release Rollback
	RollbackReleaseException = errors.New("Failed to rollback release {} to version {}")

	// Exception that occurs when a tiller pod cannot be found using the labels
	// specified in the Armada config.
	TillerPodNotFoundException = errors.New("Could not find Tiller pod with labels {}")

	// Exception that occurs when no tiller pod is found in a running state.
	TillerPodNotRunningException = errors.New("No Tiller pods found in running state")

	// Exception that occurs during a failed Release Testing
	TillerVersionException = errors.New("Failed to get Tiller Version")

	// Exception that occurs when paging through releases listed by tiller
	// and the total releases changes between pages.
	TillerListReleasesPagingException = errors.New("Failed to page through tiller releases")

	// Base class for linting exceptions and errors.
	ValidateException = errors.New("An unknown linting error occurred.")

	// Exception for invalid manifests.
	InvalidManifestException = errors.New("Armada manifest(s) failed validation")

	// Exception that occurs when an invalid filename is encountered.
	InvalidChartNameException = errors.New("Chart name must be a string.")

	// Exception when invalid chart definition is encountered.
	InvalidChartDefinitionException = errors.New("Invalid chart definition. Chart definition must be array.")

	// Exception that occurs when a release is invalid.
	InvalidReleaseException = errors.New("Release needs to be a string.")

	// Exception that occurs when an Armada object is not declared.
	InvalidArmadaObjectException = errors.New("An Armada object failed internal validation")
)

Functions

This section is empty.

Types

type ArmadaChartGroupManager

type ArmadaChartGroupManager interface {
	ResourceName() string
	IsInstalled() bool
	IsUpdateRequired() bool
	Sync(context.Context) error
	InstallResource(context.Context) (*av1.ArmadaCharts, error)
	UpdateResource(context.Context) (*av1.ArmadaCharts, *av1.ArmadaCharts, error)
	ReconcileResource(context.Context) (*av1.ArmadaCharts, error)
	UninstallResource(context.Context) (*av1.ArmadaCharts, error)
}

ArmdaChartGroupManager manages a Armada Chart Group. It can install, update, reconcile, and uninstall a list of Armada Charts` .

type ArmadaManagerFactory

type ArmadaManagerFactory interface {
	NewArmadaChartGroupManager(r *av1.ArmadaChartGroup) ArmadaChartGroupManager
	NewArmadaManifestManager(r *av1.ArmadaManifest) ArmadaManifestManager
}

ManagerFactory creates Managers that are specific to custom resources. It is used by the HelmOperatorReconciler during resource reconciliation, and it improves decoupling between reconciliation logic and the Helm backend components used to manage releases.

type ArmadaManifestManager

type ArmadaManifestManager interface {
	ResourceName() string
	IsInstalled() bool
	IsUpdateRequired() bool
	Sync(context.Context) error
	InstallResource(context.Context) (*av1.ArmadaChartGroups, error)
	UpdateResource(context.Context) (*av1.ArmadaChartGroups, *av1.ArmadaChartGroups, error)
	ReconcileResource(context.Context) (*av1.ArmadaChartGroups, error)
	UninstallResource(context.Context) (*av1.ArmadaChartGroups, error)
}

ArmdaManifestManager manages a Armada Chart Group. It can install, update, reconcile, and uninstall a list of Armada Charts` .

type DependentResourceWatchUpdater

type DependentResourceWatchUpdater func([]unstructured.Unstructured) error

func BuildDependentResourceWatchUpdater

func BuildDependentResourceWatchUpdater(mgr manager.Manager, owner *unstructured.Unstructured,
	c controller.Controller, dependentPredicate crtpredicate.Funcs) DependentResourceWatchUpdater

BuildDependentResourcesWatchUpdater builds a function that adds watches for resources in released Helm charts.

type HelmManager

type HelmManager interface {
	ReleaseName() string
	IsInstalled() bool
	IsUpdateRequired() bool
	Sync(context.Context) error
	InstallRelease(context.Context) (*HelmRelease, error)
	UpdateRelease(context.Context) (*HelmRelease, *HelmRelease, error)
	ReconcileRelease(context.Context) (*HelmRelease, error)
	UninstallRelease(context.Context) (*HelmRelease, error)
}

Manager manages a Helm release. It can install, update, reconcile, and uninstall a release.

type HelmManagerFactory

type HelmManagerFactory interface {
	NewArmadaChartManager(r *av1.ArmadaChart) HelmManager
}

ManagerFactory creates Managers that are specific to custom resources. It is used by the HelmOperatorReconciler during resource reconciliation, and it improves decoupling between reconciliation logic and the Helm backend components used to manage releases.

type KubernetesDependency

type KubernetesDependency struct {
}

func (*KubernetesDependency) ArmadaChartGroupStatusChanged

func (obj *KubernetesDependency) ArmadaChartGroupStatusChanged(u *unstructured.Unstructured, v *unstructured.Unstructured) (bool, string, string)

func (*KubernetesDependency) ArmadaChartStatusChanged

func (obj *KubernetesDependency) ArmadaChartStatusChanged(u *unstructured.Unstructured, v *unstructured.Unstructured) (bool, string, string)

func (*KubernetesDependency) ArmadaManifestStatusChanged

func (obj *KubernetesDependency) ArmadaManifestStatusChanged(u *unstructured.Unstructured, v *unstructured.Unstructured) (bool, string, string)

func (*KubernetesDependency) CustomResourceStatusChanged

func (obj *KubernetesDependency) CustomResourceStatusChanged(key string,
	u *unstructured.Unstructured,
	v *unstructured.Unstructured) (bool, string, string)

Compare the status between two CustomResource A status of "" is considered as a default value, hence transition to and from "" is not considered as a status change.

func (*KubernetesDependency) IsArmadaChartFailedOrError

func (obj *KubernetesDependency) IsArmadaChartFailedOrError(u *unstructured.Unstructured) bool

Check the state of the ArmadaChart to figure out if it is still running

func (*KubernetesDependency) IsArmadaChartGroupFailedOrError

func (obj *KubernetesDependency) IsArmadaChartGroupFailedOrError(u *unstructured.Unstructured) bool

Check the state of the ArmadaChartGroup to figure out if it failed

func (*KubernetesDependency) IsArmadaChartGroupReady

func (obj *KubernetesDependency) IsArmadaChartGroupReady(u *unstructured.Unstructured) bool

Check the state of the ArmadaChartGroup to figure out if it is still running

func (*KubernetesDependency) IsArmadaChartReady

func (obj *KubernetesDependency) IsArmadaChartReady(u *unstructured.Unstructured) bool

Check the state of the ArmadaChart to figure out if it is still running

func (*KubernetesDependency) IsArmadaManifestFailedOrError

func (obj *KubernetesDependency) IsArmadaManifestFailedOrError(u *unstructured.Unstructured) bool

Check the state of the ArmadaManifest to figure out if it failed

func (*KubernetesDependency) IsArmadaManifestReady

func (obj *KubernetesDependency) IsArmadaManifestReady(u *unstructured.Unstructured) bool

Check the state of the ArmadaManifest to figure out if it is still running

func (*KubernetesDependency) IsContainerReady

func (obj *KubernetesDependency) IsContainerReady(containerName string, u *unstructured.Unstructured) bool

Check the state of a container This code is inspired from the kubernetes-entrypoint project

func (*KubernetesDependency) IsCustomResourceReady

func (obj *KubernetesDependency) IsCustomResourceReady(key string, expectedValues []string,
	u *unstructured.Unstructured) bool

Check the state of a custom resource This code is inspired from the kubernetes-entrypoint project

func (*KubernetesDependency) IsJobFailedOrError

func (obj *KubernetesDependency) IsJobFailedOrError(u *unstructured.Unstructured) bool

func (*KubernetesDependency) IsJobReady

func (obj *KubernetesDependency) IsJobReady(u *unstructured.Unstructured) bool

Check the state of a job This code is inspired from the kubernetes-entrypoint project

func (*KubernetesDependency) IsPodFailedOrError

func (obj *KubernetesDependency) IsPodFailedOrError(u *unstructured.Unstructured) bool

func (*KubernetesDependency) IsPodReady

func (obj *KubernetesDependency) IsPodReady(u *unstructured.Unstructured) bool

Check the state of a pod This code is inspired from the kubernetes-entrypoint project

func (*KubernetesDependency) IsServiceFailedOrError

func (obj *KubernetesDependency) IsServiceFailedOrError(u *unstructured.Unstructured) bool

func (*KubernetesDependency) IsServiceReady

func (obj *KubernetesDependency) IsServiceReady(u *unstructured.Unstructured) bool

Check the state of a service This code is inspired from the kubernetes-entrypoint project

func (*KubernetesDependency) IsUnstructuredFailedOrError

func (obj *KubernetesDependency) IsUnstructuredFailedOrError(u *unstructured.Unstructured) bool

Is the status of the Unstructured ready

func (*KubernetesDependency) IsUnstructuredReady

func (obj *KubernetesDependency) IsUnstructuredReady(u *unstructured.Unstructured) bool

Is the status of the Unstructured ready

func (*KubernetesDependency) IsWorkflowFailedOrError

func (obj *KubernetesDependency) IsWorkflowFailedOrError(u *unstructured.Unstructured) bool

func (*KubernetesDependency) IsWorkflowReady

func (obj *KubernetesDependency) IsWorkflowReady(u *unstructured.Unstructured) bool

Check the state of the Main workflow to figure out if the phase is still running This code is inspired from the kubernetes-entrypoint project

func (*KubernetesDependency) JobStatusChanged

Compare the status field between two Job

func (*KubernetesDependency) PodStatusChanged

PodStatus changed

func (*KubernetesDependency) UnstructuredStatusChanged

func (obj *KubernetesDependency) UnstructuredStatusChanged(u *unstructured.Unstructured, v *unstructured.Unstructured) (bool, string, string)

Did the status changed

func (*KubernetesDependency) WorkflowStatusChanged

Compare the phase between to Workflow

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL