Skip to content

Commit

Permalink
aks/: Update Azure deployment files
Browse files Browse the repository at this point in the history
Update Azure deployment files, to automate deployment.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Nov 13, 2023
1 parent 826465c commit 43c9411
Show file tree
Hide file tree
Showing 13 changed files with 398 additions and 394 deletions.
6 changes: 6 additions & 0 deletions kube/aks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Pipeline Kubernetes manifest files

## Usage

This files designed to be used by api-pipeline-deploy.sh script from [kernelci-deploy](https://github.com/kernelci/kernelci-deploy) repository.
Additional documentation can be found in [kernelci-deploy README](https://github.com/kernelci/kernelci-deploy/kubernetes/README.md).
30 changes: 30 additions & 0 deletions kube/aks/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---

# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright (C) 2023 Collabora Limited
# Author: Guillaume Tucker <[email protected]>
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pipeline-ingress
namespace: kernelci-pipeline-testns
annotations:
cert-manager.io/cluster-issuer: all-issuer
spec:
ingressClassName: nginx-pipeline
tls:
- hosts:
- kernelci-pipeline-staging.eastus.cloudapp.azure.com
secretName: pipeline-tls
rules:
- host: kernelci-pipeline-staging.eastus.cloudapp.azure.com
http:
paths:
- backend:
service:
name: lava-callback
port:
number: 8000
path: /
pathType: Prefix
49 changes: 49 additions & 0 deletions kube/aks/kernelci-secrets.toml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[DEFAULT]
api_config = "staging"
storage_config = "staging-azure"
verbose = true

[trigger]
poll_period = 3600
startup_delay = 3
timeout = 60

[tarball]
kdir = "/home/kernelci/data/src/linux"
output = "/home/kernelci/data/output"

[scheduler]
output = "/home/kernelci/data/output"
runtime_config = "k8s-gke-eu-west4"

[monitor]

[send_kcidb]
kcidb_topic_name = "playground_kcidb_new"
kcidb_project_id = "kernelci-production"
origin = "kernelci_api"

[test_report]
smtp_host = "smtp.gmail.com"
smtp_port = 465
email_sender = "[email protected]"
email_recipient = "[email protected]"

[timeout]

[regression_tracker]

[storage.staging]
storage_cred = "/home/kernelci/data/ssh/id_rsa_tarball"

[storage.staging-azure]
storage_cred = ""

[storage.early-access-azure]
storage_cred = ""

[runtime.lava-collabora]
runtime_token = ""

[runtime.lava-collabora-early-access]
runtime_token = ""
16 changes: 0 additions & 16 deletions kube/aks/kernelci.toml

This file was deleted.

46 changes: 46 additions & 0 deletions kube/aks/lava-callback.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright (C) 2023 Collabora Limited
# Author: Guillaume Tucker <[email protected]>

apiVersion: apps/v1
kind: Deployment
metadata:
name: lava-callback
namespace: kernelci-pipeline-testns
spec:
replicas: 1
selector:
matchLabels:
app: lava-callback
template:
metadata:
labels:
app: lava-callback
spec:
containers:
- name: lava-callback
image: denysfcollabora/pipeline-lava-callback
imagePullPolicy: Always
command:
- python3
- src/lava_callback.py
env:
- name: KCI_API_TOKEN
valueFrom:
secretKeyRef:
name: kernelci-api-token
key: token
---
apiVersion: v1
kind: Service
metadata:
name: lava-callback
namespace: kernelci-pipeline-testns
spec:
ports:
- port: 80
targetPort: 8000
selector:
app: lava-callback
44 changes: 27 additions & 17 deletions kube/aks/monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
---
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright (C) 2023 Collabora Limited
# Author: Guillaume Tucker <[email protected]>

apiVersion: v1
kind: Pod
apiVersion: apps/v1
kind: Deployment
metadata:
name: monitor
namespace: kernelci-pipeline
namespace: kernelci-pipeline-testns
spec:
containers:
- name: monitor
image: kernelci/pipeline
imagePullPolicy: Always
command:
- ./src/monitor.py
- --settings=/home/kernelci/pipeline/kube/aks/kernelci.toml
- run
env:
- name: KCI_API_TOKEN
valueFrom:
secretKeyRef:
name: kernelci-api-token
key: token
replicas: 1
selector:
matchLabels:
app: monitor
template:
metadata:
labels:
app: monitor
spec:
containers:
- name: monitor
image: kernelci/pipeline
imagePullPolicy: Always
command:
- ./src/monitor.py
- --settings=/home/kernelci/pipeline/kube/aks/kernelci.toml
- run
env:
- name: KCI_API_TOKEN
valueFrom:
secretKeyRef:
name: kernelci-api-token
key: token
98 changes: 98 additions & 0 deletions kube/aks/nodehandlers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright (C) 2023 Collabora Limited
# Author: Guillaume Tucker <[email protected]>

apiVersion: apps/v1
kind: Deployment
metadata:
name: timeout
namespace: kernelci-pipeline-testns
spec:
replicas: 1
selector:
matchLabels:
app: timeout
template:
metadata:
labels:
app: timeout
spec:
containers:
- name: timeout
image: kernelci/pipeline
imagePullPolicy: Always
command:
- ./src/timeout.py
- --settings=/home/kernelci/pipeline/kube/aks/kernelci.toml
- run
- --mode=timeout
env:
- name: KCI_API_TOKEN
valueFrom:
secretKeyRef:
name: kernelci-api-token
key: token
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: closing
namespace: kernelci-pipeline-testns
spec:
replicas: 1
selector:
matchLabels:
app: closing
template:
metadata:
labels:
app: closing
spec:
containers:
- name: timeout
image: kernelci/pipeline
imagePullPolicy: Always
command:
- ./src/timeout.py
- --settings=/home/kernelci/pipeline/kube/aks/kernelci.toml
- run
- --mode=closing
env:
- name: KCI_API_TOKEN
valueFrom:
secretKeyRef:
name: kernelci-api-token
key: token
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: holdoff
namespace: kernelci-pipeline-testns
spec:
replicas: 1
selector:
matchLabels:
app: holdoff
template:
metadata:
labels:
app: holdoff
spec:
containers:
- name: timeout
image: kernelci/pipeline
imagePullPolicy: Always
command:
- ./src/timeout.py
- --settings=/home/kernelci/pipeline/kube/aks/kernelci.toml
- run
- --mode=holdoff
env:
- name: KCI_API_TOKEN
valueFrom:
secretKeyRef:
name: kernelci-api-token
key: token
64 changes: 0 additions & 64 deletions kube/aks/restart.sh

This file was deleted.

Loading

0 comments on commit 43c9411

Please sign in to comment.