Skip to content
Draft
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
6 changes: 3 additions & 3 deletions k8s/helmfile/argo-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ releases:
- name: argo-cd-base
namespace: argocd
chart: argo-cd/argo-cd
version: '{{ if eq .Environment.Name "production" }} 7.6.11 {{ else }} 9.1.9 {{ end }}'
version: '9.1.9'
missingFileHandler: Error
values:
- env/production/{{`{{ .Release.Name }}`}}.values.yaml.gotmpl
- env/{{`{{ .Environment.Name }}`}}/{{`{{ .Release.Name }}`}}.values.yaml.gotmpl
- env/production/{{`{{ .Release.Name }}`}}.values.yaml
- env/{{`{{ .Environment.Name }}`}}/{{`{{ .Release.Name }}`}}.values.yaml
57 changes: 57 additions & 0 deletions k8s/helmfile/env/local/argo-cd-base.values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
configs:
params:
server.insecure: "true"

cm:
admin.enabled: "true"

ui.bannercontent: "LOCAL"
ui.bannerurl: "http://www.wbaas.dev/"

styles: |
.ui-banner {
background-color:#6d7f8b;

a {
color:white;
}
}

global:
domain: argo.wbaas.dev

certificate:
enabled: true

server:
ingress:
enabled: true
ingressClassName: nginx

notifications:
notifiers:
service.mattermost: |
apiURL: https://mattermost.wikimedia.de
token: $mattermost-token
secret:
create: false

subscriptions:
- recipients:
- mattermost:3kk8aywgrjf4fmxfqkm6fusbcr

templates:
template.app-sync-succeeded: |
mattermost:
attachments: '[{"title":"{{.app.status.sync.status}} {{.app.metadata.name}} on {{.app.spec.project}}","title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}","color":"#18be52","fields":[{"title":"Timestamp","value":"{{.app.status.operationState.finishedAt}}","short":true},{"title":"Details","value":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .","short":true}]}]'

triggers:
# trigger.on-deleted: |
# oncePer: app.status.sync.revision
# send: [app-deleted]

trigger.on-sync-succeeded: |
- description: Application syncing has succeeded
send:
- app-sync-succeeded
when: "true"
11 changes: 11 additions & 0 deletions tf/env/local/secrets-argo.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "kubernetes_secret" "argo-notifications-secret" {

metadata {
namespace = "argocd"
name = "argocd-notifications-secret"
}

data = {
"mattermost-token" = var.mattermost_bot_token,
}
}
6 changes: 6 additions & 0 deletions tf/env/local/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ variable "botstopper_image_pull_json_secret" {
description = "String contents of a docker/config.json to pull the botstopper image generated using `kubectl create secret` as per the botstopper docs"
sensitive = true
}

variable "mattermost_bot_token" {
type = string
description = "Base64 Encoding of a docker/config.json to pull the botstopper image"
sensitive = true
}