Skip to content

Commit

Permalink
WIP: feat(storage.yaml): Add new storage
Browse files Browse the repository at this point in the history
Add new kernelci-storage definition.
It is plain http storage, already supported as "backend".

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Jan 1, 2025
1 parent 1a08508 commit 6642ac0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions config/core/storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ storage:
host: staging.kernelci.org
base_url: http://storage.staging.kernelci.org/
api_url: https://api.staging.kernelci.org

kci-storage:
storage_type: backend
base_url: http://mon.kernelci.org:3000/
api_url: http://mon.kernelci.org:3000/
4 changes: 2 additions & 2 deletions config/runtime/base/kubernetes.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ spec:
#value: {{ "/home/kernelci/.ssh/id_rsa_tarball-staging" }}
valueFrom:
secretKeyRef:
name: {{ "kci-api-azure-files-sas-staging" }}
key: azure-files-sas
name: kci-storage-tokens
key: {{ k8s_storage_token_name }}
{% block k8s_command %}
command: ["/bin/sh", "-c"]
{% endblock %}
Expand Down
2 changes: 2 additions & 0 deletions kernelci/runtime/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ def generate(self, job, params):
instance = os.getenv('KCI_INSTANCE', 'prod')
if instance == 'prod':
params['k8s_api_key'] = 'kci-api-jwt-early-access'
params['k8s_storage_token_name'] = 'production'
else:
params['k8s_api_key'] = 'kci-api-jwt-staging'
params['k8s_storage_token_name'] = 'staging'
params['k8s_job_name'] = k8s_job_name
return template.render(params)

Expand Down

0 comments on commit 6642ac0

Please sign in to comment.