Uploaded image for project: 'Percona Operator for MongoDB'
  1. Percona Operator for MongoDB
  2. K8SPSMDB-824

Ability to ignore specific annotations for k8s Service objects

Details

    • New Feature
    • Status: Done
    • Medium
    • Resolution: Done
    • None
    • 1.14.0
    • None

    Description

      Sometimes various Kubernetes flavors add annotations to the objects managed by Operator. Operator owning the object and tracking the changes removes this annotation. It might cause a loop or unexpected behavior for the user. 

       

      What we are going to do in this New Feature:

      1. If there are no annotations or labels in the CR, Operator does nothing if new label or annotation added to the object.
      2. If there is an annotation or label specified in the CR, Operator starts to manage annotations and labels. It removes unknown annotations and labels. (Current behavior)
      3. We will add a fields to ignore annotations and labels.

      New fields:

      spec:
        ignoreAnnotations: []
        ignoreLabels: []

      Example:

      spec:
        ignoreAnnotations:
          - some.custom.cloud.annotation/smth
        ignoreLabels:
          - some.custom.cloud.label/smth

       

      In this case Operator is going to ignore any annotation and label which keys start with the mentioned above examples. The following annotations and labels will be ignored:

      annotations:
        some.custom.cloud.annotation/smth: somethinghere
      labels:
        some.custom.cloud.label/smth: somethinghere

       

      It is important to note, that we are going to ignore annotations and labels for all objects: Pods, Services, etc.

      Attachments

        Issue Links

          Activity

            People

              dmitriy.kostiuk Dmitriy Kostiuk
              sergey.pronin Sergey Pronin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist