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