Uploaded image for project: 'Multicloud'
  1. Multicloud
  2. MULTICLOUD-1123

monitor does not update CR for deleted resources

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Medium
    • Resolution: Not Done
    • Guilin Release
    • None
    • MULTICLOUD-K8S

    Description

      When monitor is running and monitoring a set of resources that match labels with an instance of the ResourceBundleState CR, after the resources are deleted, the resources remain in the CR instead of being removed.

       

      Example monitor log output when this occurs:

      2020/07/09 22:30:12 Updating ResourceBundleState for ConfigMap: default/sink-configmap
      2020/07/09 22:30:12 ConfigMap not found: default/sink-configmap. Remove from CR if it is stored there.
      2020/07/09 22:30:12 Did not find a status for ConfigMapStatuses in CR
      2020/07/09 22:30:12 Did not find a status for ConfigMapStatuses in CR

       

      The sink-configmap resource remains in the CR - the above log message "remove from cr if it is stored there" indicates monitor has not done the job itself.

       

      $ kubectl get resourcebundlestate sink-171887448792644816 -o yaml
      apiVersion: k8splugin.io/v1alpha1
      kind: ResourceBundleState
      metadata:
      annotations:
      kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"k8splugin.io/v1alpha1","kind":"ResourceBundleState","metadata":{"annotations":{},"creationTimestamp":null,"labels":{"emco/deployment-id":"171887448792644816-sink"},"name":"sink-171887448792644816","namespace":"default"},"spec":{"selector":

      {"matchLabel s":\{"emco/deployment-id":"171887448792644816-sink"}

      }},"status":{"configMapStatuses":null,"daemonSetStatuses":null,"deploymentStatuses":null,"ingressStatuses":null,"jobStatuses":null,"podStatuses":null,"ready":false,"resourceCount":0,"secretStatuses":null,"serviceStatuses"
      :null,"statefulSetStatuses":null}}
      creationTimestamp: "2020-07-09T22:10:43Z"
      generation: 1
      labels:
      emco/deployment-id: 171887448792644816-sink
      name: sink-171887448792644816
      namespace: default
      resourceVersion: "922902"
      selfLink: /apis/k8splugin.io/v1alpha1/namespaces/default/resourcebundlestates/sink-171887448792644816
      uid: 6ff601d2-f2cb-4066-9c72-ca627282bec4
      spec:
      selector:
      matchLabels:
      emco/deployment-id: 171887448792644816-sink
      status:
      configMapStatuses:

      • metadata:
        annotations:
        kubectl.kubernetes.io/last-applied-configuration: |
        {"apiVersion":"v1","data": {"protected_net_gw":"192.168.20.100","protected_private_net_cidr":"192.168.10.0/24"}

        ,"kind":"ConfigMap","metadata":{"annotations":{},"labels":{"emco/deployment-id":"171887448792644816-sink"},"name":"sink-configmap","namespace":"default"
        }}
        creationTimestamp: "2020-07-09T22:10:43Z"
        labels:
        emco/deployment-id: 171887448792644816-sink
        name: sink-configmap
        namespace: default
        resourceVersion: "921658"
        selfLink: /api/v1/namespaces/default/configmaps/sink-configmap
        uid: 89627b7c-5bec-493c-9705-6d06d9971518
        daemonSetStatuses: []
        deploymentStatuses: []
        ingressStatuses: []
        jobStatuses: []
        podStatuses: []
        ready: false
        resourceCount: 0
        secretStatuses: []
        serviceStatuses: []
        statefulSetStatuses: []

      Attachments

        # Subject Branch Project Status CR V

        Activity

          People

            Unassigned Unassigned
            ewmulta Eric Multanen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: