ocmcontrollerssdk

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 19 Imported by: 1

README

ocm-controller SDK

REUSE status

This SDK contains code segments which should be used by other OCM related controllers.

And example usage of this SDK can be found in the ocm-controller project.

Licensing

Copyright 2022 SAP SE or an SAP affiliate company and Open Component Model contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureCredentials

func ConfigureCredentials(ctx context.Context, ocmCtx ocm.Context, c client.Client, repositoryURL, secretRef, namespace string) error

ConfigureCredentials takes a repository url and secret ref and configures access to an OCI repository.

func ConfigureTemplateFilesystem

func ConfigureTemplateFilesystem(ctx context.Context, cv ocm.ComponentVersionAccess, resourceName string) (vfs.FileSystem, error)

ConfigureTemplateFilesystem takes a version access and a resource name and sets up a virtual filesystem to work with.

func GetComponentVersion

func GetComponentVersion(ctx ocm.Context, session ocm.Session, repositoryURL, name, version string) (ocm.ComponentVersionAccess, error)

func GetParentObject

func GetParentObject(ctx context.Context, c client.Client, kind, group string, source, parent client.Object) error

GetParentObject returns the first find in the owner references of a given object. T denotes the type that the user wants returned.

func GetResourceForComponentVersion added in v0.0.4

func GetResourceForComponentVersion(cv ocm.ComponentVersionAccess, resourceName string) (ocm.ResourceAccess, *bytes.Buffer, error)

GetResourceForComponentVersion returns the raw resource and the access for that resource.

func GetSnapshotName

func GetSnapshotName(repository, resourceName string) string

GetSnapshotName generates a snapshot name that should be used by all controllers.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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