-
Notifications
You must be signed in to change notification settings - Fork 60.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
131 changed files
with
7,221 additions
and
2,823 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: webapp | ||
spec: | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: webapp | ||
template: | ||
metadata: | ||
labels: | ||
app: webapp | ||
annotations: | ||
# Our internal logs aren't structured so we use logfmt_sloppy to just log stdout and error | ||
# See https://thehub.github.com/epd/engineering/dev-practicals/observability/logging/ for more details | ||
fluentbit.io/parser: logfmt_sloppy | ||
observability.github.com/splunk_index: docs-internal | ||
spec: | ||
dnsPolicy: Default | ||
containers: | ||
- name: webapp | ||
image: docs-internal | ||
resources: | ||
requests: | ||
cpu: 1000m | ||
memory: 4500Mi | ||
limits: | ||
cpu: 8000m | ||
memory: 16Gi | ||
ports: | ||
- name: http | ||
containerPort: 4000 | ||
protocol: TCP | ||
envFrom: | ||
- secretRef: | ||
name: vault-secrets | ||
- configMapRef: | ||
name: kube-cluster-metadata | ||
# application-config is created at deploy time from | ||
# configuration set in config/moda/configuration/*/env.yaml | ||
- configMapRef: | ||
name: application-config | ||
# Zero-downtime deploys | ||
# https://thehub.github.com/engineering/products-and-services/internal/moda/feature-documentation/pod-lifecycle/#required-prestop-hook | ||
# https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: ['sleep', '5'] | ||
readinessProbe: | ||
initialDelaySeconds: 5 | ||
httpGet: | ||
# WARNING: This should be updated to a meaningful endpoint for your application which will return a 200 once the app is fully started. | ||
# See: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes | ||
path: /healthcheck | ||
port: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: webapp | ||
labels: | ||
service: webapp | ||
annotations: | ||
moda.github.net/domain-name: 'docs-internal-%environment%.service.%region%.github.net' | ||
# HTTP app reachable inside GitHub's network (employee website) | ||
moda.github.net/load-balancer-type: internal-http | ||
spec: | ||
ports: | ||
- name: http | ||
port: 4000 | ||
protocol: TCP | ||
targetPort: http | ||
selector: | ||
app: webapp | ||
type: LoadBalancer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
data: | ||
MODA_APP_NAME: docs-internal | ||
NODE_ENV: production | ||
NODE_OPTIONS: '--max-old-space-size=4096' | ||
PORT: '4000' | ||
ENABLED_LANGUAGES: 'en,zh,es,pt,ru,ja,fr,de,ko' | ||
RATE_LIMIT_MAX: '21' | ||
# Moda uses a non-default port for sending datadog metrics | ||
DD_DOGSTATSD_PORT: '28125' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
data: | ||
MODA_APP_NAME: docs-internal | ||
# Identifies the service deployment environment as production | ||
# Equivalent to HEAVEN_DEPLOYED_ENV === 'production' | ||
MODA_PROD_SERVICE_ENV: 'true' | ||
NODE_ENV: production | ||
NODE_OPTIONS: '--max-old-space-size=4096' | ||
PORT: '4000' | ||
ENABLED_LANGUAGES: 'en,zh,es,pt,ru,ja,fr,de,ko' | ||
RATE_LIMIT_MAX: '21' | ||
# Moda uses a non-default port for sending datadog metrics | ||
DD_DOGSTATSD_PORT: '28125' | ||
# Identifies the service deployment environment as production | ||
# Equivalent to HEAVEN_DEPLOYED_ENV === 'production' | ||
MODA_PROD_SERVICE_ENV: 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.