# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  name: knative-serving-operator.v0.11.0
  namespace: placeholder
  annotations:
    alm-examples: >-
      [{"apiVersion":"operator.knative.dev/v1alpha1","kind":"KnativeServing","metadata":{"name":"knative-serving"},"spec":{"config":{"defaults":{"revision-timeout-seconds":"300","revision-cpu-request":"400m","revision-memory-request":"100M","revision-cpu-limit":"1000m","revision-memory-limit":"200M"},"autoscaler":{"container-concurrency-target-percentage":"1.0","container-concurrency-target-default":"100","stable-window":"60s","panic-window-percentage":"10.0","panic-window":"6s","panic-threshold-percentage":"200.0","max-scale-up-rate":"10","enable-scale-to-zero":"true","tick-interval":"2s","scale-to-zero-grace-period":"30s"},"deployment":{"registriesSkippingTagResolving":"ko.local,dev.local"},"gc":{"stale-revision-create-delay":"24h","stale-revision-timeout":"15h","stale-revision-minimum-generations":"1","stale-revision-lastpinned-debounce":"5h"},"logging":{"loglevel.controller":"info","loglevel.autoscaler":"info","loglevel.queueproxy":"info","loglevel.webhook":"info","loglevel.activator":"info"},"observability":{"logging.enable-var-log-collection":"false","metrics.backend-destination":"prometheus"},"tracing":{"backend":"none","sample-rate":"0.1"}}}}]
    categories: 'Networking,Integration & Delivery,Cloud Provider,Developer Tools'
    certified: 'false'
    createdAt: '2020-01-14T00:00:00Z'
    description: |-
      Knative Serving builds on Kubernetes to support deploying and
      serving of serverless applications and functions.
    containerImage: 'gcr.io/knative-releases/knative.dev/serving-operator/cmd/manager:v0.11.1'
    support: The Knative Authors
    capabilities: Basic Install
    repository: 'https://github.com/knative/serving-operator'
spec:
  displayName: Knative Serving Operator
  description: >+
    ## Knative Serving


    Knative Serving builds on Kubernetes to support deploying and

    serving of serverless applications and functions. The Knative

    Serving project provides middleware primitives that enable:


    - Rapid deployment of serverless containers

    - Automatic scaling up and down to zero

    - Routing and network programming for Istio components

    - Point-in-time snapshots of deployed code and configurations

    ## Further Information


    For documentation on using Knative Serving, see the [Knative documentation
    site](https://www.knative.dev/docs/serving/).



  maturity: alpha
  version: 0.11.0
  replaces: ''
  minKubeVersion: 1.14.0
  keywords:
    - serverless
    - scale to zero
  maintainers:
    - name: The Knative Authors
      email: knative-dev@googlegroups.com
  provider:
    name: The Knative Authors
  labels: {}
  selector:
    matchLabels: {}
  links:
    - name: Documentation
      url: 'https://www.knative.dev/docs/serving/'
    - name: Source Repository
      url: 'https://github.com/knative/serving'
  icon:
    - base64data: >-
        [encoded data, 10260 characters]
      mediatype: image/png
  customresourcedefinitions:
    owned:
      - description: Represents an installation of a particular version of Knative Serving
        displayName: Knative Serving
        kind: KnativeServing
        name: knativeservings.operator.knative.dev
        statusDescriptors:
          - description: The version of Knative Serving installed
            displayName: Version
            path: version
            x-descriptors:
              - 'urn:alm:descriptor:text'
        version: v1alpha1
        specDescriptors: []
        resources:
          - version: v1
            kind: Deployment
          - version: v1
            kind: Service
          - version: v1
            kind: ReplicaSet
          - version: v1
            kind: Pod
          - version: v1
            kind: Secret
          - version: v1
            kind: ConfigMap
    required: []
  install:
    strategy: deployment
    spec:
      permissions:
        - serviceAccountName: knative-serving-operator
          rules:
            - apiGroups:
                - ''
              resources:
                - pods
                - services
                - endpoints
                - persistentvolumeclaims
                - events
                - configmaps
                - secrets
              verbs:
                - '*'
            - apiGroups:
                - ''
              resources:
                - namespaces
              verbs:
                - get
            - apiGroups:
                - apps
              resources:
                - deployments
                - daemonsets
                - replicasets
                - statefulsets
              verbs:
                - '*'
            - apiGroups:
                - monitoring.coreos.com
              resources:
                - servicemonitors
              verbs:
                - get
                - create
            - apiGroups:
                - apps
              resourceNames:
                - knative-serving-operator
              resources:
                - deployments/finalizers
              verbs:
                - update
            - apiGroups:
                - operator.knative.dev
              resources:
                - '*'
              verbs:
                - '*'
      clusterPermissions:
        - serviceAccountName: knative-serving-operator
          rules:
            - apiGroups:
                - '*'
              resources:
                - '*'
              verbs:
                - '*'
      deployments:
        - name: knative-serving-operator
          spec:
            replicas: 1
            selector:
              matchLabels:
                name: knative-serving-operator
            template:
              metadata:
                annotations:
                  sidecar.istio.io/inject: 'false'
                labels:
                  name: knative-serving-operator
              spec:
                serviceAccountName: knative-serving-operator
                containers:
                  - name: knative-serving-operator
                    image: >-
                      gcr.io/knative-releases/knative.dev/serving-operator/cmd/manager:v0.11.1
                    imagePullPolicy: IfNotPresent
                    env:
                      - name: POD_NAME
                        valueFrom:
                          fieldRef:
                            fieldPath: metadata.name
                      - name: OPERATOR_NAME
                        value: knative-serving-operator
                      - name: SYSTEM_NAMESPACE
                        valueFrom:
                          fieldRef:
                            fieldPath: metadata.namespace
                      - name: METRICS_DOMAIN
                        value: knative.dev/serving-operator
                      - name: CONFIG_LOGGING_NAME
                        value: config-logging
                      - name: CONFIG_OBSERVABILITY_NAME
                        value: config-observability
                    ports:
                      - name: metrics
                        containerPort: 9090
  installModes:
    - type: OwnNamespace
      supported: false
    - type: SingleNamespace
      supported: false
    - type: MultiNamespace
      supported: false
    - type: AllNamespaces
      supported: true
  apiservicedefinitions: {}
