Bug 1961747 - Annotations in deployment templates are not propagated to actual deployments
Summary: Annotations in deployment templates are not propagated to actual deployments
Keywords:
Status: CLOSED DUPLICATE of bug 1950047
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Kevin Rizza
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-18 15:46 UTC by Vitaly Grinberg
Modified: 2021-05-19 16:42 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-19 16:42:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Vitaly Grinberg 2021-05-18 15:46:01 UTC
Description of problem:
Annotation found here:
[https://github.com/openshift-kni/performance-addon-operators/blob/570bee601d2e2f2dff8d3163d4216b4b7de4c7bc/deploy/olm-catalog/performance-addon-operator/4.8.0/performance-addon-operator.v4.8.0.clusterserviceversion.yaml#L214]
is being removed when the operator is deployed.

It can be seen that the CSV contains the annotation, but the deployment doesn't.
CSV:

    deployments:
      - name: performance-operator
        spec:
          replicas: 1
          selector:
            matchLabels:
              name: performance-operator
          strategy: {}
          template:
            metadata:
              annotations:
                target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
              creationTimestamp: null
              labels:
                name: performance-operator

Deployment:
oc -n openshift-performance-addon-operator get deployment/performance-operator -oyaml |grep management

returns an empty string


Version-Release number of selected component (if applicable):
4.8

How reproducible:
Reproduced on several SNO clusters

Steps to Reproduce:
1. Get a 4.8 cluster
2. Deploy the performance-addon-operator containing the annotation:

apiVersion: v1
kind: Namespace
metadata:
  labels:
    openshift.io/cluster-monitoring: "true"
  name: openshift-performance-addon-operator
spec: {}
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: performance-addon-operator
  namespace: openshift-performance-addon-operator
---
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: performance-addon-operator
  namespace: openshift-marketplace
spec:
  displayName: Openshift Performance Addon Operator
  icon:
    base64data: ""
    mediatype: ""
  image: quay.io/openshift-kni/performance-addon-operator-index:4.8-snapshot
  publisher: Red Hat
  sourceType: grpc
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: performance-addon-operator
  namespace: openshift-performance-addon-operator
spec:
  channel: "4.8"
  name: performance-addon-operator
  source: performance-addon-operator
  sourceNamespace: openshift-marketplace
---

3. Wait for it to install and compare the csv with the deployment

Actual results:
The deployment does not contain annotation target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'

Expected results:
The deployment contains the above annotation

Additional info:

Comment 1 Joe Lanford 2021-05-19 16:42:51 UTC

*** This bug has been marked as a duplicate of bug 1950047 ***


Note You need to log in before you can comment on or make changes to this bug.