Documentation ¶
Index ¶
- func AddFinalizer(kubeClient client.Client, resource Bridge) func(context.Context, ctrl.Request) (*ctrl.Result, error)
- func BoolAddr(b bool) *bool
- func BoolToString(b bool) string
- func BoolToYesNo(report_stats bool) string
- func CheckResourcePresenceFunc(k8sClient client.Client, ctx context.Context, timeout time.Duration, ...) func(client.Object, types.NamespacedName, metav1.OwnerReference)
- func CheckStatusFunc(k8sClient client.Client, ctx context.Context, timeout time.Duration, ...) func(string, string, types.NamespacedName, client.Object)
- func CheckSubresourceAbsenceFunc(k8sClient client.Client, ctx context.Context, timeout time.Duration, ...) func(types.NamespacedName, ...client.Object)
- func ComputeFQDN(name string, namespace string) string
- func ComputeNamespace(defaultNamespace string, newNamespace string) string
- func Convert(i interface{}) interface{}
- func ConvertStructToMap(in interface{}) (map[string]interface{}, error)
- func CopyInputConfigMap(kubeClient client.Client, runtimeScheme *runtime.Scheme, ...) func(context.Context, ctrl.Request) (*ctrl.Result, error)
- func DeleteResourceFunc(k8sClient client.Client, ctx context.Context, timeout time.Duration, ...) func(client.Object, types.NamespacedName, bool)
- func FetchSynapseInstance(ctx context.Context, kubeClient client.Client, resource Bridge, ...) error
- func GetConfigMapCopy(client client.Client, sourceConfigMapName string, ...) (*corev1.ConfigMap, error)
- func GetResource(ctx context.Context, kubeClient client.Client, req ctrl.Request, ...) (*ctrl.Result, error)
- func GetSynapseServerName(s synapsev1alpha1.Synapse) (string, error)
- func HandleDelete(kubeClient client.Client, resource Bridge) func(context.Context, ctrl.Request) (*ctrl.Result, error)
- func LoadYAMLFileFromConfigMapData(configMap corev1.ConfigMap, filename string) (map[string]interface{}, error)
- func SetFailedState(ctx context.Context, kubeClient client.Client, resource client.Object, ...)
- func TriggerSynapseReconciliation(kubeClient client.Client, resource Bridge) func(context.Context, ctrl.Request) (*ctrl.Result, error)
- func UpdateConfigMap(ctx context.Context, client client.Client, key types.NamespacedName, ...) error
- func UpdateConfigMapData(cm *corev1.ConfigMap, obj client.Object, updateData updateDataFunc, ...) error
- func UpdateResourceStatus(ctx context.Context, kubeClient client.Client, resource client.Object, ...) error
- func UpdateSynapseStatus(ctx context.Context, kubeClient client.Client, s *synapsev1alpha1.Synapse) error
- type Bridge
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFinalizer ¶ added in v0.5.0
func AddFinalizer(kubeClient client.Client, resource Bridge) func(context.Context, ctrl.Request) (*ctrl.Result, error)
AddFinalizer returns a function of type subreconciler.FnWithRequest
func BoolToString ¶
func BoolToYesNo ¶
func CheckStatusFunc ¶
func ComputeFQDN ¶
func ComputeNamespace ¶
ConfigMap that are created by the user could be living in a different namespace as Synapse. getConfigMapNamespace provides a way to default to the Synapse namespace if none is provided.
func ConvertStructToMap ¶
func CopyInputConfigMap ¶ added in v0.5.0
func CopyInputConfigMap(kubeClient client.Client, runtimeScheme *runtime.Scheme, resource client.Object) func(context.Context, ctrl.Request) (*ctrl.Result, error)
CopyInputConfigMap returns a function of type FnWithRequest, to be called in the main reconciliation loop.
It creates a copy of the user-provided ConfigMap.
func DeleteResourceFunc ¶
func FetchSynapseInstance ¶ added in v0.5.0
func GetConfigMapCopy ¶
func GetConfigMapCopy( client client.Client, sourceConfigMapName string, sourceConfigMapNamespace string, copyConfigMapObjectMeta metav1.ObjectMeta, ) (*corev1.ConfigMap, error)
getConfigMapCopy is a generic function which creates a copy of a given source ConfigMap. The resulting copy is a ConfigMap with similar data, and with metadata set by the 'copyConfigMapObjectMeta' argument.
func GetResource ¶ added in v0.5.0
func GetSynapseServerName ¶
func GetSynapseServerName(s synapsev1alpha1.Synapse) (string, error)
func HandleDelete ¶ added in v0.5.0
func HandleDelete(kubeClient client.Client, resource Bridge) func(context.Context, ctrl.Request) (*ctrl.Result, error)
HandleDelete returns a function of type subreconciler.FnWithRequest
Bridges need to trigger the reconciliation of their associated Synapse homeserver so that Synapse can remove the bridge from the list of application services in its configuration.
func SetFailedState ¶ added in v0.5.0
func TriggerSynapseReconciliation ¶ added in v0.5.0
func TriggerSynapseReconciliation(kubeClient client.Client, resource Bridge) func(context.Context, ctrl.Request) (*ctrl.Result, error)
TriggerSynapseReconciliation returns a function of type subreconciler.FnWithRequest Bridges should trigger the reconciliation of their associated Synapse server so that Synapse can add the bridge as an application service in its configuration.
func UpdateConfigMap ¶
func UpdateConfigMap( ctx context.Context, client client.Client, key types.NamespacedName, obj client.Object, updateData updateDataFunc, filename string, ) error
A generic function to update an existing ConfigMap. It takes as arguments: * The context * The key (name and namespace) of the ConfigMap to update * The Synapse object being reconciled * The function to be called to actually update the ConfigMap's content * The name of the file to update in the ConfigMap