Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storage.yaml): Add new storage #2763

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall you mentioning that storage on this system fills up pretty quickly and also that these config changes are just temporary - let's verify all the bits in this PR and move to the permanent config values as a next step.

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'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might cause some headache later when working with localinstall or other non-managed Maestro instances but should be fine in the current setup.

Usage of os.getenv('KCI_INSTANCE', ...) needs to be tracked and reduced over time, though.

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
Loading