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

Could not create ServiceMonitor object jaeger-jaeger-operator-metrics already exists #1067

Closed
Iulian7 opened this issue May 20, 2020 · 2 comments
Labels
needs-triage New issues, in need of classification

Comments

@Iulian7
Copy link

Iulian7 commented May 20, 2020

I installed jaeger-operator (1.17.1) using the helm chart jaegertracing/jaeger-operator. I see 2 strange things:

  1. jaeger-operator logs this error: "could not create ServiceMonitor object" error="servicemonitors.monitoring.coreos.com "jaeger-jaeger-operator-metrics" already exists"
  2. The Service jaeger-jaeger-operator-metrics does not select any pods (so it does not have any endpoints). This makes sense because the selector is name: jaeger-jaeger-operator, while this label does not exist on the jaeger-jaeger-operator deployment. Looks like a bug and the service selector should be app.kubernetes.io/name: jaeger-operator.

Service YAML:

apiVersion: v1
kind: Service
metadata:
  creationTimestamp: "2020-05-20T11:50:48Z"
  labels:
    name: jaeger-jaeger-operator
  name: jaeger-jaeger-operator-metrics
  namespace: monitoring
  ownerReferences:
  - apiVersion: apps/v1
    blockOwnerDeletion: true
    controller: true
    kind: Deployment
    name: jaeger-jaeger-operator
    uid: 88dd7ef6-9927-47d4-8c7e-daf3df201904
  resourceVersion: "409091"
  selfLink: /api/v1/namespaces/monitoring/services/jaeger-jaeger-operator-metrics
  uid: de8812ae-ef91-435a-9b58-abc166164a7f
spec:
  clusterIP: 10.27.254.219
  ports:
  - name: http-metrics
    port: 8383
    protocol: TCP
    targetPort: 8383
  - name: cr-metrics
    port: 8686
    protocol: TCP
    targetPort: 8686
  selector:
    name: jaeger-jaeger-operator
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

Deployment YAML:

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "2"
  creationTimestamp: "2020-05-20T11:50:48Z"
  generation: 2
  labels:
    app.kubernetes.io/managed-by: pulumi
    app.kubernetes.io/name: jaeger-operator
  name: jaeger-jaeger-operator
  namespace: monitoring
  resourceVersion: "408969"
  selfLink: /apis/apps/v1/namespaces/monitoring/deployments/jaeger-jaeger-operator
  uid: 88dd7ef6-9927-47d4-8c7e-daf3df201904
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/name: jaeger-operator
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app.kubernetes.io/name: jaeger-operator
      name: jaeger-jaeger-operator
    spec:
      containers:
      - args:
        - start
        env:
        - name: WATCH_NAMESPACE
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: OPERATOR_NAME
          value: jaeger-jaeger-operator
        image: jaegertracing/jaeger-operator:1.17.1
        imagePullPolicy: IfNotPresent
        name: jaeger-jaeger-operator
        ports:
        - containerPort: 8383
          name: metrics
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: jaeger-jaeger-operator
      serviceAccountName: jaeger-jaeger-operator
      terminationGracePeriodSeconds: 30
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2020-05-20T11:50:56Z"
    lastUpdateTime: "2020-05-20T11:50:56Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2020-05-20T11:50:48Z"
    lastUpdateTime: "2020-05-20T12:27:26Z"
    message: ReplicaSet "jaeger-jaeger-operator-6655656cd5" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 2
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1

Running on GKE Kubernetes version 1.16.8-gke.15.

@ghost ghost added the needs-triage New issues, in need of classification label May 20, 2020
@Iulian7
Copy link
Author

Iulian7 commented May 20, 2020

I deployed it without the helm chart and everything seems fine. I think it was just a problem with the helm chart.

@objectiser
Copy link
Contributor

@Iulian7 Ok thanks, I'll close this issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage New issues, in need of classification
Projects
None yet
Development

No branches or pull requests

2 participants