github.com/argoproj-labs/argocd-operator@v0.10.0/docs/install/manual.md (about)

     1  # Manual Installation using kustomize
     2  
     3  The following steps can be used to manually install the operator on any Kubernetes environment with minimal overhead.
     4  
     5  !!! info
     6      Several of the steps in this process require the `cluster-admin` ClusterRole or equivalent.
     7  
     8  ## Cluster
     9  
    10  This guide uses [minikube](https://minikube.sigs.k8s.io/) to deploy a Kubernetes cluster locally, follow the 
    11  instructions for your platform to install. 
    12  
    13  Run minikube with a dedicated profile. Adjust the system resources as needed for your platform. 
    14  
    15  ```bash
    16  minikube start -p argocd --cpus=4 --disk-size=40gb --memory=8gb
    17  ```
    18  
    19  ## Manual Install
    20  
    21  The following section outlines the steps necessary to deploy the ArgoCD Operator manually using standard Kubernetes 
    22  manifests. Note that these steps generates the manifests using kustomize.
    23  
    24  !!! info
    25      Make sure you download the source code from release section: https://github.com/argoproj-labs/argocd-operator/releases. Compiling from the source code cloned off main repo may not provide the most stable result.
    26  
    27  ### Namespace
    28  
    29  By default, the operator is installed into the `argocd-operator-system` namespace. To modify this, update the
    30  value of the `namespace` specified in the `config/default/kustomization.yaml` file. 
    31  
    32  ### Conversion Webhook Support
    33  
    34  ArgoCD `v1alpha1` CRD has been **deprecated** starting from **argocd-operator v0.8.0**. To facilitate automatic migration of existing v1alpha1 ArgoCD CRs to v1beta1, conversion webhook support has been introduced.
    35  
    36  By default, the conversion webhook is disabled for the manual(non-OLM) installation of the operator. Users can modify the configurations to enable conversion webhook support using the instructions provided below.
    37  
    38  !!! warning
    39      Enabling the webhook is optional. However, without conversion webhook support, users are responsible for migrating any existing ArgoCD v1alpha1 CRs to v1beta1.
    40  
    41  ##### Enable Webhook Support
    42  
    43  To enable the operator to utilize the `cert-manager` for automated webhook certificate management, ensure that it is installed in the cluster. Use [this](https://cert-manager.io/docs/installation/) guide to install `cert-manager` if not present on the cluster.
    44  
    45  Add cert-manager annotation to CRD in `config/crd/patches/cainjection_in_argocds.yaml` file.
    46  ```yaml
    47  metadata:
    48    name: argocds.argoproj.io
    49    annotations: 
    50      cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
    51  ```
    52  
    53  Enable `../certmanager` directory under the `resources` section in `config/default/kustomization.yaml` file.
    54  ```yaml
    55  resources:
    56  .....
    57  - ../webhook
    58  # [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
    59  - ../certmanager
    60  ```
    61  
    62  Enable all the `vars` under the `[CERTMANAGER]` section in `config/default/kustomization.yaml` file.
    63  ```yaml
    64  vars:
    65  # [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
    66  - name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
    67    objref:
    68      kind: Certificate
    69      group: cert-manager.io
    70      version: v1
    71      name: serving-cert # this name should match the one in certificate.yaml
    72    fieldref:
    73      fieldpath: metadata.namespace
    74  - name: CERTIFICATE_NAME
    75    objref:
    76      kind: Certificate
    77      group: cert-manager.io
    78      version: v1
    79      name: serving-cert # this name should match the one in certificate.yaml
    80  - name: SERVICE_NAMESPACE # namespace of the service
    81    objref:
    82      kind: Service
    83      version: v1
    84      name: webhook-service
    85    fieldref:
    86      fieldpath: metadata.namespace
    87  - name: SERVICE_NAME
    88    objref:
    89      kind: Service
    90      version: v1
    91      name: webhook-service
    92  ```
    93  
    94  Additionally, set the `ENABLE_CONVERSION_WEBHOOK` environment variable in `config/default/manager_webhook_patch.yaml` file to enable the conversion webhook.
    95  ```yaml
    96        - name: manager
    97          env:
    98          - name: ENABLE_CONVERSION_WEBHOOK
    99            value: "true"
   100  ```
   101  
   102  ### Deploy Operator
   103  
   104  Deploy the operator. This will create all the necessary resources, including the namespace. For running the make command you need to install go-lang package on your system.
   105  
   106  ```bash
   107  make deploy
   108  ```
   109  
   110  If you want to use your own custom operator container image, you can specify the image name using the `IMG` variable.
   111  
   112  ```bash
   113  make deploy IMG=quay.io/my-org/argocd-operator:latest
   114  ```
   115  
   116  The operator pod should start and enter a `Running` state after a few seconds.
   117  
   118  ```bash
   119  kubectl get pods -n argocd-operator-system
   120  ```
   121  
   122  ```bash
   123  NAME                                                  READY   STATUS    RESTARTS   AGE
   124  argocd-operator-controller-manager-6c449c6998-ts95w   2/2     Running   0          33s
   125  ```
   126  !!! info
   127      If you see `Error: container's runAsUser breaks non-root policy`, means container wants to have admin privilege. run `oc adm policy add-scc-to-user privileged -z default -n argocd-operator-system` to enable admin on the namespace and change the following line in deployment resource: `runAsNonRoot: false`. This is a quick fix to make it running, this is not a suggested approach for *production*.
   128      
   129  ## Usage 
   130  
   131  Once the operator is installed and running, new ArgoCD resources can be created. See the [usage][docs_usage] 
   132  documentation to learn how to create new `ArgoCD` resources.
   133  
   134  ## Cleanup 
   135  
   136  To remove the operator from the cluster, run the following comand. This will remove all resources that were created,
   137  including the namespace.
   138  ```bash
   139  make undeploy
   140  ```
   141  
   142  
   143  
   144  [docs_usage]:../usage/basics.md