-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add(scheduler-shell.yaml): Add new k8s scheduler for shell
NIPA operates using shell runtime, adding scheduler for that Signed-off-by: Denys Fedoryshchenko <[email protected]>
- Loading branch information
1 parent
833bbc5
commit 2c4ee61
Showing
1 changed file
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
# | ||
# Copyright (C) 2024 Collabora Limited | ||
# Authors: Guillaume Tucker <[email protected]> | ||
# Denys Fedoryshchenko <[email protected]> | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: scheduler-shell | ||
namespace: kernelci-pipeline | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: scheduler-shell | ||
template: | ||
metadata: | ||
labels: | ||
app: scheduler-shell | ||
spec: | ||
containers: | ||
- name: scheduler | ||
image: kernelci/kernelci:pipeline@sha256:34b13865be01a90b600604b7612f4cc048463d72626c2175ba2d2b40375eee12 | ||
imagePullPolicy: Always | ||
command: | ||
- ./src/scheduler.py | ||
- --settings=/secrets/kernelci.toml | ||
- --yaml-config=/config | ||
- loop | ||
- --name=scheduler_shell | ||
- --runtimes | ||
- shell | ||
env: | ||
- name: KCI_API_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: kernelci-api-token | ||
key: token | ||
- name: KCI_SSH_KEY | ||
value: "/secrets/id_rsa" | ||
resources: | ||
requests: | ||
memory: "256Mi" | ||
cpu: "500m" | ||
volumeMounts: | ||
- name: secrets | ||
mountPath: /secrets | ||
- name: config-volume | ||
mountPath: /config | ||
- name: tmpsecrets | ||
mountPath: /home/kernelci/secrets | ||
- name: tmpsecrets | ||
mountPath: /home/kernelci/.kube | ||
subPath: k8s-credentials/.kube | ||
- name: tmpsecrets | ||
mountPath: /home/kernelci/.config/gcloud | ||
subPath: k8s-credentials/.config/gcloud | ||
- name: tmpsecrets | ||
mountPath: /home/kernelci/.azure | ||
subPath: k8s-credentials/.azure | ||
initContainers: | ||
- name: credentials | ||
image: kernelci/kernelci:pipeline | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- name: tmpsecrets | ||
mountPath: /tmp/secrets | ||
- name: k8scredentials | ||
mountPath: /tmp/k8s | ||
readOnly: true | ||
command: | ||
- tar | ||
- xzf | ||
- /tmp/k8s/k8s-credentials.tgz | ||
- -C | ||
- /tmp/secrets | ||
volumes: | ||
- name: secrets | ||
secret: | ||
secretName: pipeline-secrets | ||
- name: config-volume | ||
configMap: | ||
name: pipeline-configmap | ||
- name: k8scredentials | ||
secret: | ||
secretName: k8scredentials | ||
- name: tmpsecrets | ||
emptyDir: {} |