operator-lifecycle-manager: Unable to override resources and tolerations for an operator deployment

I am currently unable to override the resources and tolerations field for an operator deployment. According to the subscriptions.operators.coreos.com CRD, there is a field named subscription.spec.config to do so.

I have deployed a subscription CR using the following manifest:

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: tracing-operator-subscription
  namespace: fleet-system
spec:
  channel: preview
  name: tracing-operator
  source: tracing-operator-catalog
  sourceNamespace: fleet-system
  config:
    resources:
      limits:
        memory: 128Mi
      requests:
        cpu: 100m
        memory: 128Mi
    tolerations:
    - key: workload-isolation.infra.fleet
      operator: Equal
      value: default
      effect: NoSchedule

Here is the status:

status:
  catalogHealth:
  - catalogSourceRef:
      apiVersion: operators.coreos.com/v1alpha1
      kind: CatalogSource
      name: tracing-operator-catalog
      namespace: fleet-system
      resourceVersion: "14510590"
      uid: 1ade9b61-2822-4986-887c-17867048b4e5
    healthy: true
    lastUpdated: "2020-02-18T16:13:29Z"
  conditions:
  - lastTransitionTime: "2020-02-18T16:13:29Z"
    message: all available catalogsources are healthy
    reason: AllCatalogSourcesHealthy
    status: "False"
    type: CatalogSourcesUnhealthy
  currentCSV: tracing-operator.v0.3.0
  installPlanRef:
    apiVersion: operators.coreos.com/v1alpha1
    kind: InstallPlan
    name: install-9wdlk
    namespace: fleet-system
    resourceVersion: "14519056"
    uid: 532649d6-5c9f-4060-be9f-3e83d7b84775
  installedCSV: tracing-operator.v0.3.0
  installplan:
    apiVersion: operators.coreos.com/v1alpha1
    kind: InstallPlan
    name: install-9wdlk
    uuid: 532649d6-5c9f-4060-be9f-3e83d7b84775
  lastUpdated: "2020-02-18T16:13:32Z"
  state: AtLatestKnown

These overrides are missing in the automatic generated installplan CRD.

Here is the generated deployment manifest:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  creationTimestamp: "2020-02-18T16:13:33Z"
  generation: 2
  labels:
    olm.owner: tracing-operator.v0.3.0
    olm.owner.kind: ClusterServiceVersion
    olm.owner.namespace: fleet-system
  name: tracing-operator
  namespace: fleet-system
  ownerReferences:
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: ClusterServiceVersion
    name: tracing-operator.v0.3.0
    uid: 96163eb2-fb31-49ee-992e-8a28c11e6e59
  resourceVersion: "14519115"
  selfLink: /apis/extensions/v1beta1/namespaces/fleet-system/deployments/tracing-operator
  uid: b5ebe819-147a-4504-ac94-548936852fac
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: tracing-operator
      name: tracing-operator
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        alm-examples: '[]'
        capabilities: Basic Install
        olm.operatorGroup: fleet-operators
        olm.operatorNamespace: fleet-system
        olm.targetNamespaces: fleet-system
      creationTimestamp: null
      labels:
        app.kubernetes.io/instance: tracing-operator
        name: tracing-operator
    spec:
      containers:
      - env:
        - name: WATCH_NAMESPACE
           valueFrom:
             fieldRef:
               fieldPath: metadata.annotations['olm.targetNamespaces']
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: OPERATOR_NAME
          value: tracing-operator
        image: gcr.io/tg-rdv/fleet/tracing-operator:v0.3.0
        imagePullPolicy: IfNotPresent
        name: tracing-operator
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: tracing-operator
      serviceAccountName: tracing-operator
      terminationGracePeriodSeconds: 30
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2020-02-18T16:13:35Z"
    lastUpdateTime: "2020-02-18T16:13:35Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2020-02-18T16:13:33Z"
    lastUpdateTime: "2020-02-18T16:13:35Z"
    message: ReplicaSet "tracing-operator-6d5d584974" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 2
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1

Also the annotation named olm.targetNamespaces is not injected inside the deployment.

Am I missing something?

I am currently using:

  • operator-sdk: v0.15.0
  • operator lifecycle manager: quay.io/operator-framework/olm@sha256:0d15ffb5d10a176ef6e831d7865f98d51255ea5b0d16403618c94a004d049373
  • kubernetes: v1.15.5 (docker desktop)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 6
  • Comments: 17 (6 by maintainers)

Most upvoted comments