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

ArgoCD didn't detect diff between desired and live manifests about Affinity Settings #19136

Open
suxiaoxiaomm opened this issue Jul 22, 2024 · 0 comments
Labels

Comments

@suxiaoxiaomm
Copy link

Describe the bug

I use argocd to manage my observability stack. For one deployment : I applied some changes on the "Affinity" section.

From ArgoCD web ui, I can see the Live Manifest and Desired Manifest are different. And Desired Manifest includes the changes what I applied.

However, ArgoCD doesn't see the difference. There is nothing on the "DIFF" page. This deployment keeps at "Synced" status. So that my changes cannot be Synced.

Below is my Desired Manifests: I change the affinity part:

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    argocd.argoproj.io/tracking-id: >-
      monitoring_observability:apps/Deployment:monitoring/observability-tempo-querier
  labels:
    app.kubernetes.io/component: querier
    app.kubernetes.io/instance: observability
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: tempo
    app.kubernetes.io/part-of: memberlist
    app.kubernetes.io/version: 2.3.1
    argocd.argoproj.io/instance: monitoring_observability
    helm.sh/chart: tempo-distributed-1.8.5
  name: observability-tempo-querier
  namespace: monitoring
spec:
  minReadySeconds: 10
  replicas: 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/component: querier
      app.kubernetes.io/instance: observability
      app.kubernetes.io/name: tempo
  strategy:
    rollingUpdate:
      maxSurge: 0
      maxUnavailable: 1
  template:
    metadata:
      annotations:
        checksum/config: decac3aa1ba8d45bf89ec6abd9364cf5f0ca7b5e61e4ce4865733971bffadd00
        prometheus.io/port: '3100'
        prometheus.io/scrape: 'true'
      labels:
        app.kubernetes.io/component: querier
        app.kubernetes.io/instance: observability
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: tempo
        app.kubernetes.io/part-of: memberlist
        app.kubernetes.io/version: 2.3.1
        helm.sh/chart: tempo-distributed-1.8.5
    spec:
      **affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: pool
                    operator: In
                    values:
                      - utility
        podAntiAffinity: {}**
      containers:
        - args:
            - '-target=querier'
            - '-config.file=/conf/tempo.yaml'
            - '-mem-ballast-size-mbs=1024'
            - '-config.expand-env=true'
          envFrom:
            - configMapRef:
                name: default-azure-sa
            - secretRef:
                name: default-azure-sa-key
          image: 'docker.io/grafana/tempo:2.3.1'
          imagePullPolicy: IfNotPresent
          name: querier
          ports:
            - containerPort: 7946
              name: http-memberlist
              protocol: TCP
            - containerPort: 3100
              name: http-metrics
          readinessProbe:
            httpGet:
              path: /ready
              port: http-metrics
            initialDelaySeconds: 30
            timeoutSeconds: 1
          resources: {}
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            readOnlyRootFilesystem: false
            runAsGroup: 1000
            runAsNonRoot: true
            runAsUser: 1000
          volumeMounts:
            - mountPath: /conf
              name: config
            - mountPath: /runtime-config
              name: runtime-config
            - mountPath: /var/tempo
              name: tempo-querier-store
      enableServiceLinks: false
      securityContext:
        fsGroup: 1000
      serviceAccountName: observability-tempo
      terminationGracePeriodSeconds: 30
      topologySpreadConstraints:
        - labelSelector:
            matchLabels:
              app.kubernetes.io/component: querier
              app.kubernetes.io/instance: observability
              app.kubernetes.io/name: tempo
          maxSkew: 1
          topologyKey: topology.kubernetes.io/zone
          whenUnsatisfiable: ScheduleAnyway
      volumes:
        - configMap:
            items:
              - key: tempo.yaml
                path: tempo.yaml
              - key: tempo-query.yaml
                path: tempo-query.yaml
            name: observability-tempo-config
          name: config
        - configMap:
            items:
              - key: overrides.yaml
                path: overrides.yaml
            name: observability-tempo-runtime
          name: runtime-config
        - emptyDir: {}
          name: tempo-querier-store

Below is my Live Manifest:

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    argocd.argoproj.io/tracking-id: >-
      monitoring_observability:apps/Deployment:monitoring/observability-tempo-querier
    deployment.kubernetes.io/revision: '5'
    meta.helm.sh/release-name: observability
    meta.helm.sh/release-namespace: monitoring
  creationTimestamp: '2024-03-25T05:20:14Z'
  generation: 5
  labels:
    app.kubernetes.io/component: querier
    app.kubernetes.io/instance: observability
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: tempo
    app.kubernetes.io/part-of: memberlist
    app.kubernetes.io/version: 2.3.1
    argocd.argoproj.io/instance: monitoring_observability
    helm.sh/chart: tempo-distributed-1.8.5
  name: observability-tempo-querier
  namespace: monitoring
  resourceVersion: '315014683'
  uid: 45d42381-9923-4164-8364-9757e15f7e32
