Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: distinct codefresh names for everything for all notification res…
…ources
  • Loading branch information
danielm-codefresh committed Apr 7, 2024
commit 5a8b59490ce9395673a33d0a59810ee9c63c7e9c
16 changes: 8 additions & 8 deletions charts/gitops-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ sealed-secrets:
| argo-cd.fullnameOverride | string | `"argo-cd"` | |
| argo-cd.notifications.bots.slack | object | `{}` | |
| argo-cd.notifications.enabled | bool | `true` | |
| argo-cd.notifications.notifiers."service.webhook.app-revision-changed-notifier" | string | `"url: http://gitops-operator:8082/app-revision-changed\nheaders:\n- name: Content-Type\n value: application/json\n"` | |
| argo-cd.notifications.subscriptions[0].recipients[0] | string | `"app-revision-changed-notifier"` | |
| argo-cd.notifications.subscriptions[0].triggers[0] | string | `"on-deployed-trigger"` | |
| argo-cd.notifications.subscriptions[1].recipients[0] | string | `"app-revision-changed-notifier"` | |
| argo-cd.notifications.subscriptions[1].triggers[0] | string | `"on-out-of-sync-trigger"` | |
| argo-cd.notifications.templates."template.app-revision-changed-template" | string | `"webhook:\n app-revision-changed-notifier:\n method: POST\n body: |\n {\n \"APP_NAMESPACE\": {{ .app.metadata.namespace | quote }},\n \"APP_NAME\": {{ .app.metadata.name | quote }},\n \"REPO_URL\": {{ call .repo.RepoURLToHTTPS .app.spec.source.repoURL | quote }},\n \"BRANCH\": {{ .app.spec.source.targetRevision | quote }},\n \"PATH\": {{ .app.spec.source.path | quote }},\n \"PREV_COMMIT_SHA\": {{ (index .app.status.history (sub (len .app.status.history) 2)).revision | quote }},\n \"CURRENT_COMMIT_SHA\": {{ .app.status.operationState.syncResult.revision | quote }}\n }\n"` | |
| argo-cd.notifications.triggers."trigger.on-deployed-trigger" | string | `"- description: Application is synced and healthy. Triggered once per commit.\n when: get(app.spec.syncPolicy, \"automated\") != nil && app.status.sync.status == \"Synced\" && app.status.health.status == \"Healthy\" && app.status.operationState.syncResult.revision != nil\n oncePer: app.status.operationState.syncResult.revision\n send:\n - app-revision-changed-template\n"` | |
| argo-cd.notifications.triggers."trigger.on-out-of-sync-trigger" | string | `"- description: Application is out of sync (when autoHeal is off). Triggered once per commit.\n when: get(app.spec.syncPolicy, \"automated\") == nil && app.status.sync.status == \"OutOfSync\" && app.status.operationState.syncResult.revision != nil\n oncePer: app.status.operationState.syncResult.revision\n send:\n - app-revision-changed-template\n"` | |
| argo-cd.notifications.notifiers."service.webhook.cf-promotion-app-revision-changed-notifier" | string | `"url: http://gitops-operator:8082/app-revision-changed\nheaders:\n- name: Content-Type\n value: application/json\n"` | |
| argo-cd.notifications.subscriptions[0].recipients[0] | string | `"cf-promotion-app-revision-changed-notifier"` | |
| argo-cd.notifications.subscriptions[0].triggers[0] | string | `"cf-promotion-on-deployed-trigger"` | |
| argo-cd.notifications.subscriptions[1].recipients[0] | string | `"cf-promotion-app-revision-changed-notifier"` | |
| argo-cd.notifications.subscriptions[1].triggers[0] | string | `"cf-promotion-on-out-of-sync-trigger"` | |
| argo-cd.notifications.templates."template.cf-promotion-app-revision-changed-template" | string | `"webhook:\n cf-promotion-app-revision-changed-notifier:\n method: POST\n body: |\n {\n \"APP_NAMESPACE\": {{ .app.metadata.namespace | quote }},\n \"APP_NAME\": {{ .app.metadata.name | quote }},\n \"REPO_URL\": {{ call .repo.RepoURLToHTTPS .app.spec.source.repoURL | quote }},\n \"BRANCH\": {{ .app.spec.source.targetRevision | quote }},\n \"PATH\": {{ .app.spec.source.path | quote }},\n \"PREV_COMMIT_SHA\": {{ (index .app.status.history (sub (len .app.status.history) 2)).revision | quote }},\n \"CURRENT_COMMIT_SHA\": {{ .app.status.operationState.syncResult.revision | quote }}\n }\n"` | |
| argo-cd.notifications.triggers."trigger.cf-promotion-on-deployed-trigger" | string | `"- description: Application is synced and healthy. Triggered once per commit.\n when: get(app.spec.syncPolicy, \"automated\") != nil && app.status.sync.status == \"Synced\" && app.status.health.status == \"Healthy\" && app.status.operationState.syncResult.revision != nil\n oncePer: app.status.operationState.syncResult.revision\n send:\n - cf-promotion-app-revision-changed-template\n"` | |
| argo-cd.notifications.triggers."trigger.cf-promotion-on-out-of-sync-trigger" | string | `"- description: Application is out of sync (when autoHeal is off). Triggered once per commit.\n when: get(app.spec.syncPolicy, \"automated\") == nil && app.status.sync.status == \"OutOfSync\" && app.status.operationState.syncResult.revision != nil\n oncePer: app.status.operationState.syncResult.revision\n send:\n - cf-promotion-app-revision-changed-template\n"` | |
| argo-events.crds.install | bool | `false` | |
| argo-events.fullnameOverride | string | `"argo-events"` | |
| argo-rollouts.controller.replicas | int | `1` | |
Expand Down
22 changes: 11 additions & 11 deletions charts/gitops-runtime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,26 +170,26 @@ argo-cd:
slack: {}

