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

Add New Port Mappings for Helm chart #352

Merged
merged 6 commits into from
Feb 20, 2025
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
36 changes: 36 additions & 0 deletions .github/workflows/docker-build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docker Image Build for PRs

on:
pull_request:
types: [opened, reopened, sychronize]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: facebook/whatsapp_proxy
tags: |
type=raw,value={{date 'YYYYMMDD'}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build PR
uses: docker/build-push-action@v3
with:
context: ./proxy
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: false
tags: |
${{ steps.meta.outputs.tags }}
facebook/whatsapp_proxy:latest
12 changes: 4 additions & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Image CI
name: Docker Build and PR for Main

# Run on every push to main + weekly, Sunday @ midnight
# to keep the image fresh
Expand All @@ -7,9 +7,6 @@ on:
branches: [ "main" ]
schedule:
- cron: "0 0 * * 0"
# On pull-requests only a build is run, not a push to Docker Hub
pull_request:
types: [opened, reopened, synchronize]

jobs:

Expand All @@ -19,7 +16,7 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
Expand All @@ -33,13 +30,13 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to dockerhub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
Expand All @@ -49,4 +46,3 @@ jobs:
tags: |
${{ steps.meta.outputs.tags }}
facebook/whatsapp_proxy:latest

2 changes: 1 addition & 1 deletion charts/whatsapp-proxy-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.3
version: 1.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
17 changes: 16 additions & 1 deletion charts/whatsapp-proxy-chart/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,24 @@ spec:
{{- end}}
{{- if .Values.service.stats_port }}
- port: {{ .Values.service.stats_port }}
targetPort: {{ .Values.service.stats_port }}
targetPort: 8199
protocol: TCP
name: stats
{{- end}}
{{- if .Values.service.media_port }}
- port: {{ .Values.service.media_port }}
targetPort: 587
protocol: TCP
name: media
{{- end}}

{{- if .Values.service.media_proxy_port }}
- port: {{ .Values.service.media_proxy_port }}
targetPort: 7777
protocol: TCP
name: media
{{- end}}


selector:
{{- include "whatsapp-proxy-chart.selectorLabels" . | nindent 4 }}
19 changes: 11 additions & 8 deletions charts/whatsapp-proxy-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,18 @@ securityContext: {}
# runAsUser: 1000

service:
type: ClusterIP
annotations: {}
type: LoadBalancer
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: nlb
port: 8080
# http_port: 80
# https_port: 443
# jabber_port: 5222
http_proxy_port: 8080
https_proxy_port: 8443
jabber_proxy_port: 8222
http_port: 80
https_port: 443
jabber_port: 5222
media_port: 587
# http_proxy_port: 8080
# https_proxy_port: 8443
# jabber_proxy_port: 8222
# media_proxy_port: 7777
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this one as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, these are left as examples for other users

# stats_port: 8199

ingress:
Expand Down
Loading