install

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 51 Imported by: 3 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KamelCLIDownloadName --.
	KamelCLIDownloadName = "kamel-cli"
	// KamelCLIDownloadDisplayName is the name as seen in the download page.
	KamelCLIDownloadDisplayName = "kamel - Apache Camel K Command Line Interface"
	// KamelCLIDownloadDescription is the description as seen in the download page.
	KamelCLIDownloadDescription = "Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers.\n\n" +
		"The `kamel` binary can be used to both configure the cluster and run integrations. " +
		"Once you've downloaded the `kamel` binary, log into the cluster using the `oc` client tool and start using the `kamel` CLI.\n\n" +
		"You can run `kamel help` to list the available commands or go to the [Camel K Website](https://camel.apache.org/projects/camel-k/) for more information."

	// KamelCLIDownloadURLTemplate is the download template with 3 missing parameters (version, version, os).
	KamelCLIDownloadURLTemplate = "https://github.com/apache/camel-k/releases/download/v%s/camel-k-client-%s-%s-64bit.tar.gz"
)

The following variables may be overridden at build time.

View Source
var IdentityResourceCustomizer = func(object ctrl.Object) ctrl.Object {
	return object
}

IdentityResourceCustomizer is a ResourceCustomizer that does nothing.

View Source
var RemoveIngressRoleCustomizer = func(object ctrl.Object) ctrl.Object {
	if role, ok := object.(*rbacv1.Role); ok && role.Name == "camel-k-operator" {
	rules:
		for i, rule := range role.Rules {
			for _, group := range rule.APIGroups {
				if group == networking.GroupName {
					role.Rules = append(role.Rules[:i], role.Rules[i+1:]...)

					break rules
				}
			}
		}
	}
	return object
}

Functions

func BindKnativeAddressableResolverClusterRole added in v1.8.1

func BindKnativeAddressableResolverClusterRole(ctx context.Context, c kubernetes.Interface, namespace string, operatorNamespace string) error

BindKnativeAddressableResolverClusterRole binds the Knative addressable resolver aggregated ClusterRole to the operator ServiceAccount.

func BuilderServiceAccountRoles

func BuilderServiceAccountRoles(ctx context.Context, c client.Client, namespace string, cluster v1.IntegrationPlatformCluster) error

BuilderServiceAccountRoles installs the builder service account and related roles in the given namespace.

func ExampleOrCollect

func ExampleOrCollect(ctx context.Context, c client.Client, namespace string, collection *kubernetes.Collection, force bool) error

func IntegrationPlatformViewerRole added in v1.10.0

func IntegrationPlatformViewerRole(ctx context.Context, c client.Client, namespace string) error

IntegrationPlatformViewerRole installs the role that allows any user ro access integrationplatforms in the global namespace.

func KameletCatalog added in v1.2.0

func KameletCatalog(ctx context.Context, c client.Client, namespace string) error

KameletCatalog installs the bundled Kamelets into the specified namespace.

func KameletViewerRole added in v1.3.0

func KameletViewerRole(ctx context.Context, c client.Client, namespace string) error

KameletViewerRole installs the role that allows any user ro access kamelets in the global namespace.

func NewPlatform added in v1.10.0

func NewPlatform(
	ctx context.Context, c client.Client,
	clusterType string, skipRegistrySetup bool, registry v1.RegistrySpec, operatorID string,
) (*v1.IntegrationPlatform, error)

NewPlatform creates a new IntegrationPlatform instance.

func ObjectOrCollect added in v1.4.0

func ObjectOrCollect(ctx context.Context, c client.Client, namespace string, collection *kubernetes.Collection, force bool, obj ctrl.Object) error
func OpenShiftConsoleDownloadLink(ctx context.Context, c client.Client) error

OpenShiftConsoleDownloadLink installs the download link for the OpenShift console.

func OperatorOrCollect

func OperatorOrCollect(ctx context.Context, cmd *cobra.Command, c client.Client, cfg OperatorConfiguration, collection *kubernetes.Collection, force bool) error

OperatorOrCollect installs the operator resources or adds them to the collector if present. nolint: maintidx // TODO: refactor the code

func OperatorStartupOptionalTools

func OperatorStartupOptionalTools(ctx context.Context, c client.Client, namespace string, operatorNamespace string, log logutil.Logger)

OperatorStartupOptionalTools tries to install optional tools at operator startup and warns if something goes wrong.

func RegistrySecretFromFileOrCollect added in v1.3.0

func RegistrySecretFromFileOrCollect(ctx context.Context, c client.Client, namespace string, file string, collection *kubernetes.Collection, force bool) (string, error)

RegistrySecretFromFileOrCollect generates a secret from a docker-config.json file and creates it on the cluster (or appends it to the collection).

func RegistrySecretOrCollect

func RegistrySecretOrCollect(ctx context.Context, c client.Client, namespace string, auth registry.Auth, collection *kubernetes.Collection, force bool) (string, error)

RegistrySecretOrCollect generates a secret from auth settings and creates it on the cluster (or appends it to the collection).

func Resource

func Resource(ctx context.Context, c client.Client, namespace string, force bool, customizer ResourceCustomizer, name string) error

Resource installs a single named resource from the project resource directory.

func ResourceOrCollect

func ResourceOrCollect(ctx context.Context, c client.Client, namespace string, collection *kubernetes.Collection,
	force bool, customizer ResourceCustomizer, name string) error

func Resources

func Resources(ctx context.Context, c client.Client, namespace string, force bool, customizer ResourceCustomizer, names ...string) error

Resources installs named resources from the project resource directory.

func ResourcesOrCollect

func ResourcesOrCollect(ctx context.Context, c client.Client, namespace string, collection *kubernetes.Collection,
	force bool, customizer ResourceCustomizer, names ...string) error

func SetupClusterWideResourcesOrCollect

func SetupClusterWideResourcesOrCollect(
	ctx context.Context, clientProvider client.Provider,
	collection *kubernetes.Collection, clusterType string, force bool,
) error

func WaitForAllCrdInstallation added in v1.5.0

func WaitForAllCrdInstallation(ctx context.Context, clientProvider client.Provider, timeout time.Duration) error

Types

type OperatorConfiguration

type OperatorConfiguration struct {
	CustomImage           string
	CustomImagePullPolicy string
	Namespace             string
	Global                bool
	ClusterType           string
	Health                OperatorHealthConfiguration
	Monitoring            OperatorMonitoringConfiguration
	Tolerations           []string
	NodeSelectors         []string
	ResourcesRequirements []string
	EnvVars               []string
}

type OperatorHealthConfiguration added in v1.3.0

type OperatorHealthConfiguration struct {
	Port int32
}

type OperatorMonitoringConfiguration added in v1.3.0

type OperatorMonitoringConfiguration struct {
	Enabled bool
	Port    int32
}

type ResourceCustomizer

type ResourceCustomizer func(object ctrl.Object) ctrl.Object

ResourceCustomizer can be used to inject code that changes the objects before they are created.

Jump to

Keyboard shortcuts

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