diff options
| author | 2024-06-06 18:34:07 +0200 | |
|---|---|---|
| committer | 2024-06-06 18:34:07 +0200 | |
| commit | e6c6526820155bec9f03b2165a26748603d9646c (patch) | |
| tree | 8773f0fa786adb63177c0f75dac2db654490dc91 | |
| parent | Update deployment workflow to new namespace (diff) | |
| parent | Update deployment to use infra repository (diff) | |
Merge pull request #150 from python-discord/jb3/deployment/infra-repo
Update deployment to use infra repository
| -rw-r--r-- | .github/workflows/build-deploy.yml | 13 | ||||
| -rw-r--r-- | deployment.yaml | 28 | 
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  |