Skip to content

Commit

Permalink
Add more documentation
Browse files Browse the repository at this point in the history
Signed-off-by: ishitasequeira <ishiseq29@gmail.com>
  • Loading branch information
ishitasequeira committed Sep 20, 2023
1 parent c086998 commit c525a5f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 0 additions & 3 deletions controller/sharding/sharding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,6 @@ func Test_getOrUpdateShardNumberForController(t *testing.T) {
heartbeatCurrentTime = func() metav1.Time { return expectedTime }
shard, shardMappingData := getOrUpdateShardNumberForController(tc.shardApplicationControllerMapping, tc.hostname, tc.replicas, tc.shard)
assert.Equal(t, tc.expectedShard, shard)
// for i, shardMapping := range shardMappingData {
// assert.True(t, tc.expectedShardMappingData[i].Equals(&shardMapping))
// }
assert.Equal(t, tc.expectedShardMappingData, shardMappingData)
})
}
Expand Down
16 changes: 16 additions & 0 deletions docs/operator-manual/high_availability.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,22 @@ spec:
- name: argocd-application-controller
```
* The application controller will use the configMap `argocd-app-controller-shard-cm` to store the controller to shard mapping and the heartbeat. The ConfigMap would look like:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: my-configmap
data:
shardControllerMapping:
- ControllerName: "example-controller"
ShardNumber: 0
Heartbeat: Wed Sep 20 08:05:26
```

The heartbeat of the controller will be updated during every cheack of readiness probe (that is every 10 seconds).

* The shard distribution algorithm of the `argocd-application-controller` can be set by using the `--sharding-method` parameter. Supported sharding methods are : [legacy (default), round-robin]. `legacy` mode uses an `uid` based distribution (non-uniform). `round-robin` uses an equal distribution across all shards. The `--sharding-method` parameter can also be overriden by setting the key `controller.sharding.algorithm` in the `argocd-cmd-params-cm` `configMap` (preferably) or by setting the `ARGOCD_CONTROLLER_SHARDING_ALGORITHM` environment variable and by specifiying the same possible values.

!!! warning "Alpha Feature"
Expand Down

0 comments on commit c525a5f

Please sign in to comment.