aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-06-06 17:16:56 +0100
committerGravatar Joe Banks <[email protected]>2024-06-06 17:16:56 +0100
commitfe589c888552041c7741f1866f58040d3af44609 (patch)
tree8773f0fa786adb63177c0f75dac2db654490dc91
parentUpdate deployment workflow to new namespace (diff)
Update deployment to use infra repository
Updates the deployment workflows to pull in the deployment.yaml file from the infra repository in keeping with our other projects.
-rw-r--r--.github/workflows/build-deploy.yml13
-rw-r--r--deployment.yaml28
2 files changed, 8 insertions, 33 deletions
diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml
index 9d5418b..561faeb 100644
--- a/.github/workflows/build-deploy.yml
+++ b/.github/workflows/build-deploy.yml
@@ -62,21 +62,24 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- - name: Checkout code
+ - name: Checkout Kubernetes repository
uses: actions/checkout@v4
+ with:
+ repository: python-discord/infra
+ path: infra
- - uses: azure/setup-kubectl@v3
+ - uses: azure/setup-kubectl@v4
- name: Authenticate with Kubernetes
- uses: azure/k8s-set-context@v3
+ uses: azure/k8s-set-context@v4
with:
method: kubeconfig
kubeconfig: ${{ secrets.KUBECONFIG }}
- name: Deploy to Kubernetes
- uses: Azure/k8s-deploy@v4
+ uses: azure/k8s-deploy@v5
with:
namespace: bots
manifests: |
- deployment.yaml
+ infra/kubernetes/namespaces/bots/metricity/deployment.yaml
images: 'ghcr.io/python-discord/metricity:${{ inputs.sha-tag }}'
diff --git a/deployment.yaml b/deployment.yaml
deleted file mode 100644
index e7e3266..0000000
--- a/deployment.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: metricity
- namespace: bots
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: metricity
- template:
- metadata:
- labels:
- app: metricity
- spec:
- securityContext:
- fsGroup: 2000
- runAsUser: 1000
- runAsNonRoot: true
- containers:
- - name: metricity
- image: ghcr.io/python-discord/metricity:latest
- imagePullPolicy: "Always"
- envFrom:
- - secretRef:
- name: metricity-env
- securityContext:
- readOnlyRootFilesystem: true