From fe589c888552041c7741f1866f58040d3af44609 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Thu, 6 Jun 2024 17:16:56 +0100 Subject: [PATCH] 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. --- .github/workflows/build-deploy.yml | 13 ++++++++----- deployment.yaml | 28 ---------------------------- 2 files changed, 8 insertions(+), 33 deletions(-) delete mode 100644 deployment.yaml 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