deploy

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package deploy

Index

Constants

View Source
const (
	DefaultManifestPath = "/opt/manifests"
)

Variables

This section is empty.

Functions

func ApplyParams added in v2.3.0

func ApplyParams(componentPath string, imageParamsMap map[string]string, isUpdateNamespace bool) error

User env variable passed from CSV (if it is set) to overwrite values from manifests' params.env file This is useful for air gapped cluster priority of image values (from high to low): - image values set in manifests params.env if manifestsURI is set - RELATED_IMAGE_* values from CSV - image values set in manifests params.env if manifestsURI is not set. parameter isUpdateNamespace is used to set if should update namespace with dsci applicationnamespace.

func ClusterSubscriptionExists added in v2.9.0

func ClusterSubscriptionExists(cli client.Client, name string) (bool, error)

func DeleteExistingSubscription added in v2.9.0

func DeleteExistingSubscription(cli client.Client, operatorNs string, subsName string) error

DeleteExistingSubscription deletes given Subscription if it exists Do not error if the Subscription does not exist.

func DeployManifestsFromPath

func DeployManifestsFromPath(cli client.Client, owner metav1.Object, manifestPath string, namespace string, componentName string, componentEnabled bool) error

func DownloadManifests

func DownloadManifests(componentName string, manifestConfig components.ManifestsConfig) error

DownloadManifests function performs following tasks: 1. It takes component URI and only downloads folder specified by component.ContextDir field 2. It saves the manifests in the odh-manifests/component-name/ folder.

func GetResources added in v2.9.0

func GetResources(resMap resmap.ResMap) ([]*unstructured.Unstructured, error)

func GetSubscription added in v2.9.0

func GetSubscription(cli client.Client, namespace string, name string) (*ofapiv1alpha1.Subscription, error)

GetSubscription checks if a Subscription for the operator exists in the given namespace. if exist, return object; otherwise, return error.

func OperatorExists added in v2.2.0

func OperatorExists(cli client.Client, operatorPrefix string) (bool, error)

OperatorExists checks if an Operator with 'operatorPrefix' is installed. Return true if found it, false if not. if we need to check exact version of the operator installed, can append vX.Y.Z later.

Types

type Platform

type Platform string
const (
	// ManagedRhods defines expected addon catalogsource.
	ManagedRhods Platform = "addon-managed-odh-catalog"
	// SelfManagedRhods defines display name in csv.
	SelfManagedRhods Platform = "Red Hat OpenShift Data Science"
	// OpenDataHub defines display name in csv.
	OpenDataHub Platform = "Open Data Hub Operator"
	// Unknown indicates that operator is not deployed using OLM.
	Unknown Platform = ""
)

func GetPlatform

func GetPlatform(cli client.Client) (Platform, error)

Jump to

Keyboard shortcuts

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