managed

package
v0.0.0-...-18865b9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ELBIdleTimeoutDuration = 1800
)

Variables

View Source
var IngressControllerELBIdleTimeout metav1.Duration = metav1.Duration{Duration: ELBIdleTimeoutDuration * time.Second}

Functions

func FindCustomDomainCondition

FindCustomDomainCondition finds in the condition that has the specified condition type in the given list. If none exists, then returns nil.

func GetInfrastructureObject

func GetInfrastructureObject(kclient client.Client) (*configv1.Infrastructure, error)

GetInfrastructureObject returns the canonical Infrastructure object

func GetPlatformType

func GetPlatformType(kclient client.Client) (*configv1.PlatformType, error)

GetPlatformType returns the cloud platform type for the cluster

func IsUsingNewManagedIngressFeature

func IsUsingNewManagedIngressFeature(kclient client.Client, reqLogger logr.Logger) (bool, error)

func IsVersionGreaterOrEqualThan

func IsVersionGreaterOrEqualThan(a, b string) bool

IsVersionGreaterOrEqualThan compares major and minor versions of a and b For example, if (4.10.1, 4.10.0) is supplied, this returns true because 4.10 >= 4.10 anything other than major and minor are ignored when comparing the versions.

func SetCustomDomainCondition

SetCustomDomainCondition sets a condition on a CustomDomain resource's status

func SetCustomDomainStatus

SetCustomDomainStatus sets the status of the custom domain resource

func ShouldUpdateCondition

func ShouldUpdateCondition(
	oldStatus corev1.ConditionStatus, oldReason, oldMessage string,
	newStatus corev1.ConditionStatus, newReason, newMessage string,
	updateConditionCheck UpdateConditionCheck,
) bool

ShouldUpdateCondition returns true if condition needs update

func UpdateConditionAlways

func UpdateConditionAlways(_, _, _, _ string) bool

UpdateConditionAlways returns true. The condition will always be updated.

func UpdateConditionIfReasonOrMessageChange

func UpdateConditionIfReasonOrMessageChange(oldReason, oldMessage, newReason, newMessage string) bool

UpdateConditionIfReasonOrMessageChange returns true if there is a change in the reason or the message of the condition.

func UpdateConditionNever

func UpdateConditionNever(_, _, _, _ string) bool

UpdateConditionNever return false. The condition will never be updated, unless there is a change in the status of the condition.

Types

type CustomDomainReconciler

type CustomDomainReconciler struct {
	// This client, initialized using mgr.Client() above, is a split client
	// that reads objects from the cache and writes to the apiserver
	Client client.Client
	Scheme *runtime.Scheme
}

CustomDomainReconciler reconciles a CustomDomain object

func (*CustomDomainReconciler) GetClusterVersion

func (r *CustomDomainReconciler) GetClusterVersion(kclient client.Client) (string, error)

Taken from https://github.com/openshift/cloud-ingress-operator/blob/master/pkg/utils/clusterversion.go GetClusterVersionObject returns the canonical ClusterVersion object To check current version: `output.Status.History[0].Version`

`history contains a list of the most recent versions applied to the cluster. This value may be empty during cluster startup, and then will be updated when a new update is being applied. The newest update is first in the list and it is ordered by recency`

func (*CustomDomainReconciler) Reconcile

func (r *CustomDomainReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile reads that state of the cluster for a CustomDomain object and makes changes based on the state read and what is in the CustomDomain.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*CustomDomainReconciler) SetupWithManager

func (r *CustomDomainReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type UpdateConditionCheck

type UpdateConditionCheck func(oldReason, oldMessage, newReason, newMessage string) bool

UpdateConditionCheck tests whether a condition should be updated from the old condition to the new condition. Returns true if the condition should be updated.

Jump to

Keyboard shortcuts

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