Files
zeekayandHanzo Dev 446e343a3d cd: annotations are cd.hanzo.ai, API group is apps.hanzo.ai
Two corrections on top of the naming pass, both found by checking the live
cluster rather than the source.

The rename had silently changed the user-facing annotation key from
argocd.argoproj.io/sync-wave to cd.argoproj.io/sync-wave — 63 live
Applications carry the old key, so deploying that would have ignored every
sync-wave and broken fleet deploy ordering. The key is now cd.hanzo.ai/*,
and universe 575650286 moves the ApplicationSet template that stamps it, so
the controller regenerates all 63 consistently.

The API group in code said argoproj.io/v1alpha1 in 157 places while the
cluster has served apps.hanzo.ai/v1alpha1 since 2026-07-23 (the CRDs are
applications.apps.hanzo.ai). Code now matches what is actually served.

The legacy applications.argoproj.io/app-name label had ZERO live users, so it
went with the rest. foo.argoproj.io test fixtures became foo.example.com —
arbitrary test domains should not carry a vendor name.

go build ./... exit 0.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 16:32:14 -07:00

3.0 KiB
Executable File

Google Chat

Parameters

The Google Chat notification service send message notifications to a google chat webhook. This service uses the following settings:

  • webhooks - a map of the form webhookName: webhookUrl

Configuration

  1. Open Google chat and go to the space to which you want to send messages
  2. From the menu at the top of the page, select Configure Webhooks
  3. Under Incoming Webhooks, click Add Webhook
  4. Give a name to the webhook, optionally add an image and click Save
  5. Copy the URL next to your webhook
  6. Store the URL in cd-notification-secret and declare it in cd-notifications-cm
apiVersion: v1
kind: ConfigMap
metadata:
  name: cd-notifications-cm
data:
  service.googlechat: |
    webhooks:
      spaceName: $space-webhook-url
apiVersion: v1
kind: Secret
metadata:
  name: <secret-name>
stringData:
  space-webhook-url: https://chat.googleapis.com/v1/spaces/<space_id>/messages?key=<key>&token=<token>  
  1. Create a subscription for your space
apiVersion: apps.hanzo.ai/v1alpha1
kind: Application
metadata:
  annotations:
    notifications.apps.hanzo.ai/subscribe.on-sync-succeeded.googlechat: spaceName

Templates

You can send simple text or card messages to a Google Chat space. A simple text message template can be defined as follows:

template.app-sync-succeeded: |
  message: The app {{ .app.metadata.name }} has successfully synced!

A card message can be defined as follows:

template.app-sync-succeeded: |
  googlechat:
    cardsV2: |
      - header:
          title: Hanzo CD Bot Notification
        sections:
          - widgets:
              - decoratedText:
                  text: The app {{ .app.metadata.name }} has successfully synced!
          - widgets:
              - decoratedText:
                  topLabel: Repository
                  text: {{ call .repo.RepoURLToHTTPS .app.spec.source.repoURL }}
              - decoratedText:
                  topLabel: Revision
                  text: {{ .app.spec.source.targetRevision }}
              - decoratedText:
                  topLabel: Author
                  text: {{ (call .repo.GetCommitMetadata .app.status.sync.revision).Author }}

All Card fields are supported and can be used in notifications. It is also possible to use the previous (now deprecated) cards key to use the legacy card fields, but this is not recommended as Google has deprecated this field and recommends using the newer cardsV2.

The card message can be written in JSON too.

Chat Threads

It is possible send both simple text and card messages in a chat thread by specifying a unique key for the thread. The thread key can be defined as follows:

template.app-sync-succeeded: |
  message: The app {{ .app.metadata.name }} has successfully synced!
  googlechat:
    threadKey: {{ .app.metadata.name }}