Documentation ¶
Index ¶
- Constants
- func GetCassandraUserCredentialsSecret(cr *apiv1alpha1.Astarte) (string, string, string)
- func GetRabbitMQCredentialsFor(cr *apiv1alpha1.Astarte, c client.Client) (string, int16, string, string, error)
- func GetRabbitMQHostnameAndPort(cr *apiv1alpha1.Astarte) (string, int16)
- func GetRabbitMQUserCredentialsSecret(cr *apiv1alpha1.Astarte) (string, string, string)
- func GetResourcesForAstarteComponent(cr *apiv1alpha1.Astarte, requestedResources *v1.ResourceRequirements, ...) v1.ResourceRequirements
- func GetVerneMQBrokerURL(cr *apiv1alpha1.Astarte) string
- func IsAstarteComponentDeployed(cr *apiv1alpha1.Astarte, component commontypes.AstarteComponent) bool
- func LogCreateOrUpdateOperationResult(log logr.Logger, result controllerutil.OperationResult, cr metav1.Object, ...)
- func ReconcileConfigMap(objName string, data map[string]string, cr metav1.Object, c client.Client, ...) (controllerutil.OperationResult, error)
- func ReconcileSecret(objName string, data map[string][]byte, cr metav1.Object, c client.Client, ...) (controllerutil.OperationResult, error)
- func ReconcileSecretString(objName string, data map[string]string, cr metav1.Object, c client.Client, ...) (controllerutil.OperationResult, error)
- func ReconcileSecretStringWithLabels(objName string, data, labels map[string]string, cr metav1.Object, ...) (controllerutil.OperationResult, error)
- func ReconcileTLSSecret(objName string, cert, key string, cr metav1.Object, c client.Client, ...) (controllerutil.OperationResult, error)
Constants ¶
const ( // RabbitMQDefaultUserCredentialsUsernameKey is the default Username key for RabbitMQ Secret RabbitMQDefaultUserCredentialsUsernameKey = "admin-username" // RabbitMQDefaultUserCredentialsPasswordKey is the default Password key for RabbitMQ Secret RabbitMQDefaultUserCredentialsPasswordKey = "admin-password" // CassandraDefaultUserCredentialsUsernameKey is the default Username key for Cassandra Secret CassandraDefaultUserCredentialsUsernameKey = "username" // CassandraDefaultUserCredentialsPasswordKey is the default Password key for Cassandra Secret CassandraDefaultUserCredentialsPasswordKey = "password" )
Variables ¶
This section is empty.
Functions ¶
func GetCassandraUserCredentialsSecret ¶
func GetCassandraUserCredentialsSecret(cr *apiv1alpha1.Astarte) (string, string, string)
GetCassandraUserCredentialsSecret gets the secret holding Cassandra credentials in the form <secret name>, <username key>, <password key>
func GetRabbitMQCredentialsFor ¶
func GetRabbitMQCredentialsFor(cr *apiv1alpha1.Astarte, c client.Client) (string, int16, string, string, error)
GetRabbitMQCredentialsFor returns the RabbitMQ host, username and password for a given CR. This information can be used for connecting to RabbitMQ from the Operator or an external agent, and it should not be used for any other purpose.
func GetRabbitMQHostnameAndPort ¶
func GetRabbitMQHostnameAndPort(cr *apiv1alpha1.Astarte) (string, int16)
GetRabbitMQHostnameAndPort returns the Cluster-accessible Hostname and AMQP port for RabbitMQ
func GetRabbitMQUserCredentialsSecret ¶
func GetRabbitMQUserCredentialsSecret(cr *apiv1alpha1.Astarte) (string, string, string)
GetRabbitMQUserCredentialsSecret gets the secret holding RabbitMQ credentials in the form <secret name>, <username key>, <password key>
func GetResourcesForAstarteComponent ¶
func GetResourcesForAstarteComponent(cr *apiv1alpha1.Astarte, requestedResources *v1.ResourceRequirements, component commontypes.AstarteComponent) v1.ResourceRequirements
GetResourcesForAstarteComponent returns the allocated resources for a given Astarte component, taking into account both the directive from Components, and the directive from the individual component (if any). It will compute a ResourceRequirements for the component based on said values and internal logic.
func GetVerneMQBrokerURL ¶
func GetVerneMQBrokerURL(cr *apiv1alpha1.Astarte) string
GetVerneMQBrokerURL returns the complete URL for VerneMQ (MQTT) for an Astarte resource
func IsAstarteComponentDeployed ¶
func IsAstarteComponentDeployed(cr *apiv1alpha1.Astarte, component commontypes.AstarteComponent) bool
IsAstarteComponentDeployed returns whether an Astarte component is deployed by cr
func LogCreateOrUpdateOperationResult ¶
func LogCreateOrUpdateOperationResult(log logr.Logger, result controllerutil.OperationResult, cr metav1.Object, obj metav1.Object)
LogCreateOrUpdateOperationResult logs conveniently a controllerutil Operation
func ReconcileConfigMap ¶
func ReconcileConfigMap(objName string, data map[string]string, cr metav1.Object, c client.Client, scheme *runtime.Scheme, log logr.Logger) (controllerutil.OperationResult, error)
ReconcileConfigMap creates or updates a ConfigMap through controllerutil through its data map
func ReconcileSecret ¶
func ReconcileSecret(objName string, data map[string][]byte, cr metav1.Object, c client.Client, scheme *runtime.Scheme, log logr.Logger) (controllerutil.OperationResult, error)
ReconcileSecret creates or updates a Secret through controllerutil through its data
func ReconcileSecretString ¶
func ReconcileSecretString(objName string, data map[string]string, cr metav1.Object, c client.Client, scheme *runtime.Scheme, log logr.Logger) (controllerutil.OperationResult, error)
ReconcileSecretString creates or updates a Secret through controllerutil by using StringData
func ReconcileSecretStringWithLabels ¶
func ReconcileSecretStringWithLabels(objName string, data, labels map[string]string, cr metav1.Object, c client.Client, scheme *runtime.Scheme, log logr.Logger) (controllerutil.OperationResult, error)
ReconcileSecretStringWithLabels creates or updates a Secret through controllerutil by using StringData, and adding a set of Labels
func ReconcileTLSSecret ¶
func ReconcileTLSSecret(objName string, cert, key string, cr metav1.Object, c client.Client, scheme *runtime.Scheme, log logr.Logger) (controllerutil.OperationResult, error)
ReconcileTLSSecret creates or updates a TLS Secret through controllerutil through its data
Types ¶
This section is empty.