Documentation ¶
Index ¶
- Constants
- func NewManagerCommand() *cobra.Command
- func PeersConnectedToPeerRef(sourcePeerRef multiclusterv1alpha1.PeerRef, ...) []multiclusterv1alpha1.PeerRef
- func PeersConnectedToSecret(secret *corev1.Secret, mirrorPeers []multiclusterv1alpha1.MirrorPeer) ([]multiclusterv1alpha1.PeerRef, error)
- type DRPolicyReconciler
- type ManagerOptions
- type MirrorPeerReconciler
- type MirrorPeerSecretReconciler
- type NamedPeerRefWithSecretData
- func (nPR *NamedPeerRefWithSecretData) CreateOrUpdateDestinationSecret(ctx context.Context, rc client.Client) error
- func (nPR *NamedPeerRefWithSecretData) ErrorOnNilReceiver() (err error)
- func (nPR *NamedPeerRefWithSecretData) GenerateSecret(secretLabelType utils.SecretLabelType) *corev1.Secret
- func (nPR *NamedPeerRefWithSecretData) GetAssociatedSecret(ctx context.Context, rc client.Client, holdSecret *corev1.Secret) error
- func (nPR *NamedPeerRefWithSecretData) Request() (req reconcile.Request)
Constants ¶
const ( DefaultMirroringMode = "snapshot" MirroringModeKey = "mirroringMode" SchedulingIntervalKey = "schedulingInterval" ReplicationSecretNameKey = "replication.storage.openshift.io/replication-secret-name" ReplicationSecretNamespaceKey = "replication.storage.openshift.io/replication-secret-namespace" ReplicationIDKey = "replicationid" RBDVolumeReplicationClassNameTemplate = "rbd-volumereplicationclass-%v" RBDReplicationSecretName = "rook-csi-rbd-provisioner" RamenLabelTemplate = "ramendr.openshift.io/%s" RBDProvisionerTemplate = "%s.rbd.csi.ceph.com" )
const ( WebhookCertDir = "/apiserver.local.config/certificates" WebhookCertName = "apiserver.crt" WebhookKeyName = "apiserver.key" )
Variables ¶
This section is empty.
Functions ¶
func NewManagerCommand ¶
func PeersConnectedToPeerRef ¶
func PeersConnectedToPeerRef(sourcePeerRef multiclusterv1alpha1.PeerRef, mirrorPeers []multiclusterv1alpha1.MirrorPeer) []multiclusterv1alpha1.PeerRef
PeersConnectedToPeerRef returns a list of PeerRefs connected to the 'sourcePeerRef'.
func PeersConnectedToSecret ¶
func PeersConnectedToSecret(secret *corev1.Secret, mirrorPeers []multiclusterv1alpha1.MirrorPeer) ([]multiclusterv1alpha1.PeerRef, error)
PeersConnectedToSecret return unique PeerRefs associated with the secret
Types ¶
type DRPolicyReconciler ¶
func (*DRPolicyReconciler) SetupWithManager ¶
func (r *DRPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ManagerOptions ¶
type ManagerOptions struct { MetricsAddr string EnableLeaderElection bool ProbeAddr string MulticlusterConsolePort int ZapOpts zap.Options }
func NewManagerOptions ¶
func NewManagerOptions() *ManagerOptions
func (*ManagerOptions) AddFlags ¶
func (o *ManagerOptions) AddFlags(cmd *cobra.Command)
type MirrorPeerReconciler ¶
MirrorPeerReconciler reconciles a MirrorPeer object
func (*MirrorPeerReconciler) Reconcile ¶
func (r *MirrorPeerReconciler) 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.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*MirrorPeerReconciler) SetupWithManager ¶
func (r *MirrorPeerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type MirrorPeerSecretReconciler ¶
MirrorPeerSecretReconciler reconciles MirrorPeer CRs, and source/destination Secrets
func (*MirrorPeerSecretReconciler) Reconcile ¶
func (r *MirrorPeerSecretReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile standard reconcile function for MirrorPeerSecret controller
func (*MirrorPeerSecretReconciler) SetupWithManager ¶
func (r *MirrorPeerSecretReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type NamedPeerRefWithSecretData ¶
type NamedPeerRefWithSecretData struct { multiclusterv1alpha1.PeerRef Name string Data []byte SecretOrigin string }
NamedPeerRefWithSecretData is an intermediate data structure, when converting a source secret to corresponding peer destination secret
func NewNamedPeerRefWithSecretData ¶
func NewNamedPeerRefWithSecretData(secret *corev1.Secret, peerRef multiclusterv1alpha1.PeerRef) *NamedPeerRefWithSecretData
NewNamedPeerRefWithSecretData creates a new PeerRef instance which has the source Name and Data details attached to it. Make sure we give a source secret and it's (one of the) connected PeerRef as arguments.
func (*NamedPeerRefWithSecretData) CreateOrUpdateDestinationSecret ¶
func (nPR *NamedPeerRefWithSecretData) CreateOrUpdateDestinationSecret(ctx context.Context, rc client.Client) error
CreateOrUpdateDestinationSecret creates/updates the destination secret from NamedPeerRefWithSecretData object
func (*NamedPeerRefWithSecretData) ErrorOnNilReceiver ¶
func (nPR *NamedPeerRefWithSecretData) ErrorOnNilReceiver() (err error)
func (*NamedPeerRefWithSecretData) GenerateSecret ¶
func (nPR *NamedPeerRefWithSecretData) GenerateSecret(secretLabelType utils.SecretLabelType) *corev1.Secret
GenerateSecret will generate a secret of provided type. nPeerRef object contains TWO parts,
a. details of the secret, like name,namespace etc; that is to be generated b. data part that is to be passed on to the newly created secret
The type of secret (ie; source or destination) is passed as the argument
func (*NamedPeerRefWithSecretData) GetAssociatedSecret ¶
func (nPR *NamedPeerRefWithSecretData) GetAssociatedSecret(ctx context.Context, rc client.Client, holdSecret *corev1.Secret) error
GetAssociatedSecret returns a secret in the cluster, which has the same 'Name' and 'Namespace' matching the PeerRef's name and clustername
func (*NamedPeerRefWithSecretData) Request ¶
func (nPR *NamedPeerRefWithSecretData) Request() (req reconcile.Request)