Skip to content

Commit

Permalink
feat: move to two level cache, reconfigure cache interface to provide…
Browse files Browse the repository at this point in the history
… consistent behavior

Signed-off-by: nromriell <nateromriell@gmail.com>
  • Loading branch information
nromriell committed Nov 19, 2023
1 parent aafad63 commit e833653
Show file tree
Hide file tree
Showing 26 changed files with 1,033 additions and 722 deletions.
8 changes: 6 additions & 2 deletions cmd/argocd/commands/headless/headless.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,16 @@ func (c *forwardCacheClient) Set(item *cache.Item) error {
})
}

func (c *forwardCacheClient) Get(key string, obj interface{}) error {
func (c *forwardCacheClient) Get(item *cache.Item) error {
return c.doLazy(func(client cache.CacheClient) error {
return client.Get(key, obj)
return client.Get(item)
})
}

func (c *forwardCacheClient) GetClientType() cache.CacheType {
return c.client.GetClientType()
}

func (c *forwardCacheClient) Delete(key string) error {
return c.doLazy(func(client cache.CacheClient) error {
return client.Delete(key)
Expand Down
18 changes: 0 additions & 18 deletions manifests/base/repo-server/argocd-repo-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,6 @@ spec:
name: argocd-cmd-params-cm
key: reposerver.repo.cache.expiration
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_ENABLED
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.enabled
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_TIMEOUT
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.timeout
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_INTERVAL
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.interval
name: argocd-cmd-params-cm
optional: true
- name: REDIS_SERVER
valueFrom:
configMapKeyRef:
Expand Down
18 changes: 0 additions & 18 deletions manifests/core-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21232,24 +21232,6 @@ spec:
key: reposerver.repo.cache.expiration
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_ENABLED
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.enabled
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_TIMEOUT
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.timeout
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_INTERVAL
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.interval
name: argocd-cmd-params-cm
optional: true
- name: REDIS_SERVER
valueFrom:
configMapKeyRef:
Expand Down
18 changes: 0 additions & 18 deletions manifests/ha/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22719,24 +22719,6 @@ spec:
key: reposerver.repo.cache.expiration
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_ENABLED
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.enabled
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_TIMEOUT
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.timeout
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_INTERVAL
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.interval
name: argocd-cmd-params-cm
optional: true
- name: REDIS_SERVER
valueFrom:
configMapKeyRef:
Expand Down
18 changes: 0 additions & 18 deletions manifests/ha/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2106,24 +2106,6 @@ spec:
key: reposerver.repo.cache.expiration
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_ENABLED
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.enabled
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_TIMEOUT
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.timeout
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_INTERVAL
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.interval
name: argocd-cmd-params-cm
optional: true
- name: REDIS_SERVER
valueFrom:
configMapKeyRef:
Expand Down
18 changes: 0 additions & 18 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21765,24 +21765,6 @@ spec:
key: reposerver.repo.cache.expiration
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_ENABLED
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.enabled
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_TIMEOUT
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.timeout
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_INTERVAL
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.interval
name: argocd-cmd-params-cm
optional: true
- name: REDIS_SERVER
valueFrom:
configMapKeyRef:
Expand Down
18 changes: 0 additions & 18 deletions manifests/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1152,24 +1152,6 @@ spec:
key: reposerver.repo.cache.expiration
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_ENABLED
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.enabled
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_TIMEOUT
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.timeout
name: argocd-cmd-params-cm
optional: true
- name: ARGOCD_REVISION_CACHE_LOCK_WAIT_INTERVAL
valueFrom:
configMapKeyRef:
key: reposerver.repo.cache.lock.interval
name: argocd-cmd-params-cm
optional: true
- name: REDIS_SERVER
valueFrom:
configMapKeyRef:
Expand Down
Loading

0 comments on commit e833653

Please sign in to comment.