k8s-deploy icon indicating copy to clipboard operation
k8s-deploy copied to clipboard

Feature Request: CroJobs

Open juzerali opened this issue 2 years ago • 3 comments

Feature request

Requesting support for CronJobs. Currently image substitution in CronJobs does not work.

  deploy:
    name: Deploy
    needs: [ build, publish ]
    runs-on: ubuntu-latest
    steps:
      - name: Set the Kubernetes context
        uses: azure/k8s-set-context@v2
        with:
          method: service-account
          k8s-url: https://my-kube-domain
          k8s-secret: ${{ secrets.KUBERNETES_SECRET }}

      - name: Checkout source code
        uses: actions/checkout@v3

      - name: Deploy to the Kubernetes cluster
        uses: azure/k8s-deploy@v1
        with:
          namespace: default
          manifests: |
            kube/cronjob.yml
          images: |
            asia-south1-docker.pkg.dev/project/repo/image:${{ github.sha }}

Expected: CronJob is updated with the new image as per ${{ github.sha }} Actual: Image name that is hardcoded, gets updated

juzerali avatar Oct 08 '22 04:10 juzerali

I'm going to look into this!

OliverMKing avatar Oct 12 '22 19:10 OliverMKing

You can temporarily use https://github.com/Azure/k8s-artifact-substitute this action to swap images prior to running deploy. It should correctly handle this case. Simply take the output of this action and use that as your manifests input in deploy.

OliverMKing avatar Oct 17 '22 13:10 OliverMKing

This issue is idle because it has been open for 14 days with no activity.

github-actions[bot] avatar Oct 31 '22 15:10 github-actions[bot]