Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 2f50a34
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 23:02:05 2024 +0100

    predicates: do not process delete events and not ready pods

commit 039b403
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 22:45:28 2024 +0100

    fix reconciled object: Secret

commit a9a6092
Merge: a666060 a91e537
Author: Théo Brigitte <[email protected]>
Date:   Sun Dec 15 19:09:34 2024 +0100

    Merge branch 'alertmanager-config' into alertmanager-controller

commit a91e537
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 19:07:52 2024 +0100

    rename alertmanager to alerting in values.yaml

commit 5b639a1
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 19:07:15 2024 +0100

    Revert "Merge remote-tracking branch 'origin/alertmanager-config-helm' into alertmanager-config"

    This reverts commit b3f9a8e, reversing
    changes made to cc9987d.

commit a666060
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:56:34 2024 +0100

    restore flags

commit a80d94d
Merge: 6fbcf61 01ce0f3
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:56:21 2024 +0100

    Merge branch 'alertmanager-config' into alertmanager-controller

commit 01ce0f3
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:55:56 2024 +0100

    remove uneeded flags

commit 8cda08b
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:50:58 2024 +0100

    get base template name

commit 6fbcf61
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:33:10 2024 +0100

    update alertmanager job

commit ee02be2
Merge: 7d75b09 b0eb4dc
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:31:16 2024 +0100

    Merge branch 'alertmanager-config' into alertmanager-controller

commit b0eb4dc
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:30:47 2024 +0100

    pass secret to Configure, add comment

commit fbda645
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:16:48 2024 +0100

    revert grafana organization controller changes

commit 7d75b09
Merge: 740d3b9 18935b1
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:13:07 2024 +0100

    Merge branch 'alertmanager-config' into alertmanager-controller

commit 18935b1
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:12:47 2024 +0100

    update alertmanager > alerting in deployment.yaml

commit b3f9a8e
Merge: cc9987d 9591a92
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:11:51 2024 +0100

    Merge remote-tracking branch 'origin/alertmanager-config-helm' into alertmanager-config

commit cc9987d
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:10:40 2024 +0100

    revert grafana organization controller changes

commit 740d3b9
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 18:02:00 2024 +0100

    Add Alertmanager controller

commit e58c682
Author: Theo Brigitte <[email protected]>
Date:   Sun Dec 15 17:43:56 2024 +0100

    remove alertmanager job from grafana organization controller

commit c715315
Merge: 377edef b215065
Author: Theo Brigitte <[email protected]>
Date:   Fri Dec 13 13:04:41 2024 +0100

    Merge remote-tracking branch 'origin/main' into alertmanager-config

commit 9591a92
Author: Theo Brigitte <[email protected]>
Date:   Fri Dec 13 12:52:01 2024 +0100

    rename alertmanager to alerting in values.yaml

commit 492a1d7
Merge: 4cfbb20 b215065
Author: Theo Brigitte <[email protected]>
Date:   Fri Dec 13 12:47:59 2024 +0100

    Merge remote-tracking branch 'origin/main' into alertmanager-config-helm

commit 377edef
Merge: a366895 068fc03
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 20:08:07 2024 +0100

    Merge remote-tracking branch 'origin/main' into alertmanager-config

commit a366895
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 20:05:31 2024 +0100

    Handle non 201 errors

commit 388a639
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 20:05:22 2024 +0100

    Fix invalid request body

commit c522b81
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 19:20:30 2024 +0100

    fix debug log

commit 3c450c7
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 19:15:27 2024 +0100

    debug log

commit 4cfbb20
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 18:54:19 2024 +0100

    Add alertmanagerURL

commit 8a79cf5
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 18:53:31 2024 +0100

    Add values and alertmanagerURL

commit 5d320b9
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 17:29:39 2024 +0100

    quote the tmp_string

