github.com/argoproj/argo-cd/v2@v2.10.9/docs/operator-manual/upgrading/2.3-2.4.md (about)

     1  # v2.3 to 2.4
     2  
     3  ## Known Issues
     4  
     5  ### Broken `project` filter before 2.4.27
     6  
     7  Argo CD 2.4.0 introduced a breaking API change, renaming the `project` filter to `projects`.
     8  
     9  #### Impact to API clients
    10  
    11  A similar issue applies to other API clients which communicate with the Argo CD API server via its REST API. If the
    12  client uses the `project` field to filter projects, the filter will not be applied. **The failing project filter could 
    13  have detrimental consequences if, for example, you rely on it to list Applications to be deleted.**
    14  
    15  #### Impact to CLI clients
    16  
    17  CLI clients older that v2.4.0 rely on client-side filtering and are not impacted by this bug.
    18  
    19  #### How to fix the problem
    20  
    21  Upgrade to Argo CD >=2.4.27, >=2.5.15, or >=2.6.6. This version of Argo CD will accept both `project` and `projects` as
    22  valid filters.
    23  
    24  ## KSonnet support is removed
    25  
    26  Ksonnet was deprecated in [2019](https://github.com/ksonnet/ksonnet/pull/914/files) and is no longer maintained.
    27  The time has come to remove it from the Argo CD.
    28  
    29  ## Helm 2 support is removed
    30  
    31  Helm 2 has not been officially supported since [Nov 2020](https://helm.sh/blog/helm-2-becomes-unsupported/). In order to ensure a smooth transition,
    32  Helm 2 support was preserved in the Argo CD. We feel that Helm 3 is stable, and it is time to drop Helm 2 support.
    33  
    34  ## Support for private repo SSH keys using the SHA-1 signature hash algorithm is removed
    35  
    36  Note: this change was back-ported to 2.3.7 and 2.2.12.
    37  
    38  Argo CD 2.4 upgraded its base image from Ubuntu 20.04 to Ubuntu 22.04, which upgraded OpenSSH to 8.9. OpenSSH starting
    39  with 8.8 [dropped support for the `ssh-rsa` SHA-1 key signature algorithm](https://www.openssh.com/txt/release-8.8).
    40  
    41  The signature algorithm is _not_ the same as the algorithm used when generating the key. There is no need to update 
    42  keys.
    43  
    44  The signature algorithm is negotiated with the SSH server when the connection is being set up. The client offers its 
    45  list of accepted signature algorithms, and if the server has a match, the connection proceeds. For most SSH servers on
    46  up-to-date git providers, acceptable algorithms other than `ssh-rsa` should be available.
    47  
    48  Before upgrading to Argo CD 2.4, check whether your git provider(s) using SSH authentication support algorithms newer
    49  than `rsa-ssh`.
    50  
    51  1. Make sure your version of SSH >= 8.9 (the version used by Argo CD). If not, upgrade it before proceeding.
    52  
    53     ```shell
    54     ssh -V
    55     ```
    56     
    57     Example output: `OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 15 Mar 2022`
    58  
    59  2. Once you have a recent version of OpenSSH, follow the directions from the [OpenSSH 8.8 release notes](https://www.openssh.com/txt/release-8.7):
    60  
    61     > To check whether a server is using the weak ssh-rsa public key
    62     > algorithm, for host authentication, try to connect to it after
    63     > removing the ssh-rsa algorithm from ssh(1)'s allowed list:
    64     >
    65     > ```shell
    66     > ssh -oHostKeyAlgorithms=-ssh-rsa user@host
    67     > ```
    68     >
    69     > If the host key verification fails and no other supported host key
    70     > types are available, the server software on that host should be
    71     > upgraded.
    72  
    73     If the server does not support an acceptable version, you will get an error similar to this;
    74  
    75     ```
    76     $ ssh -oHostKeyAlgorithms=-ssh-rsa vs-ssh.visualstudio.com
    77     Unable to negotiate with 20.42.134.1 port 22: no matching host key type found. Their offer: ssh-rsa
    78     ```
    79  
    80     This indicates that the server needs to update its supported key signature algorithms, and Argo CD will not connect
    81     to it.
    82  
    83  ### Workaround
    84  
    85  The [OpenSSH 8.8 release notes](https://www.openssh.com/txt/release-8.8) describe a workaround if you cannot change the 
    86  server's key signature algorithms configuration.
    87  
    88  > Incompatibility is more likely when connecting to older SSH
    89  > implementations that have not been upgraded or have not closely tracked
    90  > improvements in the SSH protocol. For these cases, it may be necessary
    91  > to selectively re-enable RSA/SHA1 to allow connection and/or user
    92  > authentication via the HostkeyAlgorithms and PubkeyAcceptedAlgorithms
    93  > options. For example, the following stanza in ~/.ssh/config will enable
    94  > RSA/SHA1 for host and user authentication for a single destination host:
    95  > 
    96  > ```
    97  > Host old-host
    98  >     HostkeyAlgorithms +ssh-rsa
    99  >     PubkeyAcceptedAlgorithms +ssh-rsa
   100  > ```
   101  > 
   102  > We recommend enabling RSA/SHA1 only as a stopgap measure until legacy
   103  > implementations can be upgraded or reconfigured with another key type
   104  > (such as ECDSA or Ed25519).
   105  
   106  To apply this to Argo CD, you could create a ConfigMap with the desired ssh config file and then mount it at 
   107  `/home/argocd/.ssh/config`.
   108  
   109  ## Configure RBAC to account for new `exec` resource
   110  
   111  2.4 introduces a new `exec` [RBAC resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/#rbac-resources-and-actions).
   112  
   113  When you upgrade to 2.4, RBAC policies with `*` in the resource field and `create` or `*` in the action field will automatically grant the `exec` privilege.
   114  
   115  To avoid granting the new privilege, replace the existing policy with a list of new policies explicitly listing the old resources.
   116  
   117  The exec feature is [disabled by default](https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/#exec-resource), 
   118  but it is still a good idea to double-check your RBAC configuration to enforce least necessary privileges.
   119  
   120  ### Example
   121  
   122  Old:
   123  
   124  ```csv
   125  p, role:org-admin, *, create, my-proj/*, allow
   126  ```
   127  
   128  New:
   129  
   130  ```csv
   131  p, role:org-admin, clusters, create, my-proj/*, allow
   132  p, role:org-admin, projects, create, my-proj/*, allow
   133  p, role:org-admin, applications, create, my-proj/*, allow
   134  p, role:org-admin, repositories, create, my-proj/*, allow
   135  p, role:org-admin, certificates, create, my-proj/*, allow
   136  p, role:org-admin, accounts, create, my-proj/*, allow
   137  p, role:org-admin, gpgkeys, create, my-proj/*, allow
   138  ```
   139  
   140  ## Enable logs RBAC enforcement
   141  
   142  2.4 introduced `logs` as a new RBAC resource. In 2.3, users with `applications, get` access automatically get logs
   143  access. <del>In 2.5, you will have to explicitly grant `logs, get` access. Logs RBAC enforcement can be enabled with a flag
   144  in 2.4. We recommend enabling the flag now for an easier upgrade experience in 2.5.</del> 
   145  
   146  !!! important 
   147      Logs RBAC enforcement **will not** be enabled by default in 2.5. This decision 
   148      [was made](https://github.com/argoproj/argo-cd/issues/10551#issuecomment-1242303457) to avoid breaking logs access 
   149      under [Project Roles](../../user-guide/projects.md#project-roles), which do not provide a mechanism to grant `logs`
   150      resource access.
   151  
   152  To enabled logs RBAC enforcement, add this to your argocd-cm ConfigMap:
   153  
   154  ```yaml
   155  server.rbac.log.enforce.enable: "true"
   156  ```
   157  
   158  If you want to allow the same users to continue to have logs access, just find every line that grants 
   159  `applications, get` access and also grant `logs, get`. 
   160  
   161  ### Example
   162  
   163  Old:
   164  
   165  ```csv
   166  p, role:staging-db-admins, applications, get, staging-db-admins/*, allow
   167  
   168  p, role:test-db-admins, applications, *, staging-db-admins/*, allow
   169  ```
   170  
   171  New:
   172  
   173  ```csv
   174  p, role:staging-db-admins, applications, get, staging-db-admins/*, allow
   175  p, role:staging-db-admins, logs, get, staging-db-admins/*, allow
   176  
   177  p, role:test-db-admins, applications, *, staging-db-admins/*, allow
   178  p, role:test-db-admins, logs, get, staging-db-admins/*, allow
   179  ```
   180  
   181  ### Pod Logs UI
   182  
   183  Since 2.4.9, the LOGS tab in pod view is visible in the UI only for users with explicit allow get logs policy.
   184  
   185  ### Known pod logs UI issue prior to 2.4.9
   186  
   187  Upon pressing the "LOGS" tab in pod view by users who don't have an explicit allow get logs policy, the red "unable to load data: Internal error" is received in the bottom of the screen, and "Failed to load data, please try again" is displayed.
   188  
   189  ## Test repo-server with its new dedicated Service Account
   190  
   191  As a security enhancement, the argocd-repo-server Deployment uses its own Service Account instead of `default`.
   192  
   193  If you have a custom environment that might depend on repo-server using the `default` Service Account (such as a plugin
   194  that uses the Service Account for auth), be sure to test before deploying the 2.4 upgrade to production.
   195  
   196  ## Plugins
   197  
   198  ### Remove the shared volume from any sidecar plugins
   199  
   200  As a security enhancement, [sidecar plugins](../config-management-plugins.md#option-2-configure-plugin-via-sidecar)
   201  no longer share the /tmp directory with the repo-server.
   202  
   203  If you have one or more sidecar plugins enabled, replace the /tmp volume mount for each sidecar to use a volume specific 
   204  to each plugin.
   205  
   206  ```yaml
   207  apiVersion: apps/v1
   208  kind: Deployment
   209  metadata:
   210    name: argocd-repo-server
   211  spec:
   212    template:
   213      spec:
   214        containers:
   215        - name: your-plugin-name
   216          volumeMounts:
   217          - mountPath: /tmp
   218            name: your-plugin-name-tmp
   219        volumes:
   220          # Add this volume.
   221          - name: your-plugin-name-tmp
   222            emptyDir: {}
   223  ```
   224  
   225  ### Update plugins to use newly-prefixed environment variables
   226  
   227  If you use plugins that depend on user-supplied environment variables, then they must be updated to be compatible with
   228  Argo CD 2.4. Here is an example of user-supplied environment variables in the `plugin` section of an Application spec:
   229  
   230  ```yaml
   231  apiVersion: argoproj.io/v1alpha1
   232  kind: Application
   233  spec:
   234    source:
   235      plugin:
   236        env:
   237          - name: FOO
   238            value: bar
   239  ```
   240  
   241  Going forward, all user-supplied environment variables will be prefixed with `ARGOCD_ENV_` before being sent to the 
   242  plugin's `init`, `generate`, or `discover` commands. This prevents users from setting potentially-sensitive environment
   243  variables.
   244  
   245  If you have written a custom plugin which handles user-provided environment variables, update it to handle the new
   246  prefix.
   247  
   248  If you use a third-party plugin which does not explicitly advertise Argo CD 2.4 support, it might not handle the 
   249  prefixed environment variables. Open an issue with the plugin's authors and confirm support before upgrading to Argo CD 
   250  2.4.
   251  
   252  ### Confirm sidecar plugins have all necessary environment variables
   253  
   254  A bug in < 2.4 caused `init` and `generate` commands to receive environment variables from the main repo-server
   255  container, taking precedence over environment variables from the plugin's sidecar.
   256  
   257  Starting in 2.4, sidecar plugins will not receive environment variables from the main repo-server container. Make sure
   258  that any environment variables necessary for the sidecar plugin to function are set on the sidecar plugin.
   259  
   260  argocd-cm plugins will continue to receive environment variables from the main repo-server container.