apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  name: aqua-operator.v1.0.1
  namespace: placeholder
spec:
  displayName: Aqua Security Operator
  version: 1.0.1
  replaces: aqua-operator.v1.0.0
  installModes:
  - supported: true
    type: OwnNamespace
  - supported: true
    type: SingleNamespace
  - supported: false
    type: MultiNamespace
  - supported: false
    type: AllNamespaces
  install:
    strategy: deployment
    spec:
      deployments:
      - name: aqua-operator
        spec:
          replicas: 1
          selector:
            matchLabels:
              name: aqua-operator 
          template:
            metadata:
              labels:
                name: aqua-operator
            spec:
              serviceAccountName: aqua-operator
              containers:
              - name: aqua-operator
                image: aquasec/aqua-operator:1.0.1
                imagePullPolicy: Always
                command:
                - aqua-operator
                env:
                - name: WATCH_NAMESPACE
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.annotations['olm.targetNamespaces']
                - name: POD_NAME
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.name
                - name: OPERATOR_NAME
                  value: "aqua-operator"
                ports:
                - containerPort: 60000
                  name: metrics
