From 2f5ea00d12d8b48dbe19a260fae392d93a8981e2 Mon Sep 17 00:00:00 2001 From: Evan Bonsignori Date: Tue, 21 Jan 2025 16:23:00 -0800 Subject: [PATCH 1/3] fix MODA_PROD_SERVICE_ENV env to use boolean string in checks (#54043) --- src/frame/middleware/index.ts | 2 +- src/observability/lib/statsd.js | 2 +- src/observability/middleware/trigger-error.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frame/middleware/index.ts b/src/frame/middleware/index.ts index 39cec4ea3069..518bc14bd9a2 100644 --- a/src/frame/middleware/index.ts +++ b/src/frame/middleware/index.ts @@ -113,7 +113,7 @@ export default function (app: Express) { } // *** Observability *** - if (process.env.MODA_PROD_SERVICE_ENV) { + if (process.env.MODA_PROD_SERVICE_ENV === 'true') { app.use(datadog) } diff --git a/src/observability/lib/statsd.js b/src/observability/lib/statsd.js index 096201220b5c..1b2aaeb7551f 100644 --- a/src/observability/lib/statsd.js +++ b/src/observability/lib/statsd.js @@ -9,7 +9,7 @@ const { DD_AGENT_HOST, } = process.env -const mock = NODE_ENV === 'test' || !MODA_PROD_SERVICE_ENV +const mock = NODE_ENV === 'test' || MODA_PROD_SERVICE_ENV !== 'true' // MODA_APP_NAME gets set when the deploy target is Moda const modaApp = MODA_APP_NAME ? `moda_app_name:${MODA_APP_NAME}` : false diff --git a/src/observability/middleware/trigger-error.ts b/src/observability/middleware/trigger-error.ts index 1521cb3d3226..bcd1fee9157c 100644 --- a/src/observability/middleware/trigger-error.ts +++ b/src/observability/middleware/trigger-error.ts @@ -15,7 +15,8 @@ export default async function triggerError( // pattern used on async middleware! This is an intentional omission! // prevent this from being used in production - if (process.env.NODE_ENV === 'production' && process.env.MODA_PROD_SERVICE_ENV) return next() + if (process.env.NODE_ENV === 'production' && process.env.MODA_PROD_SERVICE_ENV === 'true') + return next() throw new Error('Intentional error') } From 2f10744ce38ab4fc83a03926519a77f79bb68c43 Mon Sep 17 00:00:00 2001 From: Steven Nunez Date: Tue, 21 Jan 2025 20:02:28 -0500 Subject: [PATCH 2/3] Create engineer specific staging environment (#54006) Co-authored-by: Kevin Heis --- .devcontainer/.gh-kustomize-version | 1 + .devcontainer/devcontainer.json | 11 +++- .devcontainer/on-create-command.sh | 1 + .devcontainer/post-create-command.sh | 1 + config/kubernetes/production/README.md | 9 +++ .../production/deployments/webapp.yaml | 50 +++++++--------- .../production/services/webapp.yaml | 15 ++--- .../kubernetes/staging-ashishkeshan/README.md | 9 +++ .../deployments/webapp.yaml | 51 +++++++++++++++++ .../staging-ashishkeshan/services/webapp.yaml | 19 +++++++ .../kubernetes/staging-ebonsignori/README.md | 9 +++ .../deployments/webapp.yaml | 51 +++++++++++++++++ .../staging-ebonsignori/services/webapp.yaml | 19 +++++++ .../kubernetes/staging-hectorsector/README.md | 9 +++ .../deployments/webapp.yaml | 51 +++++++++++++++++ .../staging-hectorsector/services/webapp.yaml | 19 +++++++ config/kubernetes/staging-heiskr/README.md | 9 +++ .../staging-heiskr/deployments/webapp.yaml | 51 +++++++++++++++++ .../staging-heiskr/services/webapp.yaml | 19 +++++++ config/kubernetes/staging-octosteve/README.md | 9 +++ .../staging-octosteve/deployments/webapp.yaml | 51 +++++++++++++++++ .../staging-octosteve/services/webapp.yaml | 19 +++++++ config/kubernetes/staging-rachmari/README.md | 9 +++ .../staging-rachmari/deployments/webapp.yaml | 51 +++++++++++++++++ .../staging-rachmari/services/webapp.yaml | 19 +++++++ .../kubernetes/staging-ronricardo/README.md | 9 +++ .../deployments/webapp.yaml | 51 +++++++++++++++++ .../staging-ronricardo/services/webapp.yaml | 19 +++++++ config/kubernetes/staging-saturn226/README.md | 9 +++ .../staging-saturn226/deployments/webapp.yaml | 51 +++++++++++++++++ .../staging-saturn226/services/webapp.yaml | 19 +++++++ config/kustomize/base/deployments/webapp.yaml | 57 +++++++++++++++++++ config/kustomize/base/kustomization.yaml | 6 ++ config/kustomize/base/services/webapp.yaml | 18 ++++++ .../overlays/production/kustomization.yaml | 20 +++++++ .../staging-ashishkeshan/kustomization.yaml | 14 +++++ .../staging-ebonsignori/kustomization.yaml | 14 +++++ .../staging-hectorsector/kustomization.yaml | 14 +++++ .../staging-heiskr/kustomization.yaml | 14 +++++ .../staging-octosteve/kustomization.yaml | 14 +++++ .../staging-rachmari/kustomization.yaml | 14 +++++ .../staging-ronricardo/kustomization.yaml | 14 +++++ .../staging-saturn226/kustomization.yaml | 14 +++++ 43 files changed, 894 insertions(+), 39 deletions(-) create mode 100644 .devcontainer/.gh-kustomize-version create mode 100755 .devcontainer/on-create-command.sh create mode 100755 .devcontainer/post-create-command.sh create mode 100644 config/kubernetes/production/README.md create mode 100644 config/kubernetes/staging-ashishkeshan/README.md create mode 100644 config/kubernetes/staging-ashishkeshan/deployments/webapp.yaml create mode 100644 config/kubernetes/staging-ashishkeshan/services/webapp.yaml create mode 100644 config/kubernetes/staging-ebonsignori/README.md create mode 100644 config/kubernetes/staging-ebonsignori/deployments/webapp.yaml create mode 100644 config/kubernetes/staging-ebonsignori/services/webapp.yaml create mode 100644 config/kubernetes/staging-hectorsector/README.md create mode 100644 config/kubernetes/staging-hectorsector/deployments/webapp.yaml create mode 100644 config/kubernetes/staging-hectorsector/services/webapp.yaml create mode 100644 config/kubernetes/staging-heiskr/README.md create mode 100644 config/kubernetes/staging-heiskr/deployments/webapp.yaml create mode 100644 config/kubernetes/staging-heiskr/services/webapp.yaml create mode 100644 config/kubernetes/staging-octosteve/README.md create mode 100644 config/kubernetes/staging-octosteve/deployments/webapp.yaml create mode 100644 config/kubernetes/staging-octosteve/services/webapp.yaml create mode 100644 config/kubernetes/staging-rachmari/README.md create mode 100644 config/kubernetes/staging-rachmari/deployments/webapp.yaml create mode 100644 config/kubernetes/staging-rachmari/services/webapp.yaml create mode 100644 config/kubernetes/staging-ronricardo/README.md create mode 100644 config/kubernetes/staging-ronricardo/deployments/webapp.yaml create mode 100644 config/kubernetes/staging-ronricardo/services/webapp.yaml create mode 100644 config/kubernetes/staging-saturn226/README.md create mode 100644 config/kubernetes/staging-saturn226/deployments/webapp.yaml create mode 100644 config/kubernetes/staging-saturn226/services/webapp.yaml create mode 100644 config/kustomize/base/deployments/webapp.yaml create mode 100644 config/kustomize/base/kustomization.yaml create mode 100644 config/kustomize/base/services/webapp.yaml create mode 100644 config/kustomize/overlays/production/kustomization.yaml create mode 100644 config/kustomize/overlays/staging-ashishkeshan/kustomization.yaml create mode 100644 config/kustomize/overlays/staging-ebonsignori/kustomization.yaml create mode 100644 config/kustomize/overlays/staging-hectorsector/kustomization.yaml create mode 100644 config/kustomize/overlays/staging-heiskr/kustomization.yaml create mode 100644 config/kustomize/overlays/staging-octosteve/kustomization.yaml create mode 100644 config/kustomize/overlays/staging-rachmari/kustomization.yaml create mode 100644 config/kustomize/overlays/staging-ronricardo/kustomization.yaml create mode 100644 config/kustomize/overlays/staging-saturn226/kustomization.yaml diff --git a/.devcontainer/.gh-kustomize-version b/.devcontainer/.gh-kustomize-version new file mode 100644 index 000000000000..7afb014ccd3f --- /dev/null +++ b/.devcontainer/.gh-kustomize-version @@ -0,0 +1 @@ +v3.0.5 \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8cf61fa80633..fbccf72d8a57 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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", diff --git a/.devcontainer/on-create-command.sh b/.devcontainer/on-create-command.sh new file mode 100755 index 000000000000..e6a08b6720f4 --- /dev/null +++ b/.devcontainer/on-create-command.sh @@ -0,0 +1 @@ +gh extension install github/gh-kustomize --pin "$(cat .devcontainer/.gh-kustomize-version)" || true \ No newline at end of file diff --git a/.devcontainer/post-create-command.sh b/.devcontainer/post-create-command.sh new file mode 100755 index 000000000000..385cb3aa69c1 --- /dev/null +++ b/.devcontainer/post-create-command.sh @@ -0,0 +1 @@ +npm ci diff --git a/config/kubernetes/production/README.md b/config/kubernetes/production/README.md new file mode 100644 index 000000000000..fd3dae385404 --- /dev/null +++ b/config/kubernetes/production/README.md @@ -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/). diff --git a/config/kubernetes/production/deployments/webapp.yaml b/config/kubernetes/production/deployments/webapp.yaml index fc0bfb0feb54..f5381c7f2b91 100644 --- a/config/kubernetes/production/deployments/webapp.yaml +++ b/config/kubernetes/production/deployments/webapp.yaml @@ -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 diff --git a/config/kubernetes/production/services/webapp.yaml b/config/kubernetes/production/services/webapp.yaml index 4c96ca5be8b5..8084da5107ac 100644 --- a/config/kubernetes/production/services/webapp.yaml +++ b/config/kubernetes/production/services/webapp.yaml @@ -1,17 +1,14 @@ +# This file was generated with Kustomize. Please do not edit manually. apiVersion: v1 kind: Service metadata: - name: webapp - 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" + moda.github.net/domain-name: docs.internal.github.com + moda.github.net/load-balancer-type: public-external-http + labels: + service: webapp + name: webapp spec: ports: - name: http diff --git a/config/kubernetes/staging-ashishkeshan/README.md b/config/kubernetes/staging-ashishkeshan/README.md new file mode 100644 index 000000000000..8eb202570ef0 --- /dev/null +++ b/config/kubernetes/staging-ashishkeshan/README.md @@ -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/). diff --git a/config/kubernetes/staging-ashishkeshan/deployments/webapp.yaml b/config/kubernetes/staging-ashishkeshan/deployments/webapp.yaml new file mode 100644 index 000000000000..f5381c7f2b91 --- /dev/null +++ b/config/kubernetes/staging-ashishkeshan/deployments/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-ashishkeshan/services/webapp.yaml b/config/kubernetes/staging-ashishkeshan/services/webapp.yaml new file mode 100644 index 000000000000..e3984e3be04c --- /dev/null +++ b/config/kubernetes/staging-ashishkeshan/services/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-ebonsignori/README.md b/config/kubernetes/staging-ebonsignori/README.md new file mode 100644 index 000000000000..c008192a40d8 --- /dev/null +++ b/config/kubernetes/staging-ebonsignori/README.md @@ -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/). diff --git a/config/kubernetes/staging-ebonsignori/deployments/webapp.yaml b/config/kubernetes/staging-ebonsignori/deployments/webapp.yaml new file mode 100644 index 000000000000..f5381c7f2b91 --- /dev/null +++ b/config/kubernetes/staging-ebonsignori/deployments/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-ebonsignori/services/webapp.yaml b/config/kubernetes/staging-ebonsignori/services/webapp.yaml new file mode 100644 index 000000000000..953545c0313b --- /dev/null +++ b/config/kubernetes/staging-ebonsignori/services/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-hectorsector/README.md b/config/kubernetes/staging-hectorsector/README.md new file mode 100644 index 000000000000..cb18061b1587 --- /dev/null +++ b/config/kubernetes/staging-hectorsector/README.md @@ -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/). diff --git a/config/kubernetes/staging-hectorsector/deployments/webapp.yaml b/config/kubernetes/staging-hectorsector/deployments/webapp.yaml new file mode 100644 index 000000000000..f5381c7f2b91 --- /dev/null +++ b/config/kubernetes/staging-hectorsector/deployments/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-hectorsector/services/webapp.yaml b/config/kubernetes/staging-hectorsector/services/webapp.yaml new file mode 100644 index 000000000000..9ab47d88a5ce --- /dev/null +++ b/config/kubernetes/staging-hectorsector/services/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-heiskr/README.md b/config/kubernetes/staging-heiskr/README.md new file mode 100644 index 000000000000..fa8a5e4e18df --- /dev/null +++ b/config/kubernetes/staging-heiskr/README.md @@ -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/). diff --git a/config/kubernetes/staging-heiskr/deployments/webapp.yaml b/config/kubernetes/staging-heiskr/deployments/webapp.yaml new file mode 100644 index 000000000000..f5381c7f2b91 --- /dev/null +++ b/config/kubernetes/staging-heiskr/deployments/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-heiskr/services/webapp.yaml b/config/kubernetes/staging-heiskr/services/webapp.yaml new file mode 100644 index 000000000000..18bc01b63385 --- /dev/null +++ b/config/kubernetes/staging-heiskr/services/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-octosteve/README.md b/config/kubernetes/staging-octosteve/README.md new file mode 100644 index 000000000000..7b5ff0808e34 --- /dev/null +++ b/config/kubernetes/staging-octosteve/README.md @@ -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/). diff --git a/config/kubernetes/staging-octosteve/deployments/webapp.yaml b/config/kubernetes/staging-octosteve/deployments/webapp.yaml new file mode 100644 index 000000000000..f5381c7f2b91 --- /dev/null +++ b/config/kubernetes/staging-octosteve/deployments/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-octosteve/services/webapp.yaml b/config/kubernetes/staging-octosteve/services/webapp.yaml new file mode 100644 index 000000000000..def0d2aaaed5 --- /dev/null +++ b/config/kubernetes/staging-octosteve/services/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-rachmari/README.md b/config/kubernetes/staging-rachmari/README.md new file mode 100644 index 000000000000..12709c14ae15 --- /dev/null +++ b/config/kubernetes/staging-rachmari/README.md @@ -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/). diff --git a/config/kubernetes/staging-rachmari/deployments/webapp.yaml b/config/kubernetes/staging-rachmari/deployments/webapp.yaml new file mode 100644 index 000000000000..f5381c7f2b91 --- /dev/null +++ b/config/kubernetes/staging-rachmari/deployments/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-rachmari/services/webapp.yaml b/config/kubernetes/staging-rachmari/services/webapp.yaml new file mode 100644 index 000000000000..9f2b78e24eca --- /dev/null +++ b/config/kubernetes/staging-rachmari/services/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-ronricardo/README.md b/config/kubernetes/staging-ronricardo/README.md new file mode 100644 index 000000000000..cd0a9cb700a3 --- /dev/null +++ b/config/kubernetes/staging-ronricardo/README.md @@ -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/). diff --git a/config/kubernetes/staging-ronricardo/deployments/webapp.yaml b/config/kubernetes/staging-ronricardo/deployments/webapp.yaml new file mode 100644 index 000000000000..f5381c7f2b91 --- /dev/null +++ b/config/kubernetes/staging-ronricardo/deployments/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-ronricardo/services/webapp.yaml b/config/kubernetes/staging-ronricardo/services/webapp.yaml new file mode 100644 index 000000000000..817000937c46 --- /dev/null +++ b/config/kubernetes/staging-ronricardo/services/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-saturn226/README.md b/config/kubernetes/staging-saturn226/README.md new file mode 100644 index 000000000000..33665743c371 --- /dev/null +++ b/config/kubernetes/staging-saturn226/README.md @@ -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/). diff --git a/config/kubernetes/staging-saturn226/deployments/webapp.yaml b/config/kubernetes/staging-saturn226/deployments/webapp.yaml new file mode 100644 index 000000000000..f5381c7f2b91 --- /dev/null +++ b/config/kubernetes/staging-saturn226/deployments/webapp.yaml @@ -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 diff --git a/config/kubernetes/staging-saturn226/services/webapp.yaml b/config/kubernetes/staging-saturn226/services/webapp.yaml new file mode 100644 index 000000000000..e5e9952bb37f --- /dev/null +++ b/config/kubernetes/staging-saturn226/services/webapp.yaml @@ -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 diff --git a/config/kustomize/base/deployments/webapp.yaml b/config/kustomize/base/deployments/webapp.yaml new file mode 100644 index 000000000000..fc0bfb0feb54 --- /dev/null +++ b/config/kustomize/base/deployments/webapp.yaml @@ -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 diff --git a/config/kustomize/base/kustomization.yaml b/config/kustomize/base/kustomization.yaml new file mode 100644 index 000000000000..457850241e3e --- /dev/null +++ b/config/kustomize/base/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - deployments/webapp.yaml + - services/webapp.yaml diff --git a/config/kustomize/base/services/webapp.yaml b/config/kustomize/base/services/webapp.yaml new file mode 100644 index 000000000000..47e40445f2dd --- /dev/null +++ b/config/kustomize/base/services/webapp.yaml @@ -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 diff --git a/config/kustomize/overlays/production/kustomization.yaml b/config/kustomize/overlays/production/kustomization.yaml new file mode 100644 index 000000000000..916847a55c89 --- /dev/null +++ b/config/kustomize/overlays/production/kustomization.yaml @@ -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' diff --git a/config/kustomize/overlays/staging-ashishkeshan/kustomization.yaml b/config/kustomize/overlays/staging-ashishkeshan/kustomization.yaml new file mode 100644 index 000000000000..e2fe8eb913c8 --- /dev/null +++ b/config/kustomize/overlays/staging-ashishkeshan/kustomization.yaml @@ -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' diff --git a/config/kustomize/overlays/staging-ebonsignori/kustomization.yaml b/config/kustomize/overlays/staging-ebonsignori/kustomization.yaml new file mode 100644 index 000000000000..8d375e87bfa0 --- /dev/null +++ b/config/kustomize/overlays/staging-ebonsignori/kustomization.yaml @@ -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' diff --git a/config/kustomize/overlays/staging-hectorsector/kustomization.yaml b/config/kustomize/overlays/staging-hectorsector/kustomization.yaml new file mode 100644 index 000000000000..ad3265d0d18c --- /dev/null +++ b/config/kustomize/overlays/staging-hectorsector/kustomization.yaml @@ -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' diff --git a/config/kustomize/overlays/staging-heiskr/kustomization.yaml b/config/kustomize/overlays/staging-heiskr/kustomization.yaml new file mode 100644 index 000000000000..2e409652e096 --- /dev/null +++ b/config/kustomize/overlays/staging-heiskr/kustomization.yaml @@ -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' diff --git a/config/kustomize/overlays/staging-octosteve/kustomization.yaml b/config/kustomize/overlays/staging-octosteve/kustomization.yaml new file mode 100644 index 000000000000..b2bbffb41886 --- /dev/null +++ b/config/kustomize/overlays/staging-octosteve/kustomization.yaml @@ -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' diff --git a/config/kustomize/overlays/staging-rachmari/kustomization.yaml b/config/kustomize/overlays/staging-rachmari/kustomization.yaml new file mode 100644 index 000000000000..e3c8a4f6136f --- /dev/null +++ b/config/kustomize/overlays/staging-rachmari/kustomization.yaml @@ -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' diff --git a/config/kustomize/overlays/staging-ronricardo/kustomization.yaml b/config/kustomize/overlays/staging-ronricardo/kustomization.yaml new file mode 100644 index 000000000000..1e7817b969ad --- /dev/null +++ b/config/kustomize/overlays/staging-ronricardo/kustomization.yaml @@ -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' diff --git a/config/kustomize/overlays/staging-saturn226/kustomization.yaml b/config/kustomize/overlays/staging-saturn226/kustomization.yaml new file mode 100644 index 000000000000..92ec75ef91b0 --- /dev/null +++ b/config/kustomize/overlays/staging-saturn226/kustomization.yaml @@ -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' From 6c789b8630d1b123c571133742f2536d3d6bc560 Mon Sep 17 00:00:00 2001 From: Evan Bonsignori Date: Tue, 21 Jan 2025 17:21:12 -0800 Subject: [PATCH 3/3] Revert "Create engineer specific staging environment" (#54052) --- .devcontainer/.gh-kustomize-version | 1 - .devcontainer/devcontainer.json | 11 +--- .devcontainer/on-create-command.sh | 1 - .devcontainer/post-create-command.sh | 1 - config/kubernetes/production/README.md | 9 --- .../production/deployments/webapp.yaml | 50 +++++++++------- .../production/services/webapp.yaml | 15 +++-- .../kubernetes/staging-ashishkeshan/README.md | 9 --- .../deployments/webapp.yaml | 51 ----------------- .../staging-ashishkeshan/services/webapp.yaml | 19 ------- .../kubernetes/staging-ebonsignori/README.md | 9 --- .../deployments/webapp.yaml | 51 ----------------- .../staging-ebonsignori/services/webapp.yaml | 19 ------- .../kubernetes/staging-hectorsector/README.md | 9 --- .../deployments/webapp.yaml | 51 ----------------- .../staging-hectorsector/services/webapp.yaml | 19 ------- config/kubernetes/staging-heiskr/README.md | 9 --- .../staging-heiskr/deployments/webapp.yaml | 51 ----------------- .../staging-heiskr/services/webapp.yaml | 19 ------- config/kubernetes/staging-octosteve/README.md | 9 --- .../staging-octosteve/deployments/webapp.yaml | 51 ----------------- .../staging-octosteve/services/webapp.yaml | 19 ------- config/kubernetes/staging-rachmari/README.md | 9 --- .../staging-rachmari/deployments/webapp.yaml | 51 ----------------- .../staging-rachmari/services/webapp.yaml | 19 ------- .../kubernetes/staging-ronricardo/README.md | 9 --- .../deployments/webapp.yaml | 51 ----------------- .../staging-ronricardo/services/webapp.yaml | 19 ------- config/kubernetes/staging-saturn226/README.md | 9 --- .../staging-saturn226/deployments/webapp.yaml | 51 ----------------- .../staging-saturn226/services/webapp.yaml | 19 ------- config/kustomize/base/deployments/webapp.yaml | 57 ------------------- config/kustomize/base/kustomization.yaml | 6 -- config/kustomize/base/services/webapp.yaml | 18 ------ .../overlays/production/kustomization.yaml | 20 ------- .../staging-ashishkeshan/kustomization.yaml | 14 ----- .../staging-ebonsignori/kustomization.yaml | 14 ----- .../staging-hectorsector/kustomization.yaml | 14 ----- .../staging-heiskr/kustomization.yaml | 14 ----- .../staging-octosteve/kustomization.yaml | 14 ----- .../staging-rachmari/kustomization.yaml | 14 ----- .../staging-ronricardo/kustomization.yaml | 14 ----- .../staging-saturn226/kustomization.yaml | 14 ----- 43 files changed, 39 insertions(+), 894 deletions(-) delete mode 100644 .devcontainer/.gh-kustomize-version delete mode 100755 .devcontainer/on-create-command.sh delete mode 100755 .devcontainer/post-create-command.sh delete mode 100644 config/kubernetes/production/README.md delete mode 100644 config/kubernetes/staging-ashishkeshan/README.md delete mode 100644 config/kubernetes/staging-ashishkeshan/deployments/webapp.yaml delete mode 100644 config/kubernetes/staging-ashishkeshan/services/webapp.yaml delete mode 100644 config/kubernetes/staging-ebonsignori/README.md delete mode 100644 config/kubernetes/staging-ebonsignori/deployments/webapp.yaml delete mode 100644 config/kubernetes/staging-ebonsignori/services/webapp.yaml delete mode 100644 config/kubernetes/staging-hectorsector/README.md delete mode 100644 config/kubernetes/staging-hectorsector/deployments/webapp.yaml delete mode 100644 config/kubernetes/staging-hectorsector/services/webapp.yaml delete mode 100644 config/kubernetes/staging-heiskr/README.md delete mode 100644 config/kubernetes/staging-heiskr/deployments/webapp.yaml delete mode 100644 config/kubernetes/staging-heiskr/services/webapp.yaml delete mode 100644 config/kubernetes/staging-octosteve/README.md delete mode 100644 config/kubernetes/staging-octosteve/deployments/webapp.yaml delete mode 100644 config/kubernetes/staging-octosteve/services/webapp.yaml delete mode 100644 config/kubernetes/staging-rachmari/README.md delete mode 100644 config/kubernetes/staging-rachmari/deployments/webapp.yaml delete mode 100644 config/kubernetes/staging-rachmari/services/webapp.yaml delete mode 100644 config/kubernetes/staging-ronricardo/README.md delete mode 100644 config/kubernetes/staging-ronricardo/deployments/webapp.yaml delete mode 100644 config/kubernetes/staging-ronricardo/services/webapp.yaml delete mode 100644 config/kubernetes/staging-saturn226/README.md delete mode 100644 config/kubernetes/staging-saturn226/deployments/webapp.yaml delete mode 100644 config/kubernetes/staging-saturn226/services/webapp.yaml delete mode 100644 config/kustomize/base/deployments/webapp.yaml delete mode 100644 config/kustomize/base/kustomization.yaml delete mode 100644 config/kustomize/base/services/webapp.yaml delete mode 100644 config/kustomize/overlays/production/kustomization.yaml delete mode 100644 config/kustomize/overlays/staging-ashishkeshan/kustomization.yaml delete mode 100644 config/kustomize/overlays/staging-ebonsignori/kustomization.yaml delete mode 100644 config/kustomize/overlays/staging-hectorsector/kustomization.yaml delete mode 100644 config/kustomize/overlays/staging-heiskr/kustomization.yaml delete mode 100644 config/kustomize/overlays/staging-octosteve/kustomization.yaml delete mode 100644 config/kustomize/overlays/staging-rachmari/kustomization.yaml delete mode 100644 config/kustomize/overlays/staging-ronricardo/kustomization.yaml delete mode 100644 config/kustomize/overlays/staging-saturn226/kustomization.yaml diff --git a/.devcontainer/.gh-kustomize-version b/.devcontainer/.gh-kustomize-version deleted file mode 100644 index 7afb014ccd3f..000000000000 --- a/.devcontainer/.gh-kustomize-version +++ /dev/null @@ -1 +0,0 @@ -v3.0.5 \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fbccf72d8a57..8cf61fa80633 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,8 +11,7 @@ // Install features. Type 'feature' in the VS Code command palette for a full list. "features": { - "ghcr.io/devcontainers/features/sshd:1": {}, - "ghcr.io/devcontainers/features/github-cli:1": {} + "sshd": "latest" }, "customizations": { @@ -44,11 +43,6 @@ "permissions": { "contents": "write" } - }, - "github/gh-kustomize": { - "permissions": { - "contents": "read" - } } } } @@ -63,9 +57,8 @@ } }, - "onCreateCommand": ".devcontainer/on-create-command.sh", // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": ".devcontainer/post-create-command.sh", + "postCreateCommand": "npm ci", // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "node", diff --git a/.devcontainer/on-create-command.sh b/.devcontainer/on-create-command.sh deleted file mode 100755 index e6a08b6720f4..000000000000 --- a/.devcontainer/on-create-command.sh +++ /dev/null @@ -1 +0,0 @@ -gh extension install github/gh-kustomize --pin "$(cat .devcontainer/.gh-kustomize-version)" || true \ No newline at end of file diff --git a/.devcontainer/post-create-command.sh b/.devcontainer/post-create-command.sh deleted file mode 100755 index 385cb3aa69c1..000000000000 --- a/.devcontainer/post-create-command.sh +++ /dev/null @@ -1 +0,0 @@ -npm ci diff --git a/config/kubernetes/production/README.md b/config/kubernetes/production/README.md deleted file mode 100644 index fd3dae385404..000000000000 --- a/config/kubernetes/production/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/). diff --git a/config/kubernetes/production/deployments/webapp.yaml b/config/kubernetes/production/deployments/webapp.yaml index f5381c7f2b91..fc0bfb0feb54 100644 --- a/config/kubernetes/production/deployments/webapp.yaml +++ b/config/kubernetes/production/deployments/webapp.yaml @@ -1,4 +1,3 @@ -# This file was generated with Kustomize. Please do not edit manually. apiVersion: apps/v1 kind: Deployment metadata: @@ -10,42 +9,49 @@ 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: - - envFrom: + - 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 - image: docs-internal + # 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' - name: webapp - ports: - - containerPort: 4000 - name: http - protocol: TCP + 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 - initialDelaySeconds: 5 - resources: - limits: - cpu: 16000m - memory: 14Gi - requests: - cpu: 8000m - memory: 10Gi - dnsPolicy: Default diff --git a/config/kubernetes/production/services/webapp.yaml b/config/kubernetes/production/services/webapp.yaml index 8084da5107ac..4c96ca5be8b5 100644 --- a/config/kubernetes/production/services/webapp.yaml +++ b/config/kubernetes/production/services/webapp.yaml @@ -1,14 +1,17 @@ -# This file was generated with Kustomize. Please do not edit manually. apiVersion: v1 kind: Service metadata: - 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 + name: webapp labels: service: webapp - name: 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" spec: ports: - name: http diff --git a/config/kubernetes/staging-ashishkeshan/README.md b/config/kubernetes/staging-ashishkeshan/README.md deleted file mode 100644 index 8eb202570ef0..000000000000 --- a/config/kubernetes/staging-ashishkeshan/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/). diff --git a/config/kubernetes/staging-ashishkeshan/deployments/webapp.yaml b/config/kubernetes/staging-ashishkeshan/deployments/webapp.yaml deleted file mode 100644 index f5381c7f2b91..000000000000 --- a/config/kubernetes/staging-ashishkeshan/deployments/webapp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-ashishkeshan/services/webapp.yaml b/config/kubernetes/staging-ashishkeshan/services/webapp.yaml deleted file mode 100644 index e3984e3be04c..000000000000 --- a/config/kubernetes/staging-ashishkeshan/services/webapp.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-ebonsignori/README.md b/config/kubernetes/staging-ebonsignori/README.md deleted file mode 100644 index c008192a40d8..000000000000 --- a/config/kubernetes/staging-ebonsignori/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/). diff --git a/config/kubernetes/staging-ebonsignori/deployments/webapp.yaml b/config/kubernetes/staging-ebonsignori/deployments/webapp.yaml deleted file mode 100644 index f5381c7f2b91..000000000000 --- a/config/kubernetes/staging-ebonsignori/deployments/webapp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-ebonsignori/services/webapp.yaml b/config/kubernetes/staging-ebonsignori/services/webapp.yaml deleted file mode 100644 index 953545c0313b..000000000000 --- a/config/kubernetes/staging-ebonsignori/services/webapp.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-hectorsector/README.md b/config/kubernetes/staging-hectorsector/README.md deleted file mode 100644 index cb18061b1587..000000000000 --- a/config/kubernetes/staging-hectorsector/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/). diff --git a/config/kubernetes/staging-hectorsector/deployments/webapp.yaml b/config/kubernetes/staging-hectorsector/deployments/webapp.yaml deleted file mode 100644 index f5381c7f2b91..000000000000 --- a/config/kubernetes/staging-hectorsector/deployments/webapp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-hectorsector/services/webapp.yaml b/config/kubernetes/staging-hectorsector/services/webapp.yaml deleted file mode 100644 index 9ab47d88a5ce..000000000000 --- a/config/kubernetes/staging-hectorsector/services/webapp.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-heiskr/README.md b/config/kubernetes/staging-heiskr/README.md deleted file mode 100644 index fa8a5e4e18df..000000000000 --- a/config/kubernetes/staging-heiskr/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/). diff --git a/config/kubernetes/staging-heiskr/deployments/webapp.yaml b/config/kubernetes/staging-heiskr/deployments/webapp.yaml deleted file mode 100644 index f5381c7f2b91..000000000000 --- a/config/kubernetes/staging-heiskr/deployments/webapp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-heiskr/services/webapp.yaml b/config/kubernetes/staging-heiskr/services/webapp.yaml deleted file mode 100644 index 18bc01b63385..000000000000 --- a/config/kubernetes/staging-heiskr/services/webapp.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-octosteve/README.md b/config/kubernetes/staging-octosteve/README.md deleted file mode 100644 index 7b5ff0808e34..000000000000 --- a/config/kubernetes/staging-octosteve/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/). diff --git a/config/kubernetes/staging-octosteve/deployments/webapp.yaml b/config/kubernetes/staging-octosteve/deployments/webapp.yaml deleted file mode 100644 index f5381c7f2b91..000000000000 --- a/config/kubernetes/staging-octosteve/deployments/webapp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-octosteve/services/webapp.yaml b/config/kubernetes/staging-octosteve/services/webapp.yaml deleted file mode 100644 index def0d2aaaed5..000000000000 --- a/config/kubernetes/staging-octosteve/services/webapp.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-rachmari/README.md b/config/kubernetes/staging-rachmari/README.md deleted file mode 100644 index 12709c14ae15..000000000000 --- a/config/kubernetes/staging-rachmari/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/). diff --git a/config/kubernetes/staging-rachmari/deployments/webapp.yaml b/config/kubernetes/staging-rachmari/deployments/webapp.yaml deleted file mode 100644 index f5381c7f2b91..000000000000 --- a/config/kubernetes/staging-rachmari/deployments/webapp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-rachmari/services/webapp.yaml b/config/kubernetes/staging-rachmari/services/webapp.yaml deleted file mode 100644 index 9f2b78e24eca..000000000000 --- a/config/kubernetes/staging-rachmari/services/webapp.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-ronricardo/README.md b/config/kubernetes/staging-ronricardo/README.md deleted file mode 100644 index cd0a9cb700a3..000000000000 --- a/config/kubernetes/staging-ronricardo/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/). diff --git a/config/kubernetes/staging-ronricardo/deployments/webapp.yaml b/config/kubernetes/staging-ronricardo/deployments/webapp.yaml deleted file mode 100644 index f5381c7f2b91..000000000000 --- a/config/kubernetes/staging-ronricardo/deployments/webapp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-ronricardo/services/webapp.yaml b/config/kubernetes/staging-ronricardo/services/webapp.yaml deleted file mode 100644 index 817000937c46..000000000000 --- a/config/kubernetes/staging-ronricardo/services/webapp.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-saturn226/README.md b/config/kubernetes/staging-saturn226/README.md deleted file mode 100644 index 33665743c371..000000000000 --- a/config/kubernetes/staging-saturn226/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# 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/). diff --git a/config/kubernetes/staging-saturn226/deployments/webapp.yaml b/config/kubernetes/staging-saturn226/deployments/webapp.yaml deleted file mode 100644 index f5381c7f2b91..000000000000 --- a/config/kubernetes/staging-saturn226/deployments/webapp.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# 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 diff --git a/config/kubernetes/staging-saturn226/services/webapp.yaml b/config/kubernetes/staging-saturn226/services/webapp.yaml deleted file mode 100644 index e5e9952bb37f..000000000000 --- a/config/kubernetes/staging-saturn226/services/webapp.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/config/kustomize/base/deployments/webapp.yaml b/config/kustomize/base/deployments/webapp.yaml deleted file mode 100644 index fc0bfb0feb54..000000000000 --- a/config/kustomize/base/deployments/webapp.yaml +++ /dev/null @@ -1,57 +0,0 @@ -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 diff --git a/config/kustomize/base/kustomization.yaml b/config/kustomize/base/kustomization.yaml deleted file mode 100644 index 457850241e3e..000000000000 --- a/config/kustomize/base/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - deployments/webapp.yaml - - services/webapp.yaml diff --git a/config/kustomize/base/services/webapp.yaml b/config/kustomize/base/services/webapp.yaml deleted file mode 100644 index 47e40445f2dd..000000000000 --- a/config/kustomize/base/services/webapp.yaml +++ /dev/null @@ -1,18 +0,0 @@ -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 diff --git a/config/kustomize/overlays/production/kustomization.yaml b/config/kustomize/overlays/production/kustomization.yaml deleted file mode 100644 index 916847a55c89..000000000000 --- a/config/kustomize/overlays/production/kustomization.yaml +++ /dev/null @@ -1,20 +0,0 @@ -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' diff --git a/config/kustomize/overlays/staging-ashishkeshan/kustomization.yaml b/config/kustomize/overlays/staging-ashishkeshan/kustomization.yaml deleted file mode 100644 index e2fe8eb913c8..000000000000 --- a/config/kustomize/overlays/staging-ashishkeshan/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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' diff --git a/config/kustomize/overlays/staging-ebonsignori/kustomization.yaml b/config/kustomize/overlays/staging-ebonsignori/kustomization.yaml deleted file mode 100644 index 8d375e87bfa0..000000000000 --- a/config/kustomize/overlays/staging-ebonsignori/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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' diff --git a/config/kustomize/overlays/staging-hectorsector/kustomization.yaml b/config/kustomize/overlays/staging-hectorsector/kustomization.yaml deleted file mode 100644 index ad3265d0d18c..000000000000 --- a/config/kustomize/overlays/staging-hectorsector/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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' diff --git a/config/kustomize/overlays/staging-heiskr/kustomization.yaml b/config/kustomize/overlays/staging-heiskr/kustomization.yaml deleted file mode 100644 index 2e409652e096..000000000000 --- a/config/kustomize/overlays/staging-heiskr/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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' diff --git a/config/kustomize/overlays/staging-octosteve/kustomization.yaml b/config/kustomize/overlays/staging-octosteve/kustomization.yaml deleted file mode 100644 index b2bbffb41886..000000000000 --- a/config/kustomize/overlays/staging-octosteve/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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' diff --git a/config/kustomize/overlays/staging-rachmari/kustomization.yaml b/config/kustomize/overlays/staging-rachmari/kustomization.yaml deleted file mode 100644 index e3c8a4f6136f..000000000000 --- a/config/kustomize/overlays/staging-rachmari/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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' diff --git a/config/kustomize/overlays/staging-ronricardo/kustomization.yaml b/config/kustomize/overlays/staging-ronricardo/kustomization.yaml deleted file mode 100644 index 1e7817b969ad..000000000000 --- a/config/kustomize/overlays/staging-ronricardo/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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' diff --git a/config/kustomize/overlays/staging-saturn226/kustomization.yaml b/config/kustomize/overlays/staging-saturn226/kustomization.yaml deleted file mode 100644 index 92ec75ef91b0..000000000000 --- a/config/kustomize/overlays/staging-saturn226/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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'