notifiers:
service.webhook.app-revision-changed-notifier: |
service.webhook.cf-promotion-app-revision-changed-notifier: |
url: http://gitops-operator:8082/app-revision-changed
headers:
- name: Content-Type
value: application/json

subscriptions:
- triggers:
- on-deployed-trigger
- cf-promotion-on-deployed-trigger
recipients:
- app-revision-changed-notifier
- cf-promotion-app-revision-changed-notifier
- triggers:
- on-out-of-sync-trigger
- cf-promotion-on-out-of-sync-trigger
recipients:
- app-revision-changed-notifier
- cf-promotion-app-revision-changed-notifier

templates:
template.app-revision-changed-template: |
template.cf-promotion-app-revision-changed-template: |
webhook:
app-revision-changed-notifier:
cf-promotion-app-revision-changed-notifier:
method: POST
body: |
{
Expand All @@ -203,18 +203,18 @@ argo-cd:
}

triggers:
trigger.on-deployed-trigger: |
trigger.cf-promotion-on-deployed-trigger: |
- description: Application is synced and healthy. Triggered once per commit.
when: get(app.spec.syncPolicy, "automated") != nil && app.status.sync.status == "Synced" && app.status.health.status == "Healthy" && app.status.operationState.syncResult.revision != nil
oncePer: app.status.operationState.syncResult.revision
send:
- app-revision-changed-template
trigger.on-out-of-sync-trigger: |
- cf-promotion-app-revision-changed-template
trigger.cf-promotion-on-out-of-sync-trigger: |
- description: Application is out of sync (when autoHeal is off). Triggered once per commit.
when: get(app.spec.syncPolicy, "automated") == nil && app.status.sync.status == "OutOfSync" && app.status.operationState.syncResult.revision != nil
oncePer: app.status.operationState.syncResult.revision
send:
- app-revision-changed-template
- cf-promotion-app-revision-changed-template


#-----------------------------------------------------------------------------------------------------------------------
Expand Down