Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/5176-srp-source-prov' into 517…
Browse files Browse the repository at this point in the history
…6-srp-source-prov
  • Loading branch information
antgamdia committed Aug 24, 2022
2 parents aa04f94 + 0e98611 commit ca225ad
Show file tree
Hide file tree
Showing 67 changed files with 1,299 additions and 788 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ parameters:
default: "v3.9.2"
OLM_VERSION:
type: "string"
default: "v0.21.2"
default: "v0.22.0"
CHARTMUSEUM_VERSION:
type: "string"
default: "3.9.0"
Expand Down
10 changes: 5 additions & 5 deletions chart/kubeapps/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
dependencies:
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 17.0.8
version: 17.1.0
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 11.6.25
version: 11.8.0
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.16.1
digest: sha256:45f4e7f5c12f66c6e5a1273c39a6b458f8ad36a4e1c38d890204a0cce3da30b2
generated: "2022-08-09T04:10:23.942943317Z"
version: 2.0.0
digest: sha256:0a5fd7979a75fe5d63edf3186afb670d2d4952538c32b096e1a03fa5b89f4f30
generated: "2022-08-22T14:25:53.230788064Z"
4 changes: 2 additions & 2 deletions chart/kubeapps/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
version: 2.x.x
description: Kubeapps is a web-based UI for launching and managing applications on Kubernetes. It allows users to deploy trusted applications and operators to control users access to the cluster.
home: https://kubeapps.dev
icon: https://bitnami.com/assets/stacks/kubeapps/img/kubeapps-stack-220x234.png
Expand All @@ -31,4 +31,4 @@ maintainers:
name: kubeapps
sources:
- https://github.com/vmware-tanzu/kubeapps
version: 10.2.1-dev0
version: 10.3.1-dev0
595 changes: 302 additions & 293 deletions chart/kubeapps/README.md

Large diffs are not rendered by default.

