Question
Alfredo Neto · Oct 13, 2022

Prometheus - IKO - Annotations Service

Hello,

I am currently having the experience activating prometheus for iris db.

This environment that I speak uses IKO as a base.

I need to put 3 notes in the iris service area.

Are they:

annotations:
   prometheus.io/path: "/monitor/metrics"
   prometheus.io/port: "52772"
   prometheus.io/scrape: "true"

I'm not finding this possibility in the IKO documentation.

Has anyone had this experience and can help us with this challenge?

 Below is the current configuration we made, however, it did not create the annotations we need

apiVersion: intersystems.com/v1alpha1
kind: IrisCluster
metadata:
  name: iris-db-teste
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/path: "/api/monitor/metrics"
    prometheus.io/port: "52773"
spec:
  licenseKeySecret:
    name: licenca-iris
  configSource:
    name: iris-cpf
  topology:
    data:
      shards: 2
      mirrored: true
      image: CONTAINER_IMAGE
      podTemplate:
        spec:
          args:
            - --check-caps
            - "false"
      storageDB:
        resources:
          requests:
            storage: 10Gi
        storageClassName: iris-ssd-storageclass
  serviceTemplate:
    spec:
      type: ClusterIP

Thanks,

Alfredo Sabocinski Neto

Product version: IRIS 2022.1
0
0 122
Discussion (4)2
Log in or sign up to continue

IKO adds labels to everything it creates.  You can use these labels to create further annotations as you see fit.  For example the following adds the annotation myAnnotation: myAnnotatedValue to all of the pods in the irisCluster named sample:

kubectl annotate -l intersystems.com/name=sample pods  myAnnotation=myAnnotatedValue

Hello @Bob Kuszewski how are you?

Thanks again for your reply.

She was a creator.

I had a second question regarding the previous question.

Where in the IKO file (kubernets.yaml) do I insert a new annotation?

Hi!  Good to hear from you again.

IKO doesn't add any annotations (yet!).  But the ability to specify annotations is on our backlog

Hi @Alfredo Neto,

I think your annotations might work if you move them from the IrisCluster to the Pod:

spec:
  topology:
    data:
      podTemplate:
        metadata:
          annotations:
            prometheus.io/scrape: "true"
            prometheus.io/path: "/api/monitor/metrics"
            prometheus.io/port: "52773"

Please let me know if that works for you.

-Steve