Make banners configurable (#2556)

Related to #2551

Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
This commit is contained in:
Sergio Castaño Arteaga 2022-11-29 12:30:14 +01:00 committed by GitHub
parent 538e5d17e3
commit add765f233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 4 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: artifact-hub
description: Artifact Hub is a web-based application that enables finding, installing, and publishing Kubernetes packages.
type: application
version: 1.10.1-2
version: 1.10.1-3
appVersion: 1.10.0
kubeVersion: ">= 1.19.0-0"
home: https://artifacthub.io

View File

@ -29,6 +29,7 @@ stringData:
store: {{ .Values.images.store }}
server:
allowPrivateRepositories: {{ .Values.hub.server.allowPrivateRepositories }}
bannersURL: {{ .Values.hub.server.bannersURL }}
baseURL: {{ .Values.hub.server.baseURL }}
shutdownTimeout: {{ .Values.hub.server.shutdownTimeout }}
addr: 0.0.0.0:8000

View File

@ -57,6 +57,7 @@ hub:
cpu: 2
memory: 8000Mi
server:
bannersURL: https://cncf.github.io/banners/banners.yml
baseURL: https://artifacthub.io
shutdownTimeout: 20s
oauth:
@ -102,7 +103,7 @@ scanner:
cronjob:
resources:
requests:
cpu: 3
cpu: 2
memory: 8000Mi
concurrency: 5
@ -120,7 +121,7 @@ trivy:
cpu: 1
memory: 4000Mi
persistence:
enabled: true
enabled: false
size: 100Gi
storageClassName: gp2
authURL: https://registry.hub.docker.com

View File

@ -42,6 +42,7 @@ hub:
cpu: 1
memory: 1000Mi
server:
bannersURL: https://cncf.github.io/banners/banners.yml
baseURL: https://staging.artifacthub.io
shutdownTimeout: 20s
oauth:
@ -104,7 +105,7 @@ trivy:
cpu: 1
memory: 2000Mi
persistence:
enabled: true
enabled: false
size: 100Gi
storageClassName: gp2
authURL: https://registry.hub.docker.com

View File

@ -407,6 +407,11 @@
"type": "boolean",
"default": false
},
"bannersURL": {
"title": "Banners configuration file url",
"type": "string",
"default": ""
},
"cacheDir": {
"title": "Cache directory path",
"description": "If set, the cache directory for the Helm client will be explicitly set (otherwise defaults to $HOME/.cache), and the directory will be mounted as ephemeral volume (emptyDir).",

View File

@ -173,6 +173,8 @@ hub:
cacheDir: ""
# Directory path where the configuration files should be mounted
configDir: "/home/hub/.cfg"
# Banners configuration file url
bannersURL: ""
# Hub server base url
baseURL: ""
# Hub server shutdown timeout

View File

@ -147,6 +147,7 @@ func (h *Handlers) Index(w http.ResponseWriter, r *http.Request) {
"allowPrivateRepositories": h.cfg.GetBool("server.allowPrivateRepositories"),
"appleTouchIcon192": h.cfg.GetString("theme.images.appleTouchIcon192"),
"appleTouchIcon512": h.cfg.GetString("theme.images.appleTouchIcon512"),
"bannersURL": h.cfg.GetString("server.bannersURL"),
"description": description,
"gaTrackingID": h.cfg.GetString("analytics.gaTrackingID"),
"githubAuth": h.cfg.IsSet("server.oauth.github"),