github.com/operator-framework/operator-lifecycle-manager@v0.30.0/doc/install/install.md (about)

     1  # Installing OLM
     2  
     3  OLM deployment resources are templated so that they can be easily configured for different deployment environments.
     4  
     5  # Installation Options
     6  
     7  ## Manual installation 
     8  
     9  Installing the CRDs first gives them a chance to register before installing the rest, which requires the CRDs exist.
    10  ```bash
    11  kubectl create -f deploy/upstream/quickstart/crds.yaml
    12  kubectl create -f deploy/upstream/quickstart/olm.yaml
    13  ```
    14  
    15  ## Install a Release
    16  
    17  Check out the latest [releases on github](https://github.com/operator-framework/operator-lifecycle-manager/releases) for release-specific install instructions.
    18  
    19  ## OpenShift
    20  
    21  **IMPORTANT:** OLM is installed by default in OpenShift 4.0 and above.
    22  
    23  ## Install with `operator-sdk olm install`
    24  
    25  OLM can be installed with the operator-sdk command `operator-sdk olm install` more information is available in the [operator-sdk documentation.](https://sdk.operatorframework.io/docs/cli/operator-sdk_olm_install/)
    26  
    27  ## Customizing OLM installation 
    28  
    29  Deployments of OLM can be stamped out with different configurations by writing a `values.yaml` file and running commands to generate resources.
    30  
    31  Here's an example `values.yaml`
    32  
    33  ```yaml
    34  # sets the apiversion to use for rbac-resources. Change to `authorization.openshift.io` for openshift
    35  rbacApiVersion: rbac.authorization.k8s.io
    36  # namespace is the namespace the operators will _run_
    37  namespace: olm
    38  # watchedNamespaces is a comma-separated list of namespaces the operators will _watch_ for OLM resources.
    39  # Omit to enable OLM in all namespaces
    40  watchedNamespaces: olm
    41  # catalog_namespace is the namespace where the catalog operator will look for global catalogs.
    42  # entries in global catalogs can be resolved in any watched namespace
    43  catalog_namespace: olm
    44  # operator_namespace is the namespace where the operator runs
    45  operator_namespace: operators
    46  
    47  # OLM operator run configuration
    48  olm:
    49    # OLM operator doesn't do any leader election (yet), set to 1
    50    replicaCount: 1
    51    # The image to run. If not building a local image, use sha256 image references
    52    image:
    53      ref: quay.io/operator-framework/olm:local
    54      pullPolicy: IfNotPresent
    55    service:
    56      # port for readiness/liveness probes
    57      internalPort: 8080
    58  
    59  # catalog operator run configuration
    60  catalog:
    61    # Catalog operator doesn't do any leader election (yet), set to 1
    62    replicaCount: 1
    63    # The image to run. If not building a local image, use sha256 image references
    64    image:
    65      ref: quay.io/operator-framework/olm:local
    66      pullPolicy: IfNotPresent
    67    service:
    68      # port for readiness/liveness probes
    69      internalPort: 8080
    70  ```
    71  
    72  To configure a release of OLM for installation in a cluster:
    73  
    74  1. Create a `my-values.yaml` like the example above with the desired configuration or choose an existing one from this repository. The latest production values can be found in [deploy/upstream/values.yaml](../../deploy/upstream/values.yaml).
    75  1. Generate deployment files from the templates and the `my-values.yaml` using `package_release.sh`
    76  
    77     ```bash
    78     # first arg must be a semver-compatible version string
    79     # second arg is the output directory
    80     # third arg is the values.yaml file
    81     ./scripts/package_release.sh 1.0.0-myolm ./my-olm-deployment my-values.yaml
    82     ```
    83  
    84  1. Deploy to kubernetes: `kubectl apply -f ./my-olm-deployment/templates/`
    85  
    86  The above steps are automated for official releases with `make ver=0.3.0 release`, which will output new versions of manifests in `deploy/tectonic-alm-operator/manifests/$(ver)`.
    87  
    88  ## Overriding the Global Catalog Namespace
    89  
    90  It is possible to override the Global Catalog Namespace by setting the `GLOBAL_CATALOG_NAMESPACE` environment variable in the catalog operator deployment.
    91  
    92  ## Subscribe to a Package and Channel
    93  
    94  Cloud Services can be installed from the catalog by subscribing to a channel in the corresponding package.
    95  
    96  If using one of the `local` run options, this will subscribe to `etcd`, `vault`, and `prometheus` operators. Subscribing to a service that doesn't exist yet will install the operator and related CRDs in the namespace.
    97  
    98  ```yaml
    99  apiVersion: operators.coreos.com/v1alpha1
   100  kind: Subscription
   101  metadata:
   102    name: etcd
   103    namespace: olm
   104  spec:
   105    channel: singlenamespace-alpha
   106    name: etcd
   107    source: operatorhubio-catalog
   108    sourceNamespace: olm
   109  ---
   110  apiVersion: operators.coreos.com/v1alpha1
   111  kind: Subscription
   112  metadata:
   113    name: prometheus
   114    namespace: olm
   115  spec:
   116    channel: alpha
   117    name: prometheus
   118    source: operatorhubio-catalog
   119    sourceNamespace: olm
   120  ```
   121  
   122  # Uninstall
   123  
   124  OLM can be uninstalled with the `operator-sdk olm uninstall` command. More information is available in the [operator-sdk documentation](https://sdk.operatorframework.io/docs/cli/operator-sdk_olm_uninstall/)