# This file defines the ClusterServiceVersion (CSV) to tell the catalog how to display, create and
# manage the application as a whole. If changes are made to the CRD for this application kind,
# make sure to replace those references below as well.
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  annotations:
    alm-examples: '[{"apiVersion":"cache.example.com/v1alpha1","kind":"Memcached","metadata":{"name":"example-memcached"},"spec":{"size":3}}]'
    capabilities: Basic Install
  name: memcachedoperator.v0.0.2
  namespace: placeholder
spec:
  installModes:
  - type: OwnNamespace
    supported: true
  - type: SingleNamespace
    supported: true
  - type: MultiNamespace
    supported: false
  - type: AllNamespaces
    supported: true
  install:
    strategy: deployment
    spec:
      permissions:
      - serviceAccountName: memcached-operator
        rules:
        - apiGroups:
          - ""
          resources:
          - pods
          - services
          - endpoints
          - persistentvolumeclaims
          - events
          - configmaps
          - secrets
          - namespaces
          verbs:
          - '*'
        - apiGroups:
          - apps
          resources:
          - deployments
          - daemonsets
          - replicasets
          - statefulsets
          verbs:
          - '*'
        - apiGroups:
          - cache.example.com
          resources:
          - '*'
          verbs:
          - '*'
        - apiGroups:
          - apps
          resources:
          - deployments/finalizers
          resourceNames:
          - memcached-operator
          verbs:
          - "update"
      deployments:
      - name: memcached-operator
        spec:
          replicas: 1
          selector:
            matchLabels:
              name: memcached-operator
          template:
            metadata:
              labels:
                name: memcached-operator
            spec:
              serviceAccountName: memcached-operator
              containers:
              - name: memcached-operator
                image: quay.io/coreos/operator-sdk-dev:test-framework-operator
                command:
                - memcached-operator
                imagePullPolicy: Always
                env:
                - name: WATCH_NAMESPACE
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.namespace
                - name: POD_NAME
                  valueFrom:
                    fieldRef:
                      fieldPath: metadata.name
                - name: OPERATOR_NAME
                  value: "memcached-operator"
  customresourcedefinitions:
    owned:
    - description: Represents a cluster of Memcached apps
      displayName: Memcached App
      kind: Memcached
      name: memcacheds.cache.example.com
      version: v1alpha1
      resources:
      - kind: Deployment
        version: v1
      - kind: ReplicaSet
        version: v1beta2
      - kind: Pod
        version: v1
      specDescriptors:
      - description: The desired number of member Pods for the deployment.
        displayName: Size
        path: size
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:podCount'
      statusDescriptors:
      - description: The current status of the application.
        displayName: Status
        path: phase
        x-descriptors:
        - 'urn:alm:descriptor:io.kubernetes.phase'
      - description: Explanation for the current status of the application.
        displayName: Status Details
        path: reason
        x-descriptors:
        - 'urn:alm:descriptor:io.kubernetes.phase:reason'
  keywords:
  - memcached
  - app
  displayName: Memcached Application
  provider:
    name: Example
    url: www.example.com
  maturity: alpha
  version: 0.0.2
  replaces: memcachedoperator.v0.0.1
  maintainers:
  - email: corp@example.com
    name: Some Corp
  description: Main enterprise application providing business critical features with high availability and no manual intervention.
