Documentation ¶
Index ¶
- Constants
- func DeleteHubCAConfigmap(ctx context.Context, client client.Client) error
- func DeleteHubMetricsCollectionDeployments(c client.Client) error
- func DeleteHubMonitoringClusterRoleBinding(ctx context.Context, client client.Client) error
- func DeleteServiceMonitors(ctx context.Context, c client.Client) error
- func GetAddOnDeploymentConfigPredicates() predicate.Funcs
- func RevertHubClusterMonitoringConfig(ctx context.Context, client client.Client) error
- func StartPlacementController(mgr manager.Manager, crdMap map[string]bool) error
- type Client
- type DefaultClient
- type ImageRegistries
- type PlacementRuleReconciler
- type Registry
Constants ¶
const (
// ClusterImageRegistriesAnnotation value is a json string of ImageRegistries.
ClusterImageRegistriesAnnotation = "open-cluster-management.io/image-registries"
)
Variables ¶
This section is empty.
Functions ¶
func DeleteHubCAConfigmap ¶
func DeleteHubMetricsCollectionDeployments ¶
Delete resources created for hub metrics collection
func RevertHubClusterMonitoringConfig ¶
revertClusterMonitoringConfig reverts the configmap cluster-monitoring-config and relevant resources (observability-alertmanager-accessor and hub-alertmanager-router-ca) for the openshift cluster monitoring stack.
Types ¶
type Client ¶
type Client interface { Cluster(clusterName string) Client PullSecret() (*corev1.Secret, error) ImageOverride(imageName string) (string, error) }
func NewDefaultClient ¶
func NewImageRegistryClient ¶
type DefaultClient ¶
type DefaultClient struct {
// contains filtered or unexported fields
}
func (*DefaultClient) Cluster ¶
func (c *DefaultClient) Cluster(clusterName string) Client
func (*DefaultClient) ImageOverride ¶
func (c *DefaultClient) ImageOverride(imageName string) (newImageName string, err error)
ImageOverride returns the overridden image. return the input image name if there is no custom registry.
func (*DefaultClient) PullSecret ¶
func (c *DefaultClient) PullSecret() (*corev1.Secret, error)
PullSecret returns the pullSecret. return nil if there is no imageRegistry of the cluster.
type ImageRegistries ¶
type ImageRegistries struct { PullSecret string `json:"pullSecret"` Registries []Registry `json:"registries"` }
ImageRegistries is value of the image registries annotation includes the mirror and source registries. The source registry will be replaced by the Mirror. The larger index will work if the Sources are the same.
type PlacementRuleReconciler ¶
type PlacementRuleReconciler struct { Client client.Client Log logr.Logger Scheme *runtime.Scheme CRDMap map[string]bool RESTMapper meta.RESTMapper // contains filtered or unexported fields }
PlacementRuleReconciler reconciles a PlacementRule object
func (*PlacementRuleReconciler) Reconcile ¶
func (r *PlacementRuleReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. Modify the Reconcile function to compare the state specified by the PlacementRule object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.0/pkg/reconcile
func (*PlacementRuleReconciler) SetupWithManager ¶
func (r *PlacementRuleReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager. TODO refactor (if possible) to match format of observabilityaddon_controller.go