Documentation
¶
Index ¶
- Variables
- func CSINodeMatchesLINSTOR(csiNodeDriver *storagev1.CSINodeDriver, linstorNode *lapi.Node) bool
- func ClusterAffinityControllerApiTLSPatch(controllerSecret string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
- func ClusterAffinityControllerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
- func ClusterAffinityControllerNodeSelector(selector map[string]string) ([]kusttypes.Patch, error)
- func ClusterApiEndpointPatch(url string) ([]kusttypes.Patch, error)
- func ClusterApiTLSCertManagerPatch(secretName string, issuer *cmmetav1.ObjectReference, dnsNames []string) ([]kusttypes.Patch, error)
- func ClusterApiTLSClientCertManagerPatch(certName, secretName string, issuer *cmmetav1.ObjectReference) ([]kusttypes.Patch, error)
- func ClusterApiTLSPatch(apiSecretName, clientSecretName string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
- func ClusterCSIControllerApiTLSPatch(controllerSecret string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
- func ClusterCSIControllerDisableRWXPatch() ([]kusttypes.Patch, error)
- func ClusterCSIControllerDisableVolumeGroupSnapshotPatch() ([]kusttypes.Patch, error)
- func ClusterCSIControllerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
- func ClusterCSIControllerNodeSelector(selector map[string]string) ([]kusttypes.Patch, error)
- func ClusterCSIDriverSeLinuxPatch(apiVersion *utils.APIVersion) ([]kusttypes.Patch, error)
- func ClusterCSINodeApiTLSPatch(nodeSecret string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
- func ClusterCSINodeNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
- func ClusterCSINodeSelectorPatch(selector map[string]string) ([]kusttypes.Patch, error)
- func ClusterHAControllerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
- func ClusterHAControllerNodeSelectorPatch(selector map[string]string) ([]kusttypes.Patch, error)
- func ClusterLinstorControllerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
- func ClusterLinstorControllerNodeSelector(selector map[string]string) ([]kusttypes.Patch, error)
- func ClusterLinstorInternalTLSCertManagerPatch(secretName string, issuer *cmmetav1.ObjectReference) ([]kusttypes.Patch, error)
- func ClusterLinstorInternalTLSPatch(secretName string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
- func ClusterLinstorPassphrasePatch(secretName string) ([]kusttypes.Patch, error)
- func ClusterNFSServerApiTLSPatch(serverSecret string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
- func ClusterNFSServerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
- func ClusterNFSServerNodeSelectorPatch(selector map[string]string) ([]kusttypes.Patch, error)
- func ClustersBySatellites(satellites []piraeusiov1.LinstorSatellite) map[string]*ClusterView
- func ComponentPodTemplate(kind, name string, template json.RawMessage) ([]kusttypes.Patch, error)
- func ComponentReplicasPatch(kind, name string, replicas int32) ([]kusttypes.Patch, error)
- func DefaultRateLimiter[T comparable]() workqueue.TypedRateLimiter[T]
- func DesiredNodeConnections(conns []piraeusiov1.LinstorNodeConnection, satellites map[string]bool, ...) map[string]lapi.Connection
- func GetCSINodeDriverFromNode(csiNode *storagev1.CSINode) *storagev1.CSINodeDriver
- func LinstorControllerUrl(cluster *piraeusiov1.LinstorCluster) string
- func MergeNodeConnection(props map[string]string, conn *piraeusiov1.LinstorNodeConnection, ...) map[string]string
- func NodeConnectionApplies(selectors []piraeusiov1.SelectorTerm, nodeA, nodeB string, ...) bool
- func NodeLabelMap(nodes ...corev1.Node) map[string]map[string]string
- func PodReady(pod *corev1.Pod) bool
- func PullSecretPatch(secretName string) ([]kusttypes.Patch, error)
- func SatelliteCommonNodePatch(nodeName string) ([]kusttypes.Patch, error)
- func SatelliteHostPathVolumeEnvPatch(hostPaths []string) ([]kusttypes.Patch, error)
- func SatelliteHostPathVolumePatch(volumeName, hostPath string) ([]kusttypes.Patch, error)
- func SatelliteLinstorHandshakeDaemonPatch() ([]kusttypes.Patch, error)
- func SatelliteLinstorInternalTLSCertManagerPatch(secretName string, issuer *cmmetav1.ObjectReference) ([]kusttypes.Patch, error)
- func SatelliteLinstorInternalTLSPatch(secretName string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
- func SatellitePrecompiledModulePatch() ([]kusttypes.Patch, error)
- func TolerationsPatch(kind, name string, tolerations []corev1.Toleration) ([]kusttypes.Patch, error)
- type ClusterView
- type LinstorClusterReconciler
- type LinstorNodeConnectionReconciler
- type LinstorSatelliteReconciler
Constants ¶
This section is empty.
Variables ¶
var OnlyExistencePredicate = predicate.Funcs{ CreateFunc: func(e event.CreateEvent) bool { return true }, DeleteFunc: func(e event.TypedDeleteEvent[client.Object]) bool { return true }, UpdateFunc: func(e event.UpdateEvent) bool { return false }, GenericFunc: func(e event.TypedGenericEvent[client.Object]) bool { return false }, }
var SatelliteNameReplacements = []kusttypes.ReplacementField{ {Replacement: kusttypes.Replacement{ Source: &kusttypes.SourceSelector{ ResId: resid.NewResId(resid.NewGvk("apps", "v1", "DaemonSet"), "linstor-satellite"), FieldPath: "spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.0.matchFields.0.values.0", }, Targets: []*kusttypes.TargetSelector{ { Select: &kusttypes.Selector{ResId: resid.NewResId(resid.NewGvk("cert-manager.io", "v1", "Certificate"), "linstor-satellite")}, FieldPaths: []string{"spec.dnsNames.0"}, }, }, }}, }
SatelliteNameReplacements are the kustomize replacements for renaming resources for a single satellite.
Functions ¶
func CSINodeMatchesLINSTOR ¶
func CSINodeMatchesLINSTOR(csiNodeDriver *storagev1.CSINodeDriver, linstorNode *lapi.Node) bool
func ClusterAffinityControllerApiTLSPatch ¶ added in v2.10.0
func ClusterAffinityControllerApiTLSPatch(controllerSecret string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
func ClusterAffinityControllerNodeAffinityPatch ¶ added in v2.10.0
func ClusterAffinityControllerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
func ClusterAffinityControllerNodeSelector ¶ added in v2.10.0
func ClusterApiTLSPatch ¶
func ClusterApiTLSPatch(apiSecretName, clientSecretName string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
func ClusterCSIControllerApiTLSPatch ¶ added in v2.3.0
func ClusterCSIControllerApiTLSPatch(controllerSecret string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
func ClusterCSIControllerDisableRWXPatch ¶ added in v2.10.0
func ClusterCSIControllerDisableVolumeGroupSnapshotPatch ¶ added in v2.10.1
func ClusterCSIControllerNodeAffinityPatch ¶ added in v2.3.0
func ClusterCSIControllerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
func ClusterCSIControllerNodeSelector ¶ added in v2.3.0
func ClusterCSIDriverSeLinuxPatch ¶ added in v2.4.1
func ClusterCSIDriverSeLinuxPatch(apiVersion *utils.APIVersion) ([]kusttypes.Patch, error)
func ClusterCSINodeApiTLSPatch ¶ added in v2.3.0
func ClusterCSINodeApiTLSPatch(nodeSecret string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
func ClusterCSINodeNodeAffinityPatch ¶ added in v2.3.0
func ClusterCSINodeNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
func ClusterHAControllerNodeAffinityPatch ¶ added in v2.3.0
func ClusterHAControllerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
func ClusterLinstorControllerNodeAffinityPatch ¶ added in v2.3.0
func ClusterLinstorControllerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
func ClusterLinstorControllerNodeSelector ¶ added in v2.3.0
func ClusterLinstorInternalTLSPatch ¶
func ClusterLinstorInternalTLSPatch(secretName string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
func ClusterNFSServerApiTLSPatch ¶ added in v2.10.0
func ClusterNFSServerApiTLSPatch(serverSecret string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
func ClusterNFSServerNodeAffinityPatch ¶ added in v2.10.0
func ClusterNFSServerNodeAffinityPatch(affinity *corev1.NodeSelector) ([]kusttypes.Patch, error)
func ClusterNFSServerNodeSelectorPatch ¶ added in v2.10.0
func ClustersBySatellites ¶
func ClustersBySatellites(satellites []piraeusiov1.LinstorSatellite) map[string]*ClusterView
ClustersBySatellites collects all LinstorSatellite resource that are part of the same cluster.
This should only ever return a map with a single entry, but it can support more.
func ComponentPodTemplate ¶ added in v2.3.0
func ComponentReplicasPatch ¶ added in v2.10.0
func DefaultRateLimiter ¶
func DefaultRateLimiter[T comparable]() workqueue.TypedRateLimiter[T]
DefaultRateLimiter is a modified workqueue.DefaultControllerRateLimiter.
It reduced the maximum delay between reconcile attempts from 1000 seconds to 30 seconds.
func DesiredNodeConnections ¶
func DesiredNodeConnections(conns []piraeusiov1.LinstorNodeConnection, satellites map[string]bool, nodeLabelMap map[string]map[string]string) map[string]lapi.Connection
func GetCSINodeDriverFromNode ¶
func GetCSINodeDriverFromNode(csiNode *storagev1.CSINode) *storagev1.CSINodeDriver
func LinstorControllerUrl ¶
func LinstorControllerUrl(cluster *piraeusiov1.LinstorCluster) string
func MergeNodeConnection ¶
func MergeNodeConnection(props map[string]string, conn *piraeusiov1.LinstorNodeConnection, nodeA, nodeB string) map[string]string
func NodeConnectionApplies ¶
func NodeConnectionApplies(selectors []piraeusiov1.SelectorTerm, nodeA, nodeB string, nodeLabelMap map[string]map[string]string) bool
func SatelliteLinstorHandshakeDaemonPatch ¶ added in v2.3.0
func SatelliteLinstorInternalTLSPatch ¶
func SatelliteLinstorInternalTLSPatch(secretName string, caRef *piraeusiov1.CAReference) ([]kusttypes.Patch, error)
func TolerationsPatch ¶ added in v2.9.0
Types ¶
type ClusterView ¶
type ClusterView struct {
ClusterRef piraeusiov1.ClusterReference
// Satellites maps the name of satellites to their ONLINE status.
Satellites map[string]bool
}
type LinstorClusterReconciler ¶
type LinstorClusterReconciler struct {
client.Client
Scheme *runtime.Scheme
Namespace string
PullSecret string
ImageConfigMapName string
RequeueInterval time.Duration
LinstorClientOpts []lapi.Option
Kustomizer *resources.Kustomizer
APIVersion *utils.APIVersion
SupportsVolumeGroupSnapshots bool
}
LinstorClusterReconciler reconciles a LinstorCluster object
func (*LinstorClusterReconciler) Reconcile ¶
func (r *LinstorClusterReconciler) 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.
func (*LinstorClusterReconciler) SetupWithManager ¶
func (r *LinstorClusterReconciler) SetupWithManager(mgr ctrl.Manager, opts controller.Options) error
SetupWithManager sets up the controller with the Manager.
type LinstorNodeConnectionReconciler ¶
type LinstorNodeConnectionReconciler struct {
client.Client
Scheme *runtime.Scheme
Namespace string
RequeueInterval time.Duration
LinstorClientOpts []lapi.Option
}
LinstorNodeConnectionReconciler reconciles a LinstorNodeConnection object
func (*LinstorNodeConnectionReconciler) Reconcile ¶
func (r *LinstorNodeConnectionReconciler) 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.
func (*LinstorNodeConnectionReconciler) SetupWithManager ¶
func (r *LinstorNodeConnectionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type LinstorSatelliteReconciler ¶
type LinstorSatelliteReconciler struct {
client.Client
MachineClient *clusterapi.Client
Scheme *runtime.Scheme
Namespace string
ImageConfigMapName string
RequeueInterval time.Duration
LinstorClientOpts []lapi.Option
Kustomizer *resources.Kustomizer
// contains filtered or unexported fields
}
LinstorSatelliteReconciler reconciles a LinstorSatellite object
func (*LinstorSatelliteReconciler) Reconcile ¶
func (r *LinstorSatelliteReconciler) 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.
func (*LinstorSatelliteReconciler) SetupWithManager ¶
func (r *LinstorSatelliteReconciler) SetupWithManager(mgr ctrl.Manager, opts controller.Options) error
SetupWithManager sets up the controller with the Manager.