spec:
  minReadySeconds: 10
  progressDeadlineSeconds: 600
  replicas: 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/component: querier
      app.kubernetes.io/instance: observability
      app.kubernetes.io/name: tempo
  strategy:
    rollingUpdate:
      maxSurge: 0
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      annotations:
        checksum/config: decac3aa1ba8d45bf89ec6abd9364cf5f0ca7b5e61e4ce4865733971bffadd00
        prometheus.io/port: '3100'
        prometheus.io/scrape: 'true'
      creationTimestamp: null
      labels:
        app.kubernetes.io/component: querier
        app.kubernetes.io/instance: observability
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: tempo
        app.kubernetes.io/part-of: memberlist
        app.kubernetes.io/version: 2.3.1
        helm.sh/chart: tempo-distributed-1.8.5
    spec:
      **affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: pool
                    operator: In
                    values:
                      - utility
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/component: querier
                    app.kubernetes.io/instance: observability
                    app.kubernetes.io/name: tempo
                topologyKey: failure-domain.beta.kubernetes.io/zone
              weight: 100
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchLabels:
                  app.kubernetes.io/component: querier
                  app.kubernetes.io/instance: observability
                  app.kubernetes.io/name: tempo
              topologyKey: kubernetes.io/hostname**
      containers:
        - args:
            - '-target=querier'
            - '-config.file=/conf/tempo.yaml'
            - '-mem-ballast-size-mbs=1024'
            - '-config.expand-env=true'
          envFrom:
            - configMapRef:
                name: default-azure-sa
            - secretRef:
                name: default-azure-sa-key
          image: 'docker.io/grafana/tempo:2.3.1'
          imagePullPolicy: IfNotPresent
          name: querier
          ports:
            - containerPort: 7946
              name: http-memberlist
              protocol: TCP
            - containerPort: 3100
              name: http-metrics
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /ready
              port: http-metrics
              scheme: HTTP
            initialDelaySeconds: 30
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          resources: {}
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            readOnlyRootFilesystem: false
            runAsGroup: 1000
            runAsNonRoot: true
            runAsUser: 1000
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /conf
              name: config
            - mountPath: /runtime-config
              name: runtime-config
            - mountPath: /var/tempo
              name: tempo-querier-store
      dnsPolicy: ClusterFirst
      enableServiceLinks: false
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext:
        fsGroup: 1000
      serviceAccount: observability-tempo
      serviceAccountName: observability-tempo
      terminationGracePeriodSeconds: 30
      topologySpreadConstraints:
        - labelSelector:
            matchLabels:
              app.kubernetes.io/component: querier
              app.kubernetes.io/instance: observability
              app.kubernetes.io/name: tempo
          maxSkew: 1
          topologyKey: topology.kubernetes.io/zone
          whenUnsatisfiable: ScheduleAnyway
      volumes:
        - configMap:
            defaultMode: 420
            items:
              - key: tempo.yaml
                path: tempo.yaml
              - key: tempo-query.yaml
                path: tempo-query.yaml
            name: observability-tempo-config
          name: config
        - configMap:
            defaultMode: 420
            items:
              - key: overrides.yaml
                path: overrides.yaml
            name: observability-tempo-runtime
          name: runtime-config
        - emptyDir: {}
          name: tempo-querier-store
status:
  availableReplicas: 3
  conditions:
    - lastTransitionTime: '2024-03-25T05:20:14Z'
      lastUpdateTime: '2024-06-26T07:36:27Z'
      message: >-
        ReplicaSet "observability-tempo-querier-7f59847f8b" has successfully
        progressed.
      reason: NewReplicaSetAvailable
      status: 'True'
      type: Progressing
    - lastTransitionTime: '2024-07-22T00:18:03Z'
      lastUpdateTime: '2024-07-22T00:18:03Z'
      message: Deployment has minimum availability.
      reason: MinimumReplicasAvailable
      status: 'True'
      type: Available
  observedGeneration: 5
  readyReplicas: 3
  replicas: 3
  updatedReplicas: 3

Expected behavior

ArgoCD see the difference.

Version
ArgoCD version:
v2.11.2+25f7504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants