diff --git a/dev/argocd/argocd-notifications-cm.yaml b/dev/argocd/argocd-notifications-cm.yaml deleted file mode 100644 index 3fb4a1b..0000000 --- a/dev/argocd/argocd-notifications-cm.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: argocd-notifications-cm - namespace: argocd - labels: - app.kubernetes.io/component: notifications-controller - app.kubernetes.io/instance: argocd - app.kubernetes.io/managed-by: manual - app.kubernetes.io/name: argocd-notifications-controller - app.kubernetes.io/part-of: argocd -data: - context: | - argocdUrl: https://argocd-dev.allarddcs.nl - - service.email: | - host: mail.allarddcs.nl - port: 587 - from: argocd@allarddcs.nl - username: argocd@allarddcs.nl - password: Argocd01@ - starttls: true - - template.app-sync-failed: | - email: - subject: Failed to sync application {{.app.metadata.name}}. - message: | - The sync of {{.app.metadata.name}} failed at {{.app.status.operationState.finishedAt}}. - Error: {{.app.status.operationState.message}} - More details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true - - trigger.on-sync-failed: | - - description: Application syncing has failed - send: [app-sync-failed] - when: app.status.operationState != nil and app.status.operationState.phase in ['Error','Failed'] - - subscriptions: | - - recipients: - - email:admin@allarddcs.nl - triggers: - - on-sync-failed diff --git a/dev/argocd/values.old b/dev/argocd/values.old deleted file mode 100644 index b7d0f68..0000000 --- a/dev/argocd/values.old +++ /dev/null @@ -1,123 +0,0 @@ -ingress: - server: - enabled: true - ingressClassName: traefik - hosts: - - host: argocd-dev.allarddcs.nl - paths: - - "/" - tls: - - hosts: - - argocd-dev.allarddcs.nl - secretName: argocd-tls-cert - -configs: - secret: - extra: - argocdServerAdminPassword: "$2a$10$CYBSxU6gqSBKP4knIdKDm.pF4TQXmJwUh860yXQEsHFy43Z2fuenK" - params: - # disable insecure (HTTP) - server.insecure: "false" - resource.customizations: | - rbac.authorization.k8s.io/ClusterRole: - ignoreDifferences: | - jsonPointers: - - /metadata/annotations/argocd.argoproj.io~1tracking-id - rbac.authorization.k8s.io/ClusterRoleBinding: - ignoreDifferences: | - jsonPointers: - - /metadata/annotations/argocd.argoproj.io~1tracking-id - -server: - tls: - enabled: true - # name of the TLS secret (created via cert-manager) - secretName: argocd-tls-cert - -repoServer: - extraArgs: - - --parallelismlimit=1 - - readinessProbe: - initialDelaySeconds: 10 - periodSeconds: 5 - timeoutSeconds: 2 - failureThreshold: 10 - - livenessProbe: - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 2 - failureThreshold: 10 - -notifications: - enabled: true - name: notifications-controller - context: - argocdUrl: https://argocd-dev.allarddcs.nl - - secret: - create: true - name: argocd-notifications-secret - items: - email-username: "argocd@allarddcs.nl" - email-password: 'Argocd01@' - cm: - create: true - extra: - service.email: | - host: mail.allarddcs.nl - port: 587 - from: $email-username - username: $email-username - password: $email-password - starttls: true - - templates: - template.app-sync-failed: | - email: - subject: Failed to sync application {{.app.metadata.name}}. - message: | - {{if eq .serviceType "slack"}}:exclamation:{{end}} The sync operation of application {{.app.metadata.name}} has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}} - Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true . - slack: - attachments: |- - [{ - "title": "{{ .app.metadata.name}}", - "title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}", - "color": "#E96D76", - "fields": [ - { - "title": "Sync Status", - "value": "{{.app.status.sync.status}}", - "short": true - }, - { - "title": "Repository", - "value": "{{.app.spec.source.repoURL}}", - "short": true - } - {{range $index, $c := .app.status.conditions}} - {{if not $index}},{{end}} - {{if $index}},{{end}} - { - "title": "{{$c.type}}", - "value": "{{$c.message}}", - "short": true - } - {{end}} - ] - }] - - triggers: - trigger.on-sync-failed: | - - description: Application syncing has failed - send: [app-sync-failed] - when: app.status.operationState != nil and app.status.operationState.phase in ['Error','Failed'] - - subscriptions: - - recipients: - - admin@allarddcs.nl - triggers: - - on-sync-failed - diff --git a/dev/argocd/values.old2 b/dev/argocd/values.old2 deleted file mode 100644 index 01f02dd..0000000 --- a/dev/argocd/values.old2 +++ /dev/null @@ -1,95 +0,0 @@ -ingress: - server: - enabled: true - ingressClassName: traefik - hosts: - - host: argocd-dev.allarddcs.nl - paths: - - "/" - tls: - - hosts: - - argocd-dev.allarddcs.nl - secretName: argocd-tls-cert - -configs: - secret: - extra: - argocdServerAdminPassword: "$2a$10$CYBSxU6gqSBKP4knIdKDm.pF4TQXmJwUh860yXQEsHFy43Z2fuenK" - params: - # disable insecure (HTTP) - server.insecure: "false" - resource.customizations: | - rbac.authorization.k8s.io/ClusterRole: - ignoreDifferences: | - jsonPointers: - - /metadata/annotations/argocd.argoproj.io~1tracking-id - rbac.authorization.k8s.io/ClusterRoleBinding: - ignoreDifferences: | - jsonPointers: - - /metadata/annotations/argocd.argoproj.io~1tracking-id - -server: - tls: - enabled: true - # name of the TLS secret (created via cert-manager) - secretName: argocd-tls-cert - -repoServer: - extraArgs: - - --parallelismlimit=1 - - readinessProbe: - initialDelaySeconds: 10 - periodSeconds: 5 - timeoutSeconds: 2 - failureThreshold: 10 - - livenessProbe: - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 2 - failureThreshold: 10 - -notifications: - enabled: true - - context: - argocdUrl: https://argocd-dev.allarddcs.nl - - cm: - create: true - extra: - service.email: | - host: mail.allarddcs.nl - port: 587 - from: $email-username - username: $email-username - password: $email-password - starttls: true - - secret: - create: true - name: argocd-notifications-secret - items: - email-username: "argocd@allarddcs.nl" - email-password: "Argocd01@" - - templates: - app-sync-failed: | - email: - subject: Failed to sync application {{.app.metadata.name}}. - message: | - The sync operation of application {{.app.metadata.name}} has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}} - More details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true - - triggers: - on-sync-failed: | - - description: Application syncing has failed - send: [app-sync-failed] - when: app.status.operationState != nil and app.status.operationState.phase in ['Error','Failed'] - - subscriptions: - - recipients: - - admin@allarddcs.nl - triggers: - - on-sync-failed diff --git a/dev/argocd/values.yaml b/dev/argocd/values.yaml index 41a51db..43fbb4c 100644 --- a/dev/argocd/values.yaml +++ b/dev/argocd/values.yaml @@ -72,13 +72,45 @@ notifications: starttls: true templates: - app-sync-failed: | - email: - subject: Failed to sync application {{.app.metadata.name}}. - message: | - The sync of {{.app.metadata.name}} failed at {{.app.status.operationState.finishedAt}}. - Error: {{.app.status.operationState.message}} - More details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true + template.app-deployed: | + email: + subject: New version of an application {{.app.metadata.name}} is up and running. + message: | + {{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} is now running new version of deployments manifests. + template.app-health-degraded: | + email: + subject: Application {{.app.metadata.name}} has degraded. + message: | + {{if eq .serviceType "slack"}}:exclamation:{{end}} Application {{.app.metadata.name}} has degraded. + Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}. + template.app-sync-failed: | + email: + subject: Failed to sync application {{.app.metadata.name}}. + message: | + The sync operation of application {{.app.metadata.name}} has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}} + template.app-sync-running: | + email: + subject: Start syncing application {{.app.metadata.name}}. + message: | + The sync operation of application {{.app.metadata.name}} has started at {{.app.status.operationState.startedAt}}. + Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true . + template.app-sync-status-unknown: | + email: + subject: Application {{.app.metadata.name}} sync status is 'Unknown' + message: | + {{if eq .serviceType "slack"}}:exclamation:{{end}} Application {{.app.metadata.name}} sync is 'Unknown'. + Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}. + {{if ne .serviceType "slack"}} + {{range $c := .app.status.conditions}} + * {{$c.message}} + {{end}} + {{end}} + template.app-sync-succeeded: | + email: + subject: Application {{.app.metadata.name}} has been successfully synced. + message: | + {{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}. + Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true . triggers: trigger.on-sync-failed: | @@ -86,12 +118,41 @@ notifications: send: - app-sync-failed when: app.status.operationState != nil and app.status.operationState.phase in ['Error','Failed'] + trigger.on-deployed: | + - description: Application is synced and healthy. Triggered once per commit. + oncePer: app.status.sync.revision + send: + - app-deployed + when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy' + trigger.on-health-degraded: | + - description: Application has degraded + send: + - app-health-degraded + when: app.status.health.status == 'Degraded' + trigger.on-sync-running: | + - description: Application is being synced + send: + - app-sync-running + when: app.status.operationState.phase in ['Running'] + trigger.on-sync-status-unknown: | + - description: Application status is 'Unknown' + send: + - app-sync-status-unknown + when: app.status.sync.status == 'Unknown' + trigger.on-sync-succeeded: | + - description: Application syncing has succeeded + send: + - app-sync-succeeded + when: app.status.operationState.phase in ['Succeeded'] subscriptions: - recipients: - email:admin@allarddcs.nl triggers: - on-sync-failed - + - on-sync-status-unknown + - on-sync-succeeded + - app-health-degraded context: argocdUrl: https://argocd-dev.allarddcs.nl + diff --git a/dev/deptrack2/README.md b/dev/deptrack/README.md similarity index 100% rename from dev/deptrack2/README.md rename to dev/deptrack/README.md diff --git a/dev/deptrack2/deptrack.old b/dev/deptrack/deptrack.old similarity index 100% rename from dev/deptrack2/deptrack.old rename to dev/deptrack/deptrack.old diff --git a/dev/deptrack2/deptrack.yaml b/dev/deptrack/deptrack.yaml similarity index 100% rename from dev/deptrack2/deptrack.yaml rename to dev/deptrack/deptrack.yaml diff --git a/dev/harbor2/README.md b/dev/harbor/README.md similarity index 100% rename from dev/harbor2/README.md rename to dev/harbor/README.md diff --git a/dev/harbor2/catalog-info.yaml.ignore b/dev/harbor/catalog-info.yaml.ignore similarity index 100% rename from dev/harbor2/catalog-info.yaml.ignore rename to dev/harbor/catalog-info.yaml.ignore diff --git a/dev/harbor2/create-registry-credentials.sh b/dev/harbor/create-registry-credentials.sh similarity index 100% rename from dev/harbor2/create-registry-credentials.sh rename to dev/harbor/create-registry-credentials.sh diff --git a/dev/harbor2/harbor-pv.yaml b/dev/harbor/harbor-pv.yaml similarity index 100% rename from dev/harbor2/harbor-pv.yaml rename to dev/harbor/harbor-pv.yaml diff --git a/dev/harbor2/harbor-pvc.yaml b/dev/harbor/harbor-pvc.yaml similarity index 100% rename from dev/harbor2/harbor-pvc.yaml rename to dev/harbor/harbor-pvc.yaml diff --git a/dev/harbor2/values.yaml b/dev/harbor/values.yaml similarity index 100% rename from dev/harbor2/values.yaml rename to dev/harbor/values.yaml