Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Grafana v10 ContactPoint types #1549

Merged
merged 2 commits into from
May 26, 2024
Merged

Conversation

andrejshapal
Copy link
Contributor

Closes #1548

Just added new items in list from
https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/

Basically, we have to keep backward compitability for old grafana versions and include new types. The users have to choose types in accordance with grafana version they use.

Tested manually:
image

Manifest
sources:
   - repoURL: https://github.com/andrejshapal/grafana-operator.git
     targetRevision: master
     path: deploy/helm/grafana-operator
     helm:
       values: |

         fullnameOverride: "grafana-operator"

         namespaceScope: true
         image:
           repository: njuhaandrej/grafana-operator
           pullPolicy: Always
           tag: 8d1372eb04c3804416f724d98967bdb931ad026de458510f787866d818655757
         resources:
           limits:
             cpu: 100m
             memory: 200Mi
           requests:
             cpu: 50m
             memory: 100Mi

         serviceMonitor:
           enabled: false

   - repoURL: https://kiwigrid.github.io
     chart: any-resource
     targetRevision: "0.1.0"
     helm:
       values: |
         anyResources:
           grafana-one: |-
             apiVersion: grafana.integreatly.org/v1beta1
             kind: Grafana
             metadata:
               name: grafana-one
               labels:
                 dashboards: "grafana-one"
             spec:
               config:
                 log:
                   mode: "console"
                 auth:
                   disable_login_form: "false"
                 security:
                   admin_user: root
                   admin_password: secret
               deployment:
                 spec:
                   template:
                     spec:
                       containers:
                         - name: grafana
                           image: grafana/grafana:10.4.2

           contactpoint: |-
             apiVersion: grafana.integreatly.org/v1beta1
             kind: GrafanaContactPoint
             metadata:
               name: prometheus-alertmanager
             spec:
               instanceSelector:
                 matchLabels:
                   dashboards: "grafana-one"
               name: Prometheus Alertmanager
               type: prometheus-alertmanager
               settings:
                 url: http://kube-prometheus-stack-alertmanager.monitoring.svc:9093
           
           datasource: |-
             apiVersion: grafana.integreatly.org/v1beta1
             kind: GrafanaDatasource
             metadata:
               name: alertmanager-alerting
             spec:
               instanceSelector:
                 matchLabels:
                   dashboards: "grafana-one"
               datasource:
                 name: alertmananger-alerting
                 orgId: 1
                 access: proxy
                 type: alertmanager
                 url: http://kube-prometheus-stack-alertmanager.monitoring.svc:9093
                 jsonData:
                   implementation: prometheus
                   handleGrafanaManagedAlerts: true
                 basicAuth: false

Copy link
Member

@theSuess theSuess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - thanks for this contribution!

Can you rebase this PR (& run make all again) to resolve the conflicts?

@andrejshapal andrejshapal reopened this May 25, 2024
@andrejshapal
Copy link
Contributor Author

@theSuess Done.

@NissesSenap NissesSenap enabled auto-merge (squash) May 26, 2024 04:38
@NissesSenap NissesSenap disabled auto-merge May 26, 2024 04:38
@NissesSenap NissesSenap enabled auto-merge (squash) May 26, 2024 04:38
@NissesSenap NissesSenap disabled auto-merge May 26, 2024 04:38
@NissesSenap NissesSenap enabled auto-merge (squash) May 26, 2024 04:38
@NissesSenap NissesSenap merged commit c64fc82 into grafana:master May 26, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Notifier alertmanager is not supported
3 participants