24 changes: 21 additions & 3 deletions chart/kubeapps/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,16 @@ frontend:
## @param frontend.image.registry NGINX image registry
## @param frontend.image.repository NGINX image repository
## @param frontend.image.tag NGINX image tag (immutable tags are recommended)
## @param frontend.image.digest NGINX image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param frontend.image.pullPolicy NGINX image pull policy
## @param frontend.image.pullSecrets NGINX image pull secrets
## @param frontend.image.debug Enable image debug mode
##
image:
registry: docker.io
repository: bitnami/nginx
tag: 1.23.1-debian-11-r7
tag: 1.23.1-debian-11-r10
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down Expand Up @@ -513,6 +515,7 @@ dashboard:
## @param dashboard.image.registry Dashboard image registry
## @param dashboard.image.repository Dashboard image repository
## @param dashboard.image.tag Dashboard image tag (immutable tags are recommended)
## @param dashboard.image.digest Dashboard image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param dashboard.image.pullPolicy Dashboard image pull policy
## @param dashboard.image.pullSecrets Dashboard image pull secrets
## @param dashboard.image.debug Enable image debug mode
Expand All @@ -521,6 +524,7 @@ dashboard:
registry: docker.io
repository: kubeapps/dashboard
tag: latest
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down Expand Up @@ -819,13 +823,15 @@ apprepository:
## @param apprepository.image.registry Kubeapps AppRepository Controller image registry
## @param apprepository.image.repository Kubeapps AppRepository Controller image repository
## @param apprepository.image.tag Kubeapps AppRepository Controller image tag (immutable tags are recommended)
## @param apprepository.image.digest Kubeapps AppRepository Controller image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param apprepository.image.pullPolicy Kubeapps AppRepository Controller image pull policy
## @param apprepository.image.pullSecrets Kubeapps AppRepository Controller image pull secrets
##
image:
registry: docker.io
repository: kubeapps/apprepository-controller
tag: latest
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand All @@ -844,13 +850,15 @@ apprepository:
## @param apprepository.syncImage.registry Kubeapps Asset Syncer image registry
## @param apprepository.syncImage.repository Kubeapps Asset Syncer image repository
## @param apprepository.syncImage.tag Kubeapps Asset Syncer image tag (immutable tags are recommended)
## @param apprepository.syncImage.digest Kubeapps Asset Syncer image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param apprepository.syncImage.pullPolicy Kubeapps Asset Syncer image pull policy
## @param apprepository.syncImage.pullSecrets Kubeapps Asset Syncer image pull secrets
##
syncImage:
registry: docker.io
repository: kubeapps/asset-syncer
tag: latest
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down Expand Up @@ -1126,13 +1134,15 @@ kubeops:
## @param kubeops.image.registry Kubeops image registry
## @param kubeops.image.repository Kubeops image repository
## @param kubeops.image.tag Kubeops image tag (immutable tags are recommended)
## @param kubeops.image.digest Kubeops image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param kubeops.image.pullPolicy Kubeops image pull policy
## @param kubeops.image.pullSecrets Kubeops image pull secrets
##
image:
registry: docker.io
repository: kubeapps/kubeops
tag: latest
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down Expand Up @@ -1422,13 +1432,15 @@ authProxy:
## @param authProxy.image.registry OAuth2 Proxy image registry
## @param authProxy.image.repository OAuth2 Proxy image repository
## @param authProxy.image.tag OAuth2 Proxy image tag (immutable tags are recommended)
## @param authProxy.image.digest OAuth2 Proxy image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param authProxy.image.pullPolicy OAuth2 Proxy image pull policy
## @param authProxy.image.pullSecrets OAuth2 Proxy image pull secrets
##
image:
registry: docker.io
repository: bitnami/oauth2-proxy
tag: 7.3.0-debian-11-r22
tag: 7.3.0-debian-11-r25
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down Expand Up @@ -1554,13 +1566,15 @@ pinnipedProxy:
## @param pinnipedProxy.image.registry Pinniped Proxy image registry
## @param pinnipedProxy.image.repository Pinniped Proxy image repository
## @param pinnipedProxy.image.tag Pinniped Proxy image tag (immutable tags are recommended)
## @param pinnipedProxy.image.digest Pinniped Proxy image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param pinnipedProxy.image.pullPolicy Pinniped Proxy image pull policy
## @param pinnipedProxy.image.pullSecrets Pinniped Proxy image pull secrets
##
image:
registry: docker.io
repository: kubeapps/pinniped-proxy
tag: latest
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down Expand Up @@ -1719,13 +1733,15 @@ rbac:
## @param testImage.registry NGINX image registry
## @param testImage.repository NGINX image repository
## @param testImage.tag NGINX image tag (immutable tags are recommended)
## @param testImage.digest NGINX image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param testImage.pullPolicy NGINX image pull policy
## @param testImage.pullSecrets NGINX image pull secrets
##
testImage:
registry: docker.io
repository: bitnami/nginx
tag: 1.23.1-debian-11-r7
tag: 1.23.1-debian-11-r10
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down Expand Up @@ -1832,13 +1848,15 @@ kubeappsapis:
## @param kubeappsapis.image.registry Kubeapps-APIs image registry
## @param kubeappsapis.image.repository Kubeapps-APIs image repository
## @param kubeappsapis.image.tag Kubeapps-APIs image tag (immutable tags are recommended)
## @param kubeappsapis.image.digest Kubeapps-APIs image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param kubeappsapis.image.pullPolicy Kubeapps-APIs image pull policy
## @param kubeappsapis.image.pullSecrets Kubeapps-APIs image pull secrets
##
image:
registry: docker.io
repository: kubeapps/kubeapps-apis
tag: latest
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type ChartCache struct {
// significant in that it flushes the whole redis cache and re-populates the state from k8s.
// When that happens we don't really want any concurrent access to the cache until the resync()
// operation is complete. In other words, we want to:
// - be able to have multiple concurrent readers (goroutines doing GetForOne())
// - be able to have multiple concurrent readers (goroutines doing Get())
// - only a single writer (goroutine doing a resync()) is allowed, and while its doing its job
// no readers are allowed
resyncCond *sync.Cond
Expand Down Expand Up @@ -424,11 +424,11 @@ func (c *ChartCache) syncHandler(workerName, key string) error {
}

// this is effectively a cache GET operation
func (c *ChartCache) FetchForOne(key string) ([]byte, error) {
func (c *ChartCache) Fetch(key string) ([]byte, error) {
c.resyncCond.L.(*sync.RWMutex).RLock()
defer c.resyncCond.L.(*sync.RWMutex).RUnlock()

log.Infof("+FetchForOne(%s)", key)
log.Infof("+Fetch(%s)", key)

// read back from cache: should be either:
// - what we previously wrote OR
Expand All @@ -440,7 +440,7 @@ func (c *ChartCache) FetchForOne(key string) ([]byte, error) {
log.Infof("Redis [GET %s]: Nil", key)
return nil, nil
} else if err != nil {
return nil, fmt.Errorf("fetchForOne() failed to get value for key [%s] from cache due to: %v", key, err)
return nil, fmt.Errorf("fetch() failed to get value for key [%s] from cache due to: %v", key, err)
}
log.Infof("Redis [GET %s]: %d bytes read", key, len(byteArray))

Expand All @@ -453,7 +453,7 @@ func (c *ChartCache) FetchForOne(key string) ([]byte, error) {
}

/*
GetForOne() is like FetchForOne() but if there is a cache miss, it will then get chart data based on
Get() is like Fetch() but if there is a cache miss, it will then get chart data based on
the corresponding repo object, process it and then add it to the cache and return the
result.
This func should:
Expand All @@ -466,13 +466,13 @@ func (c *ChartCache) FetchForOne(key string) ([]byte, error) {
• otherwise return the bytes stored in the
chart cache for the given entry
*/
func (c *ChartCache) GetForOne(key string, chart *models.Chart, downloadFn DownloadChartFn) ([]byte, error) {
func (c *ChartCache) Get(key string, chart *models.Chart, downloadFn DownloadChartFn) ([]byte, error) {
// TODO (gfichtenholt) it'd be nice to get rid of all arguments except for the key, similar to that of
// NamespacedResourceWatcherCache.GetForOne()
log.Infof("+GetForOne(%s)", key)
// NamespacedResourceWatcherCache.Get()
log.Infof("+Get(%s)", key)
var value []byte
var err error
if value, err = c.FetchForOne(key); err != nil {
if value, err = c.Fetch(key); err != nil {
return nil, err
} else if value == nil {
// cache miss
Expand Down Expand Up @@ -508,7 +508,7 @@ func (c *ChartCache) GetForOne(key string, chart *models.Chart, downloadFn Downl
c.queue.Add(key)
// now need to wait until this item has been processed by runWorker().
c.queue.WaitUntilForgotten(key)
return c.FetchForOne(key)
return c.Fetch(key)
}
}
return value, nil
Expand Down Expand Up @@ -613,7 +613,7 @@ func chartCacheKeyFor(namespace, chartID, chartVersion string) (string, error) {
chartVersion), nil
}

// FYI: The work queue is able to retry transient HTTP errors
// FYI: The work queue is able to retry transient HTTP errors that occur while invoking downloadFn
func ChartCacheComputeValue(chartID, chartUrl, chartVersion string, downloadFn DownloadChartFn) ([]byte, error) {
chartTgz, err := downloadFn(chartID, chartUrl, chartVersion)
if err != nil {
Expand Down
Loading

0 comments on commit ca225ad

Please sign in to comment.