diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0770ee41..12b12f15 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,10 +6,10 @@ name: test on: # Triggers the workflow on push or pull request events but only for the # main branch - push: - branches: [ main ] - pull_request: - branches: [ main ] + #push: + # branches: [ main ] + #pull_request: + # branches: [ main ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/kube/aks/api.yaml b/kube/aks/api.yaml index f015f721..dbd0b541 100644 --- a/kube/aks/api.yaml +++ b/kube/aks/api.yaml @@ -23,6 +23,10 @@ spec: - name: api image: kernelci/api imagePullPolicy: Always + resources: + requests: + memory: "1Gi" + cpu: "500m" ports: - containerPort: 8000 command: diff --git a/kube/aks/mongo.yaml b/kube/aks/mongo.yaml new file mode 100644 index 00000000..2ec37c94 --- /dev/null +++ b/kube/aks/mongo.yaml @@ -0,0 +1,102 @@ +--- +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# Copyright (C) 2023 Collabora Limited +# Author: Guillaume Tucker +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mongo + namespace: kernelci-api +spec: + replicas: 1 + selector: + matchLabels: + app: mongo + template: + metadata: + labels: + app: mongo + spec: + containers: + - name: mongo + image: mongo:6 + resources: + requests: + memory: "10Gi" + cpu: "2" + volumeMounts: + - name: mongo-persistent-storage + mountPath: /data/db + ports: + - containerPort: 27017 + volumes: + - name: mongo-persistent-storage + persistentVolumeClaim: + claimName: mongo-persistent-storage-claim2 +--- +apiVersion: v1 +kind: Service +metadata: + name: mongo + namespace: kernelci-api +spec: + ports: + - port: 27017 + selector: + app: mongo +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + annotations: + name: mongo-persistent-storage-claim2 + namespace: kernelci-api +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 15Gi + storageClassName: managed-csi-premium + volumeMode: Filesystem + volumeName: pvc-254329bd-3d3c-4601-a3f6-c8733db3aab5 +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + annotations: + pv.kubernetes.io/provisioned-by: disk.csi.azure.com + finalizers: + - external-provisioner.volume.kubernetes.io/finalizer + - kubernetes.io/pv-protection + - external-attacher/disk-csi-azure-com + name: pvc-254329bd-3d3c-4601-a3f6-c8733db3aab5 +spec: + accessModes: + - ReadWriteOnce + capacity: + storage: 15Gi + claimRef: + apiVersion: v1 + kind: PersistentVolumeClaim + name: mongo-persistent-storage-claim2 + namespace: kernelci-api + csi: + driver: disk.csi.azure.com + volumeAttributes: + csi.storage.k8s.io/pv/name: pvc-254329bd-3d3c-4601-a3f6-c8733db3aab5 + csi.storage.k8s.io/pvc/name: mongo-persistent-storage-claim2 + csi.storage.k8s.io/pvc/namespace: kernelci-api + skuname: Premium_LRS + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: topology.disk.csi.azure.com/zone + operator: In + values: + - "" + persistentVolumeReclaimPolicy: Delete + storageClassName: managed-csi-premium + volumeMode: Filesystem diff --git a/kube/aks/redis.yaml b/kube/aks/redis.yaml index a2f7ed88..57136e35 100644 --- a/kube/aks/redis.yaml +++ b/kube/aks/redis.yaml @@ -22,6 +22,11 @@ spec: containers: - name: redis image: redis:6.2 + imagePullPolicy: Always + resources: + requests: + memory: "512Mi" + cpu: "500m" ports: - containerPort: 6379 ---