Documentation ¶
Index ¶
- Constants
- Variables
- func FindCustomDomainCondition(conditions []customdomainv1alpha1.CustomDomainCondition, ...) *customdomainv1alpha1.CustomDomainCondition
- func GetInfrastructureObject(kclient client.Client) (*configv1.Infrastructure, error)
- func GetPlatformType(kclient client.Client) (*configv1.PlatformType, error)
- func IsUsingNewManagedIngressFeature(kclient client.Client, reqLogger logr.Logger) (bool, error)
- func IsVersionGreaterOrEqualThan(a, b string) bool
- func SetCustomDomainCondition(conditions []customdomainv1alpha1.CustomDomainCondition, ...) []customdomainv1alpha1.CustomDomainCondition
- func SetCustomDomainStatus(reqLogger logr.Logger, instance *customdomainv1alpha1.CustomDomain, ...)
- func ShouldUpdateCondition(oldStatus corev1.ConditionStatus, oldReason, oldMessage string, ...) bool
- func UpdateConditionAlways(_, _, _, _ string) bool
- func UpdateConditionIfReasonOrMessageChange(oldReason, oldMessage, newReason, newMessage string) bool
- func UpdateConditionNever(_, _, _, _ string) bool
- type CustomDomainReconciler
- type UpdateConditionCheck
Constants ¶
const (
ELBIdleTimeoutDuration = 1800
)
Variables ¶
var IngressControllerELBIdleTimeout metav1.Duration = metav1.Duration{Duration: ELBIdleTimeoutDuration * time.Second}
Functions ¶
func FindCustomDomainCondition ¶
func FindCustomDomainCondition(conditions []customdomainv1alpha1.CustomDomainCondition, conditionType customdomainv1alpha1.CustomDomainConditionType) *customdomainv1alpha1.CustomDomainCondition
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 IsVersionGreaterOrEqualThan ¶
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 ¶
func SetCustomDomainCondition( conditions []customdomainv1alpha1.CustomDomainCondition, conditionType customdomainv1alpha1.CustomDomainConditionType, status corev1.ConditionStatus, message string, updateConditionCheck UpdateConditionCheck, ) []customdomainv1alpha1.CustomDomainCondition
SetCustomDomainCondition sets a condition on a CustomDomain resource's status
func SetCustomDomainStatus ¶
func SetCustomDomainStatus(reqLogger logr.Logger, instance *customdomainv1alpha1.CustomDomain, message string, condition customdomainv1alpha1.CustomDomainConditionType, state customdomainv1alpha1.CustomDomainStateType)
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 ¶
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 ¶
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 ¶
UpdateConditionCheck tests whether a condition should be updated from the old condition to the new condition. Returns true if the condition should be updated.