Create engineer specific staging environment (#54006)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
This commit is contained in:
1
.devcontainer/.gh-kustomize-version
Normal file
1
.devcontainer/.gh-kustomize-version
Normal file
@@ -0,0 +1 @@
|
||||
v3.0.5
|
||||
@@ -11,7 +11,8 @@
|
||||
|
||||
// Install features. Type 'feature' in the VS Code command palette for a full list.
|
||||
"features": {
|
||||
"sshd": "latest"
|
||||
"ghcr.io/devcontainers/features/sshd:1": {},
|
||||
"ghcr.io/devcontainers/features/github-cli:1": {}
|
||||
},
|
||||
|
||||
"customizations": {
|
||||
@@ -43,6 +44,11 @@
|
||||
"permissions": {
|
||||
"contents": "write"
|
||||
}
|
||||
},
|
||||
"github/gh-kustomize": {
|
||||
"permissions": {
|
||||
"contents": "read"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,8 +63,9 @@
|
||||
}
|
||||
},
|
||||
|
||||
"onCreateCommand": ".devcontainer/on-create-command.sh",
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
"postCreateCommand": "npm ci",
|
||||
"postCreateCommand": ".devcontainer/post-create-command.sh",
|
||||
|
||||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||
"remoteUser": "node",
|
||||
|
||||
1
.devcontainer/on-create-command.sh
Executable file
1
.devcontainer/on-create-command.sh
Executable file
@@ -0,0 +1 @@
|
||||
gh extension install github/gh-kustomize --pin "$(cat .devcontainer/.gh-kustomize-version)" || true
|
||||
1
.devcontainer/post-create-command.sh
Executable file
1
.devcontainer/post-create-command.sh
Executable file
@@ -0,0 +1 @@
|
||||
npm ci
|
||||
9
config/kubernetes/production/README.md
Normal file
9
config/kubernetes/production/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Configuration for `production` environment
|
||||
|
||||
The configuration in this directory was autogenerated with Kustomize.
|
||||
|
||||
It contains the configuration for the **production** environment.
|
||||
|
||||
Please avoid editing the files in this directory directly, as they will be overwritten by the next generation.
|
||||
|
||||
To learn more about how to use [Kustomize](https://kustomize.io/) at GitHub, please visit [Kustomize on The Hub](https://thehub.github.com/epd/engineering/products-and-services/internal/moda/kustomize/).
|
||||
@@ -1,3 +1,4 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -9,49 +10,42 @@ spec:
|
||||
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
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
dnsPolicy: Default
|
||||
containers:
|
||||
- name: webapp
|
||||
image: docs-internal
|
||||
resources:
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 4000
|
||||
protocol: TCP
|
||||
envFrom:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
# application-config is crated 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
|
||||
image: docs-internal
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command: ['sleep', '5']
|
||||
command:
|
||||
- sleep
|
||||
- '5'
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
name: http
|
||||
protocol: TCP
|
||||
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: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
dnsPolicy: Default
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: webapp
|
||||
annotations:
|
||||
moda.github.net/dns-registration-enabled: 'false'
|
||||
moda.github.net/domain-name: docs.internal.github.com
|
||||
moda.github.net/load-balancer-type: public-external-http
|
||||
labels:
|
||||
service: webapp
|
||||
annotations:
|
||||
moda.github.net/domain-name: 'docs-internal.github.com'
|
||||
moda.github.net/dns-registration-enabled: 'false'
|
||||
moda.github.net/load-balancer-type:
|
||||
public-external-http
|
||||
# moda.github.net/allowed-ips: '23.235.32.0/20,43.249.72.0/22,103.244.50.0/24,103.245.222.0/23,103.245.224.0/24,104.156.80.0/20,140.248.64.0/18,140.248.128.0/17,146.75.0.0/17,151.101.0.0/16,157.52.64.0/18,167.82.0.0/17,167.82.128.0/20,167.82.160.0/20,167.82.224.0/20,172.111.64.0/18,185.31.16.0/22,199.27.72.0/21,199.232.0.0/1'
|
||||
# ipv6 addresses not included
|
||||
# curl -i "https://api.fastly.com/public-ip-list"
|
||||
name: webapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
|
||||
9
config/kubernetes/staging-ashishkeshan/README.md
Normal file
9
config/kubernetes/staging-ashishkeshan/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Configuration for `staging-ashishkeshan` environment
|
||||
|
||||
The configuration in this directory was autogenerated with Kustomize.
|
||||
|
||||
It contains the configuration for the **staging-ashishkeshan** environment.
|
||||
|
||||
Please avoid editing the files in this directory directly, as they will be overwritten by the next generation.
|
||||
|
||||
To learn more about how to use [Kustomize](https://kustomize.io/) at GitHub, please visit [Kustomize on The Hub](https://thehub.github.com/epd/engineering/products-and-services/internal/moda/kustomize/).
|
||||
@@ -0,0 +1,51 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webapp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
fluentbit.io/parser: logfmt_sloppy
|
||||
observability.github.com/splunk_index: docs-internal
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
containers:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
- configMapRef:
|
||||
name: application-config
|
||||
image: docs-internal
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- sleep
|
||||
- '5'
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
dnsPolicy: Default
|
||||
19
config/kubernetes/staging-ashishkeshan/services/webapp.yaml
Normal file
19
config/kubernetes/staging-ashishkeshan/services/webapp.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
moda.github.net/domain-name: docs-staging-ashishkeshan.service.%region%.github.net
|
||||
moda.github.net/load-balancer-type: internal-http
|
||||
labels:
|
||||
service: webapp
|
||||
name: webapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: webapp
|
||||
type: LoadBalancer
|
||||
9
config/kubernetes/staging-ebonsignori/README.md
Normal file
9
config/kubernetes/staging-ebonsignori/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Configuration for `staging-ebonsignori` environment
|
||||
|
||||
The configuration in this directory was autogenerated with Kustomize.
|
||||
|
||||
It contains the configuration for the **staging-ebonsignori** environment.
|
||||
|
||||
Please avoid editing the files in this directory directly, as they will be overwritten by the next generation.
|
||||
|
||||
To learn more about how to use [Kustomize](https://kustomize.io/) at GitHub, please visit [Kustomize on The Hub](https://thehub.github.com/epd/engineering/products-and-services/internal/moda/kustomize/).
|
||||
@@ -0,0 +1,51 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webapp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
fluentbit.io/parser: logfmt_sloppy
|
||||
observability.github.com/splunk_index: docs-internal
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
containers:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
- configMapRef:
|
||||
name: application-config
|
||||
image: docs-internal
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- sleep
|
||||
- '5'
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
dnsPolicy: Default
|
||||
19
config/kubernetes/staging-ebonsignori/services/webapp.yaml
Normal file
19
config/kubernetes/staging-ebonsignori/services/webapp.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
moda.github.net/domain-name: docs-staging-ebonsignori.service.%region%.github.net
|
||||
moda.github.net/load-balancer-type: internal-http
|
||||
labels:
|
||||
service: webapp
|
||||
name: webapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: webapp
|
||||
type: LoadBalancer
|
||||
9
config/kubernetes/staging-hectorsector/README.md
Normal file
9
config/kubernetes/staging-hectorsector/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Configuration for `staging-hectorsector` environment
|
||||
|
||||
The configuration in this directory was autogenerated with Kustomize.
|
||||
|
||||
It contains the configuration for the **staging-hectorsector** environment.
|
||||
|
||||
Please avoid editing the files in this directory directly, as they will be overwritten by the next generation.
|
||||
|
||||
To learn more about how to use [Kustomize](https://kustomize.io/) at GitHub, please visit [Kustomize on The Hub](https://thehub.github.com/epd/engineering/products-and-services/internal/moda/kustomize/).
|
||||
@@ -0,0 +1,51 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webapp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
fluentbit.io/parser: logfmt_sloppy
|
||||
observability.github.com/splunk_index: docs-internal
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
containers:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
- configMapRef:
|
||||
name: application-config
|
||||
image: docs-internal
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- sleep
|
||||
- '5'
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
dnsPolicy: Default
|
||||
19
config/kubernetes/staging-hectorsector/services/webapp.yaml
Normal file
19
config/kubernetes/staging-hectorsector/services/webapp.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
moda.github.net/domain-name: docs-staging-hectorsector.service.%region%.github.net
|
||||
moda.github.net/load-balancer-type: internal-http
|
||||
labels:
|
||||
service: webapp
|
||||
name: webapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: webapp
|
||||
type: LoadBalancer
|
||||
9
config/kubernetes/staging-heiskr/README.md
Normal file
9
config/kubernetes/staging-heiskr/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Configuration for `staging-heiskr` environment
|
||||
|
||||
The configuration in this directory was autogenerated with Kustomize.
|
||||
|
||||
It contains the configuration for the **staging-heiskr** environment.
|
||||
|
||||
Please avoid editing the files in this directory directly, as they will be overwritten by the next generation.
|
||||
|
||||
To learn more about how to use [Kustomize](https://kustomize.io/) at GitHub, please visit [Kustomize on The Hub](https://thehub.github.com/epd/engineering/products-and-services/internal/moda/kustomize/).
|
||||
51
config/kubernetes/staging-heiskr/deployments/webapp.yaml
Normal file
51
config/kubernetes/staging-heiskr/deployments/webapp.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webapp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
fluentbit.io/parser: logfmt_sloppy
|
||||
observability.github.com/splunk_index: docs-internal
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
containers:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
- configMapRef:
|
||||
name: application-config
|
||||
image: docs-internal
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- sleep
|
||||
- '5'
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
dnsPolicy: Default
|
||||
19
config/kubernetes/staging-heiskr/services/webapp.yaml
Normal file
19
config/kubernetes/staging-heiskr/services/webapp.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
moda.github.net/domain-name: docs-staging-heiskr.service.%region%.github.net
|
||||
moda.github.net/load-balancer-type: internal-http
|
||||
labels:
|
||||
service: webapp
|
||||
name: webapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: webapp
|
||||
type: LoadBalancer
|
||||
9
config/kubernetes/staging-octosteve/README.md
Normal file
9
config/kubernetes/staging-octosteve/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Configuration for `staging-octosteve` environment
|
||||
|
||||
The configuration in this directory was autogenerated with Kustomize.
|
||||
|
||||
It contains the configuration for the **staging-octosteve** environment.
|
||||
|
||||
Please avoid editing the files in this directory directly, as they will be overwritten by the next generation.
|
||||
|
||||
To learn more about how to use [Kustomize](https://kustomize.io/) at GitHub, please visit [Kustomize on The Hub](https://thehub.github.com/epd/engineering/products-and-services/internal/moda/kustomize/).
|
||||
51
config/kubernetes/staging-octosteve/deployments/webapp.yaml
Normal file
51
config/kubernetes/staging-octosteve/deployments/webapp.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webapp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
fluentbit.io/parser: logfmt_sloppy
|
||||
observability.github.com/splunk_index: docs-internal
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
containers:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
- configMapRef:
|
||||
name: application-config
|
||||
image: docs-internal
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- sleep
|
||||
- '5'
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
dnsPolicy: Default
|
||||
19
config/kubernetes/staging-octosteve/services/webapp.yaml
Normal file
19
config/kubernetes/staging-octosteve/services/webapp.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
moda.github.net/domain-name: docs-staging-octosteve.service.%region%.github.net
|
||||
moda.github.net/load-balancer-type: internal-http
|
||||
labels:
|
||||
service: webapp
|
||||
name: webapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: webapp
|
||||
type: LoadBalancer
|
||||
9
config/kubernetes/staging-rachmari/README.md
Normal file
9
config/kubernetes/staging-rachmari/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Configuration for `staging-rachmari` environment
|
||||
|
||||
The configuration in this directory was autogenerated with Kustomize.
|
||||
|
||||
It contains the configuration for the **staging-rachmari** environment.
|
||||
|
||||
Please avoid editing the files in this directory directly, as they will be overwritten by the next generation.
|
||||
|
||||
To learn more about how to use [Kustomize](https://kustomize.io/) at GitHub, please visit [Kustomize on The Hub](https://thehub.github.com/epd/engineering/products-and-services/internal/moda/kustomize/).
|
||||
51
config/kubernetes/staging-rachmari/deployments/webapp.yaml
Normal file
51
config/kubernetes/staging-rachmari/deployments/webapp.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webapp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
fluentbit.io/parser: logfmt_sloppy
|
||||
observability.github.com/splunk_index: docs-internal
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
containers:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
- configMapRef:
|
||||
name: application-config
|
||||
image: docs-internal
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- sleep
|
||||
- '5'
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
dnsPolicy: Default
|
||||
19
config/kubernetes/staging-rachmari/services/webapp.yaml
Normal file
19
config/kubernetes/staging-rachmari/services/webapp.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
moda.github.net/domain-name: docs-staging-rachmari.service.%region%.github.net
|
||||
moda.github.net/load-balancer-type: internal-http
|
||||
labels:
|
||||
service: webapp
|
||||
name: webapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: webapp
|
||||
type: LoadBalancer
|
||||
9
config/kubernetes/staging-ronricardo/README.md
Normal file
9
config/kubernetes/staging-ronricardo/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Configuration for `staging-ronricardo` environment
|
||||
|
||||
The configuration in this directory was autogenerated with Kustomize.
|
||||
|
||||
It contains the configuration for the **staging-ronricardo** environment.
|
||||
|
||||
Please avoid editing the files in this directory directly, as they will be overwritten by the next generation.
|
||||
|
||||
To learn more about how to use [Kustomize](https://kustomize.io/) at GitHub, please visit [Kustomize on The Hub](https://thehub.github.com/epd/engineering/products-and-services/internal/moda/kustomize/).
|
||||
51
config/kubernetes/staging-ronricardo/deployments/webapp.yaml
Normal file
51
config/kubernetes/staging-ronricardo/deployments/webapp.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webapp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
fluentbit.io/parser: logfmt_sloppy
|
||||
observability.github.com/splunk_index: docs-internal
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
containers:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
- configMapRef:
|
||||
name: application-config
|
||||
image: docs-internal
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- sleep
|
||||
- '5'
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
dnsPolicy: Default
|
||||
19
config/kubernetes/staging-ronricardo/services/webapp.yaml
Normal file
19
config/kubernetes/staging-ronricardo/services/webapp.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
moda.github.net/domain-name: docs-staging-ronricardo.service.%region%.github.net
|
||||
moda.github.net/load-balancer-type: internal-http
|
||||
labels:
|
||||
service: webapp
|
||||
name: webapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: webapp
|
||||
type: LoadBalancer
|
||||
9
config/kubernetes/staging-saturn226/README.md
Normal file
9
config/kubernetes/staging-saturn226/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Configuration for `staging-saturn226` environment
|
||||
|
||||
The configuration in this directory was autogenerated with Kustomize.
|
||||
|
||||
It contains the configuration for the **staging-saturn226** environment.
|
||||
|
||||
Please avoid editing the files in this directory directly, as they will be overwritten by the next generation.
|
||||
|
||||
To learn more about how to use [Kustomize](https://kustomize.io/) at GitHub, please visit [Kustomize on The Hub](https://thehub.github.com/epd/engineering/products-and-services/internal/moda/kustomize/).
|
||||
51
config/kubernetes/staging-saturn226/deployments/webapp.yaml
Normal file
51
config/kubernetes/staging-saturn226/deployments/webapp.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webapp
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
fluentbit.io/parser: logfmt_sloppy
|
||||
observability.github.com/splunk_index: docs-internal
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
containers:
|
||||
- envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
- configMapRef:
|
||||
name: application-config
|
||||
image: docs-internal
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command:
|
||||
- sleep
|
||||
- '5'
|
||||
name: webapp
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
requests:
|
||||
cpu: 8000m
|
||||
memory: 10Gi
|
||||
dnsPolicy: Default
|
||||
19
config/kubernetes/staging-saturn226/services/webapp.yaml
Normal file
19
config/kubernetes/staging-saturn226/services/webapp.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
# This file was generated with Kustomize. Please do not edit manually.
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
moda.github.net/domain-name: docs-staging-saturn226.service.%region%.github.net
|
||||
moda.github.net/load-balancer-type: internal-http
|
||||
labels:
|
||||
service: webapp
|
||||
name: webapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: webapp
|
||||
type: LoadBalancer
|
||||
57
config/kustomize/base/deployments/webapp.yaml
Normal file
57
config/kustomize/base/deployments/webapp.yaml
Normal file
@@ -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: 8000m
|
||||
memory: 10Gi
|
||||
limits:
|
||||
cpu: 16000m
|
||||
memory: 14Gi
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 4000
|
||||
protocol: TCP
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: vault-secrets
|
||||
- configMapRef:
|
||||
name: kube-cluster-metadata
|
||||
# application-config is crated 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: /healthz
|
||||
port: http
|
||||
6
config/kustomize/base/kustomization.yaml
Normal file
6
config/kustomize/base/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- deployments/webapp.yaml
|
||||
- services/webapp.yaml
|
||||
18
config/kustomize/base/services/webapp.yaml
Normal file
18
config/kustomize/base/services/webapp.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: webapp
|
||||
labels:
|
||||
service: webapp
|
||||
annotations:
|
||||
moda.github.net/domain-name: 'docs-staging-default.service.%region%.github.net'
|
||||
moda.github.net/load-balancer-type: 'internal-http'
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: webapp
|
||||
type: LoadBalancer
|
||||
20
config/kustomize/overlays/production/kustomization.yaml
Normal file
20
config/kustomize/overlays/production/kustomization.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: Service
|
||||
name: webapp
|
||||
patch: |
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1domain-name
|
||||
value: 'docs.internal.github.com'
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1dns-registration-enabled
|
||||
value: 'false'
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1load-balancer-type
|
||||
value: 'public-external-http'
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: Service
|
||||
name: webapp
|
||||
patch: |
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1domain-name
|
||||
value: 'docs-staging-ashishkeshan.service.%region%.github.net'
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: Service
|
||||
name: webapp
|
||||
patch: |
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1domain-name
|
||||
value: 'docs-staging-ebonsignori.service.%region%.github.net'
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: Service
|
||||
name: webapp
|
||||
patch: |
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1domain-name
|
||||
value: 'docs-staging-hectorsector.service.%region%.github.net'
|
||||
14
config/kustomize/overlays/staging-heiskr/kustomization.yaml
Normal file
14
config/kustomize/overlays/staging-heiskr/kustomization.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: Service
|
||||
name: webapp
|
||||
patch: |
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1domain-name
|
||||
value: 'docs-staging-heiskr.service.%region%.github.net'
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: Service
|
||||
name: webapp
|
||||
patch: |
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1domain-name
|
||||
value: 'docs-staging-octosteve.service.%region%.github.net'
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: Service
|
||||
name: webapp
|
||||
patch: |
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1domain-name
|
||||
value: 'docs-staging-rachmari.service.%region%.github.net'
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: Service
|
||||
name: webapp
|
||||
patch: |
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1domain-name
|
||||
value: 'docs-staging-ronricardo.service.%region%.github.net'
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- target:
|
||||
kind: Service
|
||||
name: webapp
|
||||
patch: |
|
||||
- op: add
|
||||
path: /metadata/annotations/moda.github.net~1domain-name
|
||||
value: 'docs-staging-saturn226.service.%region%.github.net'
|
||||
Reference in New Issue
Block a user