# Controller and Agent Changes for 4.1.7

To configure the controller and agent changes for ISD-Argo v4.1.7, follow the steps given below:

## Prerequisite:

* Install latest 4.1.7 images.
* Controller token.

{% hint style="info" %}
To create controller token follow the steps provided in this link: [Token-Generation-And-Rotation](https://github.com/OpsMx/enterprise-argo/blob/v4.1.7/Token-Generation-And-Rotation/README.md).
{% endhint %}

## Configuration changes

The configuration changes need to be made as given below:

#### 1. Create ingress&#x20;

Create an ingress using a yaml file as shown below:

```
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: tcb-ingress  
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod-argocd #update the value accordingly
    cert-manager.io/issue-temporary-certificate: 'true' 
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/backend-protocol: GRPC
    nginx.ingress.kubernetes.io/ssl-redirect: 'true'
  
spec:
  tls:
    - hosts:
        - xxxx.xxx.xxxxx.xxx #update the value accordingly
      secretName: controller-secret-tls-grpc #update the value accordingly
  rules:
    - host: xxxx.xxx.xxxxx.xxx  #update the value accordingly
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: agent-grpc  #update the value accordingly
                port:
                  number: 9001
  
```

#### 2. Edit agent-grpc service

Update the agent-grpc service type to ClusterIP as shown below:

```
spec:
  type: ClusterIP 
```

#### 3. Controller configmap changes:

Make the following changes in the configmap:

1. Replace the agentHostname, and remoteCommandHostname with the newly created ingress.&#x20;
2. Add data.configFile.**agentAdvertisePort: 443** to the configmap (omit this step if it is already available).&#x20;
3. Restart the controller pod once the configmap changes are done.&#x20;

Follow the steps given below to upgrade the existing agents.&#x20;

* Go to Setup > CD integrations.
* Edit the existing CD integrations.
* Save the existing CD integrations (This action will refresh the agent-manifest.yaml file)
* Download the agent-manifest file.&#x20;
* Add the Argo CD token in the downloaded file.&#x20;
* Run the following command to replace the old agent-manifest with new agent-manifest file.

{% code overflow="wrap" %}

```
kubectl replace --force -f <newly generated manifest file name> -n <namepace of argocd>
```

{% endcode %}

{% hint style="info" %}
Repeat the above steps for all the existing agents.&#x20;
{% endhint %}

\
\
\
\
\
\
\
\
\ <br>

<br>

\
\ <br>
