RajaRename ci.yml to ci.yml - #558
Conversation
…#519) Co-authored-by: Brian Suh <bsuh@fb.com>
…on works (v1.3.3) (WhatsApp#521) Co-authored-by: Brian Suh <bsuh@fb.com>
…hatsApp#523) Co-authored-by: Brian Suh <bsuh@fb.com>
Co-authored-by: Brian Suh <bsuh@fb.com>
Co-authored-by: Brian Suh <bsuh@fb.com>
Co-authored-by: Brian Suh <bsuh@fb.com>
Co-authored-by: Brian Suh <bsuh@fb.com>
Summary:
- Always declare every port listened on by HAProxy in the container spec.
- Keep service port configuration limited to controlling Service exposure, since omitting a containerPort does not prevent the process from listening.
Test Plan:
- ==> Linting charts/whatsapp-proxy-chart
1 chart(s) linted, 0 chart(s) failed
- ---
# Source: whatsapp-proxy-chart/templates/serviceaccount.yaml
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# License found in the LICENSE file in the root directory
# of this source tree.
apiVersion: v1
kind: ServiceAccount
metadata:
name: whatsapp-proxy
labels:
helm.sh/chart: whatsapp-proxy-chart-1.3.12
app.kubernetes.io/name: whatsapp-proxy-chart
app.kubernetes.io/instance: test
app: test
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
---
# Source: whatsapp-proxy-chart/templates/configmap.yaml
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# License found in the LICENSE file in the root directory
# of this source tree.
apiVersion: v1
kind: ConfigMap
metadata:
name: test-whatsapp-proxy-chart-haproxy
labels:
helm.sh/chart: whatsapp-proxy-chart-1.3.12
app.kubernetes.io/name: whatsapp-proxy-chart
app.kubernetes.io/instance: test
app: test
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
data:
haproxy.cfg: |
global
tune.bufsize 4096
maxconn 27500
spread-checks 5
ssl-server-verify none
defaults
mode tcp
timeout client-fin 1s
timeout server-fin 1s
timeout connect 5s
timeout client 200s
timeout server 200s
default-server inter 10s fastinter 1s downinter 3s error-limit 50
listen stats
bind :::8199
mode http
http-request use-service prometheus-exporter if { path /metrics }
stats uri /
frontend haproxy_v4_http
maxconn 27495
bind ipv4@*:80
bind ipv4@*:8080 accept-proxy
default_backend wa
frontend haproxy_v4_https
maxconn 27495
bind ipv4@*:443 ssl crt /etc/haproxy/ssl/proxy.whatsapp.net.pem
bind ipv4@*:8443 ssl crt /etc/haproxy/ssl/proxy.whatsapp.net.pem accept-proxy
default_backend wa
frontend haproxy_v4_xmpp
maxconn 27495
bind ipv4@*:5222
bind ipv4@*:8222 accept-proxy
default_backend wa
frontend haproxy_v4_whatsapp_net
maxconn 27495
bind ipv4@*:587
bind ipv4@*:7777
default_backend wa_whatsapp_net
backend wa_whatsapp_net
default-server check inter 60000 observe layer4
server whatsapp_net_443 whatsapp.net:443
backend wa
default-server check inter 60000 observe layer4 send-proxy-v2
server g_whatsapp_net_5222 g.whatsapp.net:5222
server g_whatsapp_net_80 g.whatsapp.net:80
server g_whatsapp_net_443 g.whatsapp.net:443
server g_fallback_whatsapp_net_5222 g-fallback.whatsapp.net:5222
server g_fallback_whatsapp_net_80 g-fallback.whatsapp.net:80
server g_fallback_whatsapp_net_443 g-fallback.whatsapp.net:443
---
# Source: whatsapp-proxy-chart/templates/service.yaml
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# License found in the LICENSE file in the root directory
# of this source tree.
apiVersion: v1
kind: Service
metadata:
name: test-whatsapp-proxy-chart
labels:
helm.sh/chart: whatsapp-proxy-chart-1.3.12
app.kubernetes.io/name: whatsapp-proxy-chart
app.kubernetes.io/instance: test
app: test
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: nlb
spec:
type: LoadBalancer
ports:
- port: 5222
targetPort: 5222
protocol: TCP
name: jabber
- port: 80
targetPort: 80
protocol: TCP
name: http
- port: 443
targetPort: 443
protocol: TCP
name: https
- port: 587
targetPort: 587
protocol: TCP
name: media
selector:
app.kubernetes.io/name: whatsapp-proxy-chart
app.kubernetes.io/instance: test
app: test
---
# Source: whatsapp-proxy-chart/templates/deployment.yaml
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# License found in the LICENSE file in the root directory
# of this source tree.
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-whatsapp-proxy-chart
labels:
helm.sh/chart: whatsapp-proxy-chart-1.3.12
app.kubernetes.io/name: whatsapp-proxy-chart
app.kubernetes.io/instance: test
app: test
app.kubernetes.io/version: "1.16.0"
app.kubernetes.io/managed-by: Helm
spec:
replicas: 10
selector:
matchLabels:
app.kubernetes.io/name: whatsapp-proxy-chart
app.kubernetes.io/instance: test
app: test
template:
metadata:
annotations:
checksum/haproxy-config: 430df3ebfca341e61e0297d0ac17f0fff4524eec5fca23730a38270604186719
labels:
app.kubernetes.io/name: whatsapp-proxy-chart
app.kubernetes.io/instance: test
app: test
spec:
serviceAccountName: whatsapp-proxy
securityContext:
sysctls:
- name: net.ipv4.ip_unprivileged_port_start
value: "0"
containers:
- name: whatsapp-proxy-chart
securityContext:
{}
image: "facebook/whatsapp_proxy:latest"
imagePullPolicy: IfNotPresent
ports:
- name: http-proxy
containerPort: 8080
protocol: TCP
- name: http
containerPort: 80
protocol: TCP
- name: https-proxy
containerPort: 8443
protocol: TCP
- name: https
containerPort: 443
protocol: TCP
- name: jabber-proxy
containerPort: 8222
protocol: TCP
- name: jabber
containerPort: 5222
protocol: TCP
- name: media
containerPort: 587
protocol: TCP
- name: media-proxy
containerPort: 7777
protocol: TCP
- name: stats
containerPort: 8199
protocol: TCP
readinessProbe:
exec:
command:
- /usr/local/bin/healthcheck.sh
initialDelaySeconds: 30
periodSeconds: 30
resources:
{}
volumeMounts:
- name: haproxy-config
mountPath: /usr/local/etc/haproxy/haproxy.cfg
subPath: haproxy.cfg
readOnly: true
volumes:
- name: haproxy-config
configMap:
name: test-whatsapp-proxy-chart-haproxy
---
# Source: whatsapp-proxy-chart/templates/hpa.yaml
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# License found in the LICENSE file in the root directory
# of this source tree.
---
# Source: whatsapp-proxy-chart/templates/ingress.yaml
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# License found in the LICENSE file in the root directory
# of this source tree.
---
# Source: whatsapp-proxy-chart/templates/servicemonitor.yaml
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# License found in the LICENSE file in the root directory
# of this source tree.
---
# Source: whatsapp-proxy-chart/templates/tests/test-connection.yaml
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# License found in the LICENSE file in the root directory
# of this source tree.
apiVersion: v1
kind: Pod
metadata:
name: "test-whatsapp-proxy-chart-test-connection"
# Intentionally omit common/selector labels so this pod is not matched by the
# HPA's selector. This test pod has no resource requests, and including it
# would break the HPA's utilization calculation.
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": hook-succeeded
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['test-whatsapp-proxy-chart:']
restartPolicy: Never
|
Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
No description provided.