Update a Kubernetes Service
Use Duplo to update a Service container from Github Actions
Updating the docker image for a service
Example Workflow
name: Update Service
on:
workflow_dispatch:
inputs:
environment:
description: The environment to deploy to
type: environment
default: dev
required: true
image:
description: The full image
type: string
required: true
jobs:
update_service:
name: Update Service
runs-on: ubuntu-latest
environment:
name: ${{ inputs.environment }}
env:
DUPLO_TOKEN: ${{ secrets.DUPLO_TOKEN }}
DUPLO_HOST: ${{ vars.DUPLO_HOST }}
DUPLO_TENANT: ${{ vars.DUPLO_TENANT }}
steps:
# install and login to the cloud
- name: Duplo Setup
uses: duplocloud/[email protected]
# only required on gcp and azure
with:
account-id: ${{ vars.CLOUD_ACCOUNT }}
credentials: ${{ secrets.CLOUD_CREDENTIALS }}
# uses duploctl from above
- name: Update Service
uses: duplocloud/actions/[email protected]
with:
name: my-service
image: ${{ inputs.image }}
type: serviceUpdating Init or Sidecar Container Images
Endpoint
PUT /v3/subscriptions/{tenant}/containers/replicationController/{k8sservicename}/containerimage
PUT /v3/subscriptions/{tenant}/containers/replicationController/{k8sservicename}/containerimageAuthorization
Request Body Format
Example Workflow
Last updated
Was this helpful?

