Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging and pushing Helm charts to Github Container Registry #390

Merged
merged 6 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 32 additions & 33 deletions .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,6 @@ on:

jobs:
docker_image_build_and_push:
# strategy:
# matrix:
# include:
# - name: agent-factory-api
# context: ./src
# dockerfile: ./src/dotnet/AgentFactoryAPI/Dockerfile
# - name: agent-hub-api
# context: ./src/python
# dockerfile: ./src/python/AgentHubAPI/Dockerfile
# - name: chat-ui
# context: ./src/ui/UserPortal
# dockerfile: ./src/ui/UserPortal/Dockerfile
# - name: core-api
# context: ./src
# dockerfile: ./src/dotnet/CoreAPI/Dockerfile
# - name: core-job
# context: ./src
# dockerfile: ./src/dotnet/CoreWorker/Dockerfile
# - name: data-source-hub-api
# context: ./src/python
# dockerfile: ./src/python/DataSourceHubAPI/Dockerfile
# - name: gatekeeper-api
# context: ./src
# dockerfile: ./src/dotnet/GatekeeperAPI/Dockerfile
# - name: langchain-api
# context: ./src/python
# dockerfile: ./src/python/LangChainAPI/Dockerfile
# - name: prompt-hub-api
# context: ./src/python
# dockerfile: ./src/python/PromptHubAPI/Dockerfile
# - name: semantic-kernel-api
# context: ./src
# dockerfile: ./src/dotnet/SemanticKernelAPI/Dockerfile
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -96,3 +63,35 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true

helm_chart_package_and_push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Fetching the Latest Release Tag number
id: releaseVersion
run: |
release_json=$(curl https://api.github.com/repos/${{ github.repository }}/releases)
release_tag=$(echo "$release_json" | jq -r '.[0].tag_name')
echo "release_tag: Latest Tag is : $release_tag"
echo "release_tag=$release_tag" >> $GITHUB_OUTPUT

- name: Checkout code
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Helm Chart Update, Package, and Push
run: |
cd ./deploy/helm/${{ inputs.image }}
sed -i "s/version\: 0\.0\.0/version\: ${{ steps.releaseVersion.outputs.release_tag }}/" Chart.yaml
sed -i "s/tag\: latest/tag\: ${{ steps.releaseVersion.outputs.release_tag }}/" values.yaml
helm package . --app-version ${{ steps.releaseVersion.outputs.release_tag }}
helm push ${{ inputs.image }}-${{ steps.releaseVersion.outputs.release_tag }}.tgz oci://ghcr.io/${{ github.repository }}/helm
20 changes: 19 additions & 1 deletion deploy/gvalues.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,22 @@ azureWorkloadIdentity:
langChainApiClientId: {{langChainApiMiClientId}}
promptHubApiClientId: {{promptHubApiMiClientId}}
semanticKernelApiClientId: {{semanticKernelApiMiClientId}}
tenantId: {{tenantId}}
tenantId: {{tenantId}}

ingress:
enabled: true
protocol: https
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "*"
tls:
- secretName: tls-prod
2 changes: 1 addition & 1 deletion deploy/helm/agent-factory-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: agent-factory-api
version: 0.1.0
version: 0.0.0
19 changes: 2 additions & 17 deletions deploy/helm/agent-factory-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1
serviceAccountName: agent-factory-api
image:
repository: bhm7vnpxv6irqcr.azurecr.io/chatservicewebapi
repository: ghcr.io/solliancenet/foundationallm/agent-factory-api
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: latest
Expand All @@ -23,22 +23,7 @@ tolerations: []
affinity: {}

ingress:
enabled: true
protocol: #http | https (set by script)
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "*"
tls:
- secretName: tls-prod
enabled: false

env:
configmap:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/agent-hub-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: agent-hub-api
version: 0.1.0
version: 0.0.0
19 changes: 2 additions & 17 deletions deploy/helm/agent-hub-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1
serviceAccountName: agent-hub-api
image:
repository: bhm7vnpxv6irqcr.azurecr.io/agent-hub-api
repository: ghcr.io/solliancenet/foundationallm/agent-hub-api
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: latest
Expand All @@ -23,22 +23,7 @@ tolerations: []
affinity: {}

ingress:
enabled: true
protocol: #http | https (set by script)
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "*"
tls:
- secretName: tls-prod
enabled: false

env:
configmap:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/chat-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: chat-ui
version: 0.1.0
version: 0.0.0
19 changes: 2 additions & 17 deletions deploy/helm/chat-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1
serviceAccountName: chat-ui
image:
repository: bhm7vnpxv6irqcr.azurecr.io/searchwebapp
repository: ghcr.io/solliancenet/foundationallm/chat-ui
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: latest
Expand All @@ -23,22 +23,7 @@ tolerations: []
affinity: {}

ingress:
enabled: true
protocol: #http | https (set by script)
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "*"
tls:
- secretName: tls-prod
enabled: false

env:
configmap:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/core-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: core-api
version: 0.1.0
version: 0.0.0
19 changes: 2 additions & 17 deletions deploy/helm/core-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1
serviceAccountName: core-api
image:
repository: bhm7vnpxv6irqcr.azurecr.io/chatservicewebapi
repository: ghcr.io/solliancenet/foundationallm/core-api
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: latest
Expand All @@ -23,22 +23,7 @@ tolerations: []
affinity: {}

ingress:
enabled: true
protocol: #http | https (set by script)
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,X-AGENT-HINT"
nginx.ingress.kubernetes.io/cors-allow-methods: "*"
tls:
- secretName: tls-prod
enabled: false

env:
configmap:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/core-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: core-job
version: 0.1.0
version: 0.0.0
2 changes: 1 addition & 1 deletion deploy/helm/core-job/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1
serviceAccountName: core-job
image:
repository: bhm7vnpxv6irqcr.azurecr.io/chatservicewebapi
repository: ghcr.io/solliancenet/foundationallm/core-job
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: latest
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/data-source-hub-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: data-source-hub-api
version: 0.1.0
version: 0.0.0
19 changes: 2 additions & 17 deletions deploy/helm/data-source-hub-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1
serviceAccountName: data-source-hub-api
image:
repository: bhm7vnpxv6irqcr.azurecr.io/data-source-hub-api
repository: ghcr.io/solliancenet/foundationallm/data-source-hub-api
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: latest
Expand All @@ -23,22 +23,7 @@ tolerations: []
affinity: {}

ingress:
enabled: true
protocol: #http | https (set by script)
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "*"
tls:
- secretName: tls-prod
enabled: false

env:
configmap:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/gatekeeper-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: gatekeeper-api
version: 0.1.0
version: 0.0.0
19 changes: 2 additions & 17 deletions deploy/helm/gatekeeper-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1
serviceAccountName: gatekeeper-api
image:
repository: bhm7vnpxv6irqcr.azurecr.io/chatservicewebapi
repository: ghcr.io/solliancenet/foundationallm/gatekeeper-api
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: latest
Expand All @@ -23,22 +23,7 @@ tolerations: []
affinity: {}

ingress:
enabled: true
protocol: #http | https (set by script)
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "*"
tls:
- secretName: tls-prod
enabled: false

env:
configmap:
Expand Down
17 changes: 1 addition & 16 deletions deploy/helm/langchain-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,7 @@ tolerations: []
affinity: {}

ingress:
enabled: true
protocol: #http | https (set by script)
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "*"
tls:
- secretName: tls-prod
enabled: false

env:
configmap:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/prompt-hub-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: prompt-hub-api
version: 0.1.0
version: 0.0.0
Loading
Loading