upgrade

package
v1.3.0-prerelease.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright (c) 2023 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AckVersionGate

func AckVersionGate(
	gateAgreementsClient *cmv1.VersionGateAgreementsClient,
	gateID string) error

func CheckAndCancelUpgrades

func CheckAndCancelUpgrades(ctx context.Context, client *cmv1.ClustersClient, upgrades []ClusterUpgrade, desiredVersion *semver.Version) (bool, error)

Check the provided list of upgrades, canceling pending upgrades that are not for the correct version, and returning an error if there is already an upgrade in progress that is not for the desired version

func CheckMissingAgreements

func CheckMissingAgreements(version string,
	clusterKey string, upgradePoliciesClient *cmv1.UpgradePoliciesClient) ([]*cmv1.VersionGate, string, error)

Construct a list of missing gate agreements for upgrade to a given cluster version Returns: a list of all un-acked gate agreements, a string describing the ones that need user ack, and an error

func GetAvailableUpgradeVersions

func GetAvailableUpgradeVersions(ctx context.Context, client *cmv1.VersionsClient, fromVersionId string) ([]*cmv1.Version, error)

Get the available upgrade versions that are reachable from a given starting version

Types

type ClusterUpgrade

type ClusterUpgrade struct {
	// contains filtered or unexported fields
}

ClusterUpgrade bundles the description of the upgrade with its current state

func GetScheduledUpgrades

func GetScheduledUpgrades(ctx context.Context, client *cmv1.ClustersClient, clusterId string) ([]ClusterUpgrade, error)

Get the list of upgrade policies associated with a cluster

func (*ClusterUpgrade) Delete

func (cu *ClusterUpgrade) Delete(ctx context.Context, client *cmv1.ClustersClient) error

func (*ClusterUpgrade) NextRun

func (cu *ClusterUpgrade) NextRun() time.Time

func (*ClusterUpgrade) State

func (*ClusterUpgrade) Version

func (cu *ClusterUpgrade) Version() string

Jump to

Keyboard shortcuts

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