commit 8cbdbfb
Author: Taylor Bot <[email protected]>
Date:   Tue Dec 10 23:47:03 2024 +0900

    Release v0.10.0 (#191)

    Co-authored-by: Quentin Bisson <[email protected]>

commit 801cadd
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 15:43:28 2024 +0100

    helm 3.10.3 I hate you deeply

    This fixes the infamous: error calling tpl: cannot retrieve Template.Basepath from values inside tpl function

    It does use .Values in templates to access values and pass $ root context to tpl

commit 2ea1101
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 13:13:25 2024 +0100

    try to make helm happy: error calling tpl: cannot retrieve Template.Basepath from values inside tpl function

commit 49b5a1a
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 11:26:39 2024 +0100

    normalize values names

commit 27b62fa
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 11:09:46 2024 +0100

    re-use existing values

commit 9eea3f8
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 10:25:47 2024 +0100

    use .helm-template instead of .tpl

commit 171b62a
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 09:41:51 2024 +0100

    Add Alertmanager config and templates in Helm chart

    - Add secret resource, embedding raw and templated alertmanager files
    - Expose alertmanager templates values as helm chart values
    - Remove all Mimir related conditions
    - Split template into url and notification templates
    - Drop template directive, dynamically set by the operator
    - Escape template in template
    - Re-use slack actions

commit cebac34
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 17:04:34 2024 +0100

    Set the client

commit dd4872a
Merge: 4e89889 e5e90e1
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 16:46:58 2024 +0100

    Merge remote-tracking branch 'origin/main' into alertmanager-config

commit 4e89889
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 16:40:14 2024 +0100

    Wire Alertmanager into GrafanaOrganization controller

commit dfec94d
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 16:25:01 2024 +0100

    Add alertmanager helm helpers

commit 2023dc7
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 12:56:53 2024 +0100

    fix linting errors

commit b32a6de
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 12:27:32 2024 +0100

    go mod tidy

commit b160659
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 11:54:55 2024 +0100

    Remove test

commit d8a3026
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 11:36:22 2024 +0100

    Fix test

commit 3e6e2f9
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 09:48:47 2024 +0100

    Fix maps > slices.Collect

commit 3776e72
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 09:34:25 2024 +0100

    Retrive all templates by suffix

commit 707b23a
Author: Theo Brigitte <[email protected]>
Date:   Tue Dec 10 09:25:58 2024 +0100

    setup logger before loading env vars

commit 5e41fc5
Author: Theo Brigitte <[email protected]>
Date:   Mon Dec 9 16:06:21 2024 +0100

    Add alertmanager.Configure

commit 5b47de7
Merge: a6b2ccc 8df42b3
Author: Theo Brigitte <[email protected]>
Date:   Mon Dec 9 15:36:40 2024 +0100

    Merge remote-tracking branch 'origin/main' into alertmanager-config

commit a6b2ccc
Author: Theo Brigitte <[email protected]>
Date:   Mon Dec 9 15:35:49 2024 +0100

    Add some stuff

commit 8beb36c
Merge: bc2aef8 a7f6ca4
Author: Theo Brigitte <[email protected]>
Date:   Mon Dec 9 14:40:41 2024 +0100

    Merge remote-tracking branch 'origin/main' into alertmanager-config

commit bc2aef8
Author: Theo Brigitte <[email protected]>
Date:   Thu Dec 5 21:37:12 2024 +0100

    go mod tidy

commit b58a751
Author: Theo Brigitte <[email protected]>
Date:   Thu Dec 5 21:28:51 2024 +0100

    I said green

commit f281c75
Author: Theo Brigitte <[email protected]>
Date:   Thu Dec 5 21:18:29 2024 +0100

    make the build green

commit b575507
Author: Theo Brigitte <[email protected]>
Date:   Thu Dec 5 20:40:24 2024 +0100

    make the alertmanagerURL simpler

commit 98d6695
Author: Theo Brigitte <[email protected]>
Date:   Thu Dec 5 19:34:59 2024 +0100

    Add alertmanager config handling
  • Loading branch information
TheoBrigitte committed Dec 15, 2024
1 parent 7e3a623 commit 336b75a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/controller/predicates/alertmanager_secret_predicate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ func NewAlertmanagerSecretPredicate(secretName, namespace string) predicate.Pred
return false
}

if !secret.DeletionTimestamp.IsZero() {
return false
}

labels := secret.GetLabels()

ok = secret.GetName() == secretName &&
Expand Down Expand Up @@ -51,12 +55,17 @@ func NewAlertmanagerPodPredicate() predicate.Predicate {
return false
}

if !pod.DeletionTimestamp.IsZero() {
return false
}

labels := pod.GetLabels()

ok = pod.GetNamespace() == mimirNamespace &&
labels != nil &&
labels["app.kubernetes.io/component"] == mimirAlertmanagerComponent &&
labels["app.kubernetes.io/instance"] == mimirInstance
labels["app.kubernetes.io/instance"] == mimirInstance &&
isPodReady(pod)

return ok
}
Expand Down

0 comments on commit 336b75a

Please sign in to comment.