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

control-service: add helm template for alertmanager #2326

Merged
merged 8 commits into from
Jul 13, 2023

Conversation

mrMoZ1
Copy link
Contributor

@mrMoZ1 mrMoZ1 commented Jun 26, 2023

what: added alertmanager.yaml to helm chart templates, added configurable properties in values.yaml that correspond to the alertmanager.yaml template.

why: users of control-service can configure Prometheus alert manager through a helm chart instead of manually in the k8s cluster. More information on configuration properties: https://docs.openshift.com/container-platform/4.10/rest_api/monitoring_apis/alertmanagerconfig-monitoring-coreos-com-v1alpha1.html#specification

testing: helm chart validations.
cd into the 'versatile-data-kit/projects/control-service/projects/helm_charts' folder and run the following commands (make sure prometheus-operator is installed on minikube cluster and you have updated the charts, and enabled alertmanager from values.yaml before doing so):

minikube start

helm package pipelines-control-service
helm install tpcs ./pipelines-control-service-0.0.1-SNAPSHOT.tgz
kubectl get alertmanagerconfigs.monitoring.coreos.com -oyaml

And we receive the following output:

apiVersion: v1
items:
- apiVersion: monitoring.coreos.com/v1alpha1
  kind: AlertmanagerConfig
  metadata:
    annotations:
      meta.helm.sh/release-name: tpcs
      meta.helm.sh/release-namespace: default
    creationTimestamp: "2023-07-13T09:06:50Z"
    generation: 1
    labels:
      app.kubernetes.io/component: tpcs-pipelines-control-service-dep
      app.kubernetes.io/instance: tpcs
      app.kubernetes.io/managed-by: Helm
      app.kubernetes.io/name: tpcs-pipelines-control-service
      app.kubernetes.io/version: 0.0.1-SNAPSHOT
      helm.sh/chart: pipelines-control-service-0.0.1-SNAPSHOT
      role: infra
    name: dp-notifications
    namespace: default
    resourceVersion: "62522"
    uid: 902b6864-8912-4970-89b4-6f14644aefaa
  spec:
    receivers:
    - emailConfigs:
      - authPassword:
          key: authPassword
          name: alertmanager-authentication-secret
          optional: true
        authUsername: ""
        from: ""
        headers:
        - key: subject
          value: ""
        hello: localhost
        html: ""
        requireTLS: false
        sendResolved: false
        smarthost: smtp.vmware.com:25
        to: ""
      name: dp-receiver
    route:
      groupBy:
      - alertname
      - execution_id
      groupInterval: 1m
      groupWait: 0s
      matchers:
      - name: source
        value: data-pipelines
      receiver: dp-receiver
      repeatInterval: 30d
kind: List
metadata:
  resourceVersion: ""

@mrMoZ1 mrMoZ1 force-pushed the person/mzhivkov/alertmanager-config branch from 3b17518 to f3bc85f Compare July 5, 2023 14:09
mrMoZ1 added 2 commits July 6, 2023 17:07
@antoniivanov
Copy link
Collaborator

testing: helm chart validations.

Please don't forget for manual testing to print the exact commands executed and their output (the one that is relevant for the verification)

I should be able to reproduce the test just from those instructions.

@mrMoZ1 mrMoZ1 merged commit 8ab3da3 into main Jul 13, 2023
@mrMoZ1 mrMoZ1 deleted the person/mzhivkov/alertmanager-config branch July 13, 2023 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants