//Cloudogu EcoSystem Docs

Email with migration results

After a migration has been performed, certain users can be notified about the result of the migration by email. This applies to both the delta migrations and the final migration. The current status of the migration and any errors are listed in the emails. Each email also contains the log of the migration as an attachment. The default configuration of the CES Importer does not send any emails.

Requirements

During the migration, no emails can be sent via the Cloudogu EcoSystem as the Postfix-Dogu required for this is not available. For this reason, an external SMTP server must be provided and configured accordingly for sending emails.

Configuration

If you want the migration results to be sent by email, you must configure this setting in the CES Importer's custom resource ("Component-CR") on the target instance:

  • Edit the “Component-CR” of the CES importer:

    kubectl edit component ces-importer -n ecosystem
  • Modify the configuration in the valuesYamlOverwrite field under the path config/smtp:

    apiVersion: k8s.cloudogu.com/v1
    kind: Component
    metadata:
      name: ces-importer
      namespace: ecosystem
    spec:
      name: ces-importer
      namespace: k8s
      version: 1.0.0
      valuesYamlOverwrite: |
        config:
          smtp:
            enabled: true
            server: smtp.example.com
            port: 25
            # Optional
            username:
            secretName: "ces-importer-secret"
            secretDataKey: "mailPassword"
            from: importer@example.com
            to:
              - recipient1@example.com
              - recipient2@example.com
  • Save the changes made to the component CR
  • Restart the CES importer:

    kubectl rollout restart deployment/ces-importer -n ecosystem

If authentication to the SMTP server is necessary, make sure that the username and a password are set. The password is not set as plain text in the configuration above but must be stored in a Kubernetes secret. The password is referenced in the configuration via the parameter secretName and the corresponding secretDataKey.

The sender of the email can be configured in the from field. If the SMTP server is a relay server, the sender appears as such in the email. Otherwise, the email contains the user of the SMTP server as the sender on whose behalf the email was sent. The email is sent to all addresses defined in the to field.