From 27979e2e85f743d572cb1922c85482226048077d Mon Sep 17 00:00:00 2001 From: share2kanna Date: Sun, 22 Jan 2023 15:15:19 +0530 Subject: [PATCH] helm and docker configuration files updated --- .github/workflows/agent-docker-image.yml | 38 +++++++++++++++++++ .../workflows/config-worker-docker-image.yml | 38 +++++++++++++++++++ .../deployment-worker-docker-image.yml | 38 +++++++++++++++++++ .github/workflows/helm_release.yml | 26 +++++++++++++ .github/workflows/server-docker-image.yml | 38 +++++++++++++++++++ charts/kad/values.yaml | 6 +-- charts/server/values.yaml | 2 +- 7 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/agent-docker-image.yml create mode 100644 .github/workflows/config-worker-docker-image.yml create mode 100644 .github/workflows/deployment-worker-docker-image.yml create mode 100644 .github/workflows/helm_release.yml create mode 100644 .github/workflows/server-docker-image.yml diff --git a/.github/workflows/agent-docker-image.yml b/.github/workflows/agent-docker-image.yml new file mode 100644 index 00000000..407580be --- /dev/null +++ b/.github/workflows/agent-docker-image.yml @@ -0,0 +1,38 @@ +name: Agent Docker Image CI + +on: + push: + paths-ignore: + - 'charts/**' + - '**.md' + branches: [ main ] + pull_request: + paths-ignore: + - 'helm/**' + - '**.md' + branches: [ main ] + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file dockerfiles/agent/Dockerfile --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/agent:latest + - name: Docker push + run: | + docker login ${{ env.REGISTRY }} -u jebinjeb -p ${{ secrets.GITHUB_TOKEN }} + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/agent:latest + if: github.event_name == 'push' + + + diff --git a/.github/workflows/config-worker-docker-image.yml b/.github/workflows/config-worker-docker-image.yml new file mode 100644 index 00000000..500d891a --- /dev/null +++ b/.github/workflows/config-worker-docker-image.yml @@ -0,0 +1,38 @@ +name: Client Docker Image CI + +on: + push: + paths-ignore: + - 'charts/**' + - '**.md' + branches: [ main ] + pull_request: + paths-ignore: + - 'helm/**' + - '**.md' + branches: [ main ] + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file dockerfiles/config-worker/Dockerfile --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/config-worker:latest + - name: Docker push + run: | + docker login ${{ env.REGISTRY }} -u jebinjeb -p ${{ secrets.GITHUB_TOKEN }} + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/config-worker:latest + if: github.event_name == 'push' + + + diff --git a/.github/workflows/deployment-worker-docker-image.yml b/.github/workflows/deployment-worker-docker-image.yml new file mode 100644 index 00000000..354d292f --- /dev/null +++ b/.github/workflows/deployment-worker-docker-image.yml @@ -0,0 +1,38 @@ +name: Client Docker Image CI + +on: + push: + paths-ignore: + - 'charts/**' + - '**.md' + branches: [ main ] + pull_request: + paths-ignore: + - 'helm/**' + - '**.md' + branches: [ main ] + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file dockerfiles/deployment-worker/Dockerfile --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/deployment-worker:latest + - name: Docker push + run: | + docker login ${{ env.REGISTRY }} -u jebinjeb -p ${{ secrets.GITHUB_TOKEN }} + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/deployment-worker:latest + if: github.event_name == 'push' + + + diff --git a/.github/workflows/helm_release.yml b/.github/workflows/helm_release.yml new file mode 100644 index 00000000..d612cd6c --- /dev/null +++ b/.github/workflows/helm_release.yml @@ -0,0 +1,26 @@ +name: Helm Chart publish + +on: + push: + paths: + - 'charts/**' + branches: + - main +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@@gmail.com" + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.1.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/server-docker-image.yml b/.github/workflows/server-docker-image.yml new file mode 100644 index 00000000..12a19c77 --- /dev/null +++ b/.github/workflows/server-docker-image.yml @@ -0,0 +1,38 @@ +name: Client Docker Image CI + +on: + push: + paths-ignore: + - 'charts/**' + - '**.md' + branches: [ main ] + pull_request: + paths-ignore: + - 'helm/**' + - '**.md' + branches: [ main ] + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file dockerfiles/server/Dockerfile --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/server:latest + - name: Docker push + run: | + docker login ${{ env.REGISTRY }} -u jebinjeb -p ${{ secrets.GITHUB_TOKEN }} + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/server:latest + if: github.event_name == 'push' + + + diff --git a/charts/kad/values.yaml b/charts/kad/values.yaml index 56abdc73..00fb5567 100644 --- a/charts/kad/values.yaml +++ b/charts/kad/values.yaml @@ -8,11 +8,11 @@ image: pullPolicy: IfNotPresent tag: "0.1.1" agent: - repository: kad-agent + repository: ghcr.io/kube-tarian/kad/agent deployment_worker: - repository: kad-deployment-worker + repository: ghcr.io/kube-tarian/kad/deployment-worker config_worker: - repository: kad-config-worker + repository: ghcr.io/kube-tarian/kad/config-worker imagePullSecrets: [] nameOverride: "" diff --git a/charts/server/values.yaml b/charts/server/values.yaml index 17c64c8b..37c7ee78 100644 --- a/charts/server/values.yaml +++ b/charts/server/values.yaml @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: kad-server + repository: ghcr.io/kube-tarian/kad/server pullPolicy: IfNotPresent tag: "0.1.1"