diff --git a/.buildkite/install-helm.sh b/.buildkite/install-helm.sh deleted file mode 100755 index 225dd15749e5..000000000000 --- a/.buildkite/install-helm.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [ ! $(which helm) ]; then - echo "Installing helm to /usr/local/bin" - rm -rf /tmp/helm - mkdir -p /tmp/helm - wget -O /tmp/helm/helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v2.9.1-linux-amd64.tar.gz - tar -xvzf /tmp/helm/helm.tar.gz -C /tmp/helm - mv /tmp/helm/linux-amd64/helm /usr/local/bin -fi diff --git a/.buildkite/install-yj.sh b/.buildkite/install-yj.sh new file mode 100755 index 000000000000..d668f14f6582 --- /dev/null +++ b/.buildkite/install-yj.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +VERSION=1.0.0 + +if [ ! $(which yj) ]; then + echo "Installing yj to /usr/local/bin" + wget https://github.com/sourcegraph/yj/releases/download/v${VERSION}/yj-${VERSION}-linux-amd64 -O /usr/local/bin/yj + chmod a+x /usr/local/bin/yj +fi diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 83631bb66a0d..d8d4d6943249 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,5 +1,5 @@ steps: - - label: ":helm:" - command: .buildkite/verify-generated.sh - label: ":k8s:" - command: .buildkite/verify-valid.sh + command: .buildkite/verify-yaml.sh + - label: ":k8s:" + command: .buildkite/verify-label.sh diff --git a/.buildkite/verify-generated.sh b/.buildkite/verify-generated.sh deleted file mode 100755 index 271169dc6edb..000000000000 --- a/.buildkite/verify-generated.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e -cd "$(dirname "${BASH_SOURCE[0]}")/.." - -.buildkite/install-helm.sh - -# Ensure examples are re-generated. - -echo "Ensuring examples are consistent with Helm chart..." - -export GIT_PAGER=cat -working_copy_hash=$((git diff; git status) | (md5sum || md5) 2> /dev/null) -examples/generate.sh -test-cases/generate.sh -new_working_copy_hash=$((git diff; git status) | (md5sum || md5) 2> /dev/null) - -if [[ ${working_copy_hash} = ${new_working_copy_hash} ]]; then - echo "SUCCESS: generate did not change the working copy" -else - echo "FAIL: generate changed the working copy" - git diff - git status - exit 2 -fi diff --git a/.buildkite/verify-label.sh b/.buildkite/verify-label.sh new file mode 100755 index 000000000000..b5ae94c59681 --- /dev/null +++ b/.buildkite/verify-label.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -ex + +cd "$(dirname "${BASH_SOURCE[0]}")/.." + +.buildkite/install-yj.sh + +if find base -name "*.yaml" -exec sh -c "cat {} | yj | jq --raw-output '.metadata.labels.deploy'" \; | tee /tmp/deploy-label | grep -v sourcegraph; then + echo "> There exists a yaml file in base/ that does not contain .metadata.labels.deploy == sourcegraph" + echo "> Run the following command to fix:" + echo "find base/ -name \"*.yaml\" -exec sh -c \"cat {} | yj | jq '.metadata.labels.deploy = \\\"sourcegraph\\\"' | jy -o {}\" \;" + + exit 1 +fi diff --git a/.buildkite/verify-valid.sh b/.buildkite/verify-valid.sh deleted file mode 100755 index c118f8ea3bf9..000000000000 --- a/.buildkite/verify-valid.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e -cd "$(dirname "${BASH_SOURCE[0]}")/.." - -.buildkite/install-kubeval.sh - -# Can't use xargs since kubeval ignores args if stdin is not a tty. xargs in -# busybox doesn't support -o to make stdin a tty. -kubeval $(find examples -path '*/generated/*.yaml') -kubeval $(find test-cases -path '*/generated/*.yaml') diff --git a/.buildkite/verify-yaml.sh b/.buildkite/verify-yaml.sh new file mode 100755 index 000000000000..3085bf264caf --- /dev/null +++ b/.buildkite/verify-yaml.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -ex +cd "$(dirname "${BASH_SOURCE[0]}")/.." + +.buildkite/install-kubeval.sh + +find base -name '*.yaml' -exec kubeval {} + +find configure -name '*.yaml' -exec kubeval {} + + +.buildkite/verify-label.sh diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 93902c7063a4..000000000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -examples/*/generated/** linguist-generated=true -test-cases/*/generated/** linguist-generated=true diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..274fb35cf079 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +generated/ + diff --git a/.helmignore b/.helmignore deleted file mode 100644 index f0c131944441..000000000000 --- a/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000000..ffb2de8ddfd3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "[yaml]": { + "editor.formatOnSave": false + } +} diff --git a/.vscode/tags b/.vscode/tags new file mode 100644 index 000000000000..b7424e64741d --- /dev/null +++ b/.vscode/tags @@ -0,0 +1,7 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ +!_TAG_PROGRAM_AUTHOR Universal Ctags Team // +!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ +!_TAG_PROGRAM_URL https://ctags.io/ /official site/ +!_TAG_PROGRAM_VERSION 0.0.0 /e5c86f7/ diff --git a/Chart.yaml b/Chart.yaml deleted file mode 100644 index 056e02693f21..000000000000 --- a/Chart.yaml +++ /dev/null @@ -1,3 +0,0 @@ -name: sourcegraph -version: dev -home: https://sourcegraph.com diff --git a/README.dev.md b/README.dev.md index 8e03128afcb4..0d815148773c 100644 --- a/README.dev.md +++ b/README.dev.md @@ -2,24 +2,28 @@ ## Cutting a release -- Make the desired changes to this repository. Most commonly, this involves updating the Docker image versions in `values.yaml` to match the tagged version you are releasing. For images like language servers, you should look at our - [container registry](https://console.cloud.google.com/gcr/images/sourcegraph-dev?project=sourcegraph-dev) to see what the latest versions are. +- Make the desired changes to this repository. Most commonly, this involves updating the Docker image versions in `*.Deployment.yaml` to match the tagged version you are releasing. You should look at our + [DockerHub repositories](https://hub.docker.com/r/sourcegraph/) to see what the latest versions are. -- Run `./generate.sh`. - Open a PR and wait for buildkite to pass and for your changes to be approved, then merge and check out master. -- Test this release on a fresh cluster before cutting a real release. Cut a test release (`LATEST=false ./release $TEST_VERSION`), then use the instructions [in this installation doc](docs/install.md) to set up a new cluster. (Make sure that you use the helm charts located at https://github.com/sourcegraph/datacenter/archive/$TEST_VERSION.tar.gz). -- Run `./release.sh $VERSION`. - - If this is a patch version to a previous major/minor version, use `LATEST=false ./release.sh $VERSION`. - - If this is a release candidate, run `LATEST=false ./release {$VERSION}-pre${N}` where `N` starts - at 0 and increments as you test/cut new versions. -- [Update the `latestReleaseDataCenterBuild` value in `sourcegraph/sourcegraph`](https://sourcegraph.sgdev.org/github.com/sourcegraph/sourcegraph/-/blob/cmd/server/README.md#5-notify-existing-instances-that-an-update-is-available) +- Test what is currently checked in to master by [installing](docs/install.md) Sourcegraph on fresh cluster. +- Create a git tag and push it to the repository: + + ```bash + VERSION = vX.Y.Z -See `./release.sh --help` for information on what the script does. + # If this is a release candidate: VERSION = `vX.Y.Z-pre${N}` (where `N` starts at 0 and increments as you test/cut new versions) + # 🚨 Make sure that you have the commit that you want to tag as $VERSION checked out! + git tag $VERSION + git push origin $VERSION + ``` -## Development tips +- Cut the legacy Helm version of the release (this step will be deprecated after the next iteration): + - checkout [deploy-sourcegraph@helm-legacy](https://github.com/sourcegraph/deploy-sourcegraph/tree/helm-legacy) + - update the image tags in [yalues.yaml](https://github.com/sourcegraph/deploy-sourcegraph/blob/helm-legacy/values.yaml) + - run [generate.sh](https://github.com/sourcegraph/deploy-sourcegraph/blob/helm-legacy/generate.sh) + - run [release.sh](https://github.com/sourcegraph/deploy-sourcegraph/blob/helm-legacy/release.sh) -- Whitespace in Helm templates can be tricky. When embedding the contents of a helper template, use - the form `{{- include "myHelper" $arg | nindent $indent }}`. - - If the output of the helper template could be empty, use `{{- include "myHelper" $arg | nindent $indent | trimSuffix "\n " }}`, where the argument to `trimSuffix` has $indent spaces. +- [Update the `latestReleaseDataCenterBuild` value in `sourcegraph/sourcegraph`](https://sourcegraph.sgdev.org/github.com/sourcegraph/sourcegraph/-/blob/cmd/server/README.md#5-notify-existing-instances-that-an-update-is-available) diff --git a/README.md b/README.md index 9086b43e3601..29d65d76ea16 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ +> 🚨 If you are updating from a 2.10.x or previous deployment, follow the migration steps in [docs/migrate.md](docs/migrate.md). + # Sourcegraph Data Center Sourcegraph Data Center is for organizations that need highly scalable and available code search and code intelligence. This repository contains documentation for creating, updating, and maintaining a -Sourcegraph Data Center cluster. +Sourcegraph Data Center cluster using Kubernetes. For product and [pricing](https://about.sourcegraph.com/pricing/) information, visit [about.sourcegraph.com](https://about.sourcegraph.com) @@ -10,16 +12,15 @@ or [contact us](https://about.sourcegraph.com/contact/sales) for more informatio starting out, we recommend installing [Sourcegraph](https://about.sourcegraph.com/docs) on a single node first. Migrating to Data Center is easy when you're ready. -- [Installation](docs/install.md) +- [Installing](docs/install.md) +- [Configuring](docs/configure.md) - [Updating](docs/update.md) -- [Scaling](/docs/scale.md) -- [Troubleshooting](/docs/troubleshoot.md) -- [Admin guide](/docs/admin-guide.md) - useful guide for Sourcegraph admins - - [Prometheus metrics](/docs/prom-metrics.md) - list of all Prometheus metrics that can be used for +- [Scaling](docs/scale.md) +- [Troubleshooting](docs/troubleshoot.md) +- [Admin guide](docs/admin-guide.md) - useful guide for Sourcegraph admins + - [Prometheus metrics](docs/prom-metrics.md) - list of all Prometheus metrics that can be used for application performance monitoring ## Contributing -We've made this Helm chart open source to better serve our customers' needs. If there is a -configuration point or Kubernetes option you would like to add, we would love to incorporate -it. Pull requests and issues are reviewed and responded to quickly. +We've made our deployment configurations open source to better serve our customers' needs. If there is anything we can do to make deploying Sourcegraph easier just open an issue or a pull request and we will respond promptly! diff --git a/examples/aws/generated/sourcegraph/templates/backend.Service.yaml b/base/backend.Service.yaml similarity index 65% rename from examples/aws/generated/sourcegraph/templates/backend.Service.yaml rename to base/backend.Service.yaml index 1a7206083b03..f52953a2ec89 100644 --- a/examples/aws/generated/sourcegraph/templates/backend.Service.yaml +++ b/base/backend.Service.yaml @@ -1,11 +1,12 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml apiVersion: v1 kind: Service metadata: + annotations: + description: Dummy service that prevents backend pods from being scheduled on + the same node if possible. labels: - group: backend deploy: sourcegraph + group: backend name: backend spec: clusterIP: None diff --git a/base/config-file.ConfigMap.yaml b/base/config-file.ConfigMap.yaml new file mode 100644 index 000000000000..3c1edf99e65f --- /dev/null +++ b/base/config-file.ConfigMap.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +data: + config.json: |- + { + // Publicly accessible URL to web app (e.g., what you type into your browser). + "appURL": "http://localhost:3080", + + // The authentication provider to use for identifying and signing in users. Only one entry is supported. + // + // The builtin auth provider with signup disallowed (shown below) means that after the initial site admin signs in, all other users must be invited. + // + // Other providers are documented here: + // https://about.sourcegraph.com/docs/config/site#authproviders-array + "auth.providers": [{"type": "builtin", "allowSignup": false}], + } +kind: ConfigMap +metadata: + labels: + deploy: sourcegraph + name: config-file diff --git a/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/base/frontend/sourcegraph-frontend-internal.Service.yaml similarity index 100% rename from templates/frontend/sourcegraph-frontend-internal.Service.yaml rename to base/frontend/sourcegraph-frontend-internal.Service.yaml diff --git a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/base/frontend/sourcegraph-frontend.Deployment.yaml similarity index 75% rename from examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml rename to base/frontend/sourcegraph-frontend.Deployment.yaml index f5ccbf25c18a..65a942066d19 100644 --- a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ b/base/frontend/sourcegraph-frontend.Deployment.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -26,8 +24,8 @@ spec: - args: - serve env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 + - name: SOURCEGRAPH_CONFIG_FILE + value: /etc/sourcegraph/config.json - name: DEPLOY_TYPE value: datacenter - name: LSP_PROXY @@ -44,19 +42,27 @@ spec: value: sg - name: PUBLIC_REPO_REDIRECTS value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/frontend:2.10.1 + value: gitserver-0.gitserver:3178 + # See the customization guide (../../../docs/configure.md) for information + # about how to configure Sourcegraph to use TLS + # - name: TLS_CERT + # valueFrom: + # secretKeyRef: + # key: cert + # name: tls + # - name: TLS_KEY + # valueFrom: + # secretKeyRef: + # key: key + # name: tls + image: sourcegraph/frontend:2.11.0 livenessProbe: httpGet: path: /healthz port: http scheme: HTTP - initialDelaySeconds: 5 + initialDelaySeconds: 60 timeoutSeconds: 5 name: frontend ports: @@ -69,10 +75,10 @@ spec: resources: limits: cpu: "2" - memory: "2G" + memory: 2G requests: cpu: "2" - memory: "1G" + memory: 1G volumeMounts: - mountPath: /etc/sourcegraph name: sg-config diff --git a/templates/frontend/sourcegraph-frontend.Role.yaml b/base/frontend/sourcegraph-frontend.Role.yaml similarity index 79% rename from templates/frontend/sourcegraph-frontend.Role.yaml rename to base/frontend/sourcegraph-frontend.Role.yaml index d9b097b259cd..1ef566496162 100644 --- a/templates/frontend/sourcegraph-frontend.Role.yaml +++ b/base/frontend/sourcegraph-frontend.Role.yaml @@ -1,10 +1,9 @@ -{{- if ne .Values.cluster.rbac "disabled" -}} apiVersion: rbac.authorization.k8s.io/v1beta1 kind: Role metadata: - name: sourcegraph-frontend labels: deploy: sourcegraph + name: sourcegraph-frontend rules: - apiGroups: - "" @@ -14,4 +13,3 @@ rules: - get - list - watch -{{ end -}} diff --git a/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/base/frontend/sourcegraph-frontend.RoleBinding.yaml similarity index 78% rename from templates/frontend/sourcegraph-frontend.RoleBinding.yaml rename to base/frontend/sourcegraph-frontend.RoleBinding.yaml index d0ac5d4f8009..d334dc522e34 100644 --- a/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ b/base/frontend/sourcegraph-frontend.RoleBinding.yaml @@ -1,10 +1,9 @@ -{{- if ne .Values.cluster.rbac "disabled" }} apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding metadata: - name: sourcegraph-frontend - labels: + labels: deploy: sourcegraph + name: sourcegraph-frontend roleRef: apiGroup: "" kind: Role @@ -12,4 +11,3 @@ roleRef: subjects: - kind: ServiceAccount name: sourcegraph-frontend -{{ end -}} diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/base/frontend/sourcegraph-frontend.Service.yaml similarity index 81% rename from examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml rename to base/frontend/sourcegraph-frontend.Service.yaml index d66e805fb728..ce91c1524827 100644 --- a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ b/base/frontend/sourcegraph-frontend.Service.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml apiVersion: v1 kind: Service metadata: @@ -16,6 +14,10 @@ spec: nodePort: 30080 port: 30080 targetPort: http + - name: https + nodePort: 30081 + port: 30081 + targetPort: https selector: app: sourcegraph-frontend type: NodePort diff --git a/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/base/frontend/sourcegraph-frontend.ServiceAccount.yaml similarity index 91% rename from templates/frontend/sourcegraph-frontend.ServiceAccount.yaml rename to base/frontend/sourcegraph-frontend.ServiceAccount.yaml index 67a49f2d2dcc..131e5c890419 100644 --- a/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ b/base/frontend/sourcegraph-frontend.ServiceAccount.yaml @@ -3,6 +3,6 @@ imagePullSecrets: - name: docker-registry kind: ServiceAccount metadata: - name: sourcegraph-frontend - labels: + labels: deploy: sourcegraph + name: sourcegraph-frontend diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/base/github-proxy/github-proxy.Deployment.yaml similarity index 80% rename from examples/manual-storage-class/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml rename to base/github-proxy/github-proxy.Deployment.yaml index 7f5b9482aa42..94c0e8e4bd05 100644 --- a/examples/manual-storage-class/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ b/base/github-proxy/github-proxy.Deployment.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: Rate-limiting proxy for the GitHub API. - labels: + labels: deploy: sourcegraph name: github-proxy spec: @@ -24,13 +22,11 @@ spec: spec: containers: - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: LOG_REQUESTS - value: "true" - name: SOURCEGRAPH_CONFIG_FILE value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 + - name: LOG_REQUESTS + value: "true" + image: sourcegraph/github-proxy:2.11.0 name: github-proxy ports: - containerPort: 3180 diff --git a/templates/github-proxy/github-proxy.Service.yaml b/base/github-proxy/github-proxy.Service.yaml similarity index 100% rename from templates/github-proxy/github-proxy.Service.yaml rename to base/github-proxy/github-proxy.Service.yaml diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/backend.Service.yaml b/base/gitserver/gitserver.Service.yaml similarity index 50% rename from examples/custom-env-vars/generated/sourcegraph/templates/backend.Service.yaml rename to base/gitserver/gitserver.Service.yaml index 1a7206083b03..0b86a69a5791 100644 --- a/examples/custom-env-vars/generated/sourcegraph/templates/backend.Service.yaml +++ b/base/gitserver/gitserver.Service.yaml @@ -1,12 +1,13 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml apiVersion: v1 kind: Service metadata: + annotations: + description: Headless service that provides a stable network identity for the + gitserver stateful set. labels: - group: backend deploy: sourcegraph - name: backend + type: gitserver + name: gitserver spec: clusterIP: None ports: @@ -14,5 +15,5 @@ spec: port: 10811 targetPort: 10811 selector: - group: backend + type: gitserver type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/base/gitserver/gitserver.StatefulSet.yaml similarity index 50% rename from examples/gcp/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml rename to base/gitserver/gitserver.StatefulSet.yaml index 521205257892..e49c77b7b309 100644 --- a/examples/gcp/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ b/base/gitserver/gitserver.StatefulSet.yaml @@ -1,26 +1,22 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment +apiVersion: apps/v1 +kind: StatefulSet metadata: annotations: description: Stores clones of repositories to perform Git operations. - labels: + labels: deploy: sourcegraph - name: gitserver-1 + name: gitserver spec: - minReadySeconds: 10 replicas: 1 revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate + selector: + matchLabels: + app: gitserver + serviceName: gitserver template: metadata: labels: - app: gitserver-1 + app: gitserver group: backend type: gitserver spec: @@ -28,34 +24,36 @@ spec: - args: - run env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - name: SOURCEGRAPH_CONFIG_FILE value: /etc/sourcegraph/config.json - name: SRC_REPOS_DIR value: /data/repos - image: sourcegraph/gitserver:2.10.1 + image: sourcegraph/gitserver:2.11.0 livenessProbe: initialDelaySeconds: 5 tcpSocket: port: rpc timeoutSeconds: 5 - name: gitserver-1 + name: gitserver ports: - containerPort: 3178 name: rpc resources: limits: cpu: "4" - memory: "8G" + memory: 8G requests: - cpu: "500m" - memory: "1G" + cpu: 500m + memory: 1G volumeMounts: - mountPath: /etc/sourcegraph name: sg-config - mountPath: /data/repos name: repos + # See the customization guide (../../../docs/configure.md) for information + # about configuring gitserver to use an SSH key + # - mountPath: /root/.ssh + # name: ssh securityContext: runAsUser: 0 volumes: @@ -64,6 +62,22 @@ spec: name: config-file name: sg-config - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - + # See the customization guide (../../../docs/configure.md) for information + # about configuring gitserver to use an SSH key + # - name: ssh + # secret: + # defaultMode: 384 + # secretName: gitserver-ssh + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - metadata: + name: repos + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + # The size of disk used to mirror your git repositories. + # If you change this, also change indexed-search's disk size. + storage: 200Gi diff --git a/examples/gcp/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/base/indexed-search/indexed-search.Deployment.yaml similarity index 85% rename from examples/gcp/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml rename to base/indexed-search/indexed-search.Deployment.yaml index f66a1cb62dbb..335d2e8666b9 100644 --- a/examples/gcp/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ b/base/indexed-search/indexed-search.Deployment.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: Backend for indexed text search operations. - labels: + labels: deploy: sourcegraph name: indexed-search spec: @@ -44,10 +42,10 @@ spec: resources: limits: cpu: "2" - memory: "4G" + memory: 4G requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /data name: disk @@ -69,12 +67,14 @@ spec: - containerPort: 6072 name: index-http resources: + # zoekt-indexserver is CPU bound. The more CPU you allocate to it, the + # lower lag between a new commit and it being indexed for search. limits: cpu: "4" - memory: "4G" + memory: 4G requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /data name: disk diff --git a/examples/gcp/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/base/indexed-search/indexed-search.PersistentVolumeClaim.yaml similarity index 51% rename from examples/gcp/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml rename to base/indexed-search/indexed-search.PersistentVolumeClaim.yaml index de07b9bd8199..840904e2e984 100644 --- a/examples/gcp/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ b/base/indexed-search/indexed-search.PersistentVolumeClaim.yaml @@ -1,11 +1,7 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: + labels: deploy: sourcegraph name: indexed-search spec: @@ -13,4 +9,6 @@ spec: - ReadWriteOnce resources: requests: + # The size of disk to used for search indexes. + # This should typically be gitserver disk size multipled by the number of gitserver shards. storage: 200Gi diff --git a/templates/indexed-search/indexed-search.Service.yaml b/base/indexed-search/indexed-search.Service.yaml similarity index 100% rename from templates/indexed-search/indexed-search.Service.yaml rename to base/indexed-search/indexed-search.Service.yaml diff --git a/examples/gcp/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/base/indexer/indexer.Deployment.yaml similarity index 82% rename from examples/gcp/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml rename to base/indexer/indexer.Deployment.yaml index 876e7df9ee22..aba9c03d7882 100644 --- a/examples/gcp/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ b/base/indexer/indexer.Deployment.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: Asynchronous indexing for global references. - labels: + labels: deploy: sourcegraph name: indexer spec: @@ -24,8 +22,8 @@ spec: spec: containers: - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 + - name: SOURCEGRAPH_CONFIG_FILE + value: /etc/sourcegraph/config.json - name: LSP_PROXY value: lsp-proxy:4388 - name: PGDATABASE @@ -38,11 +36,9 @@ spec: value: disable - name: PGUSER value: sg - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 + value: gitserver-0.gitserver:3178 + image: sourcegraph/indexer:2.11.0 name: indexer ports: - containerPort: 3179 diff --git a/templates/indexer/indexer.Service.yaml b/base/indexer/indexer.Service.yaml similarity index 100% rename from templates/indexer/indexer.Service.yaml rename to base/indexer/indexer.Service.yaml diff --git a/examples/aws/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/base/lsp-proxy/lsp-proxy.Deployment.yaml similarity index 81% rename from examples/aws/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml rename to base/lsp-proxy/lsp-proxy.Deployment.yaml index e7d34a4b412c..f1f3daf89853 100644 --- a/examples/aws/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ b/base/lsp-proxy/lsp-proxy.Deployment.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -26,19 +24,17 @@ spec: - args: - -addr=:4388 env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - name: SOURCEGRAPH_CONFIG_FILE value: /etc/sourcegraph/config.json - name: SRC_GIT_SERVERS - value: gitserver-1:3178 + value: gitserver-0.gitserver:3178 - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: CACHE_DIR value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 + image: sourcegraph/lsp-proxy:2.11.0 livenessProbe: initialDelaySeconds: 5 tcpSocket: @@ -56,10 +52,10 @@ spec: resources: limits: cpu: "1" - memory: "8Gi" + memory: 8Gi requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /etc/sourcegraph name: sg-config diff --git a/templates/lsp-proxy/lsp-proxy.Service.yaml b/base/lsp-proxy/lsp-proxy.Service.yaml similarity index 100% rename from templates/lsp-proxy/lsp-proxy.Service.yaml rename to base/lsp-proxy/lsp-proxy.Service.yaml diff --git a/examples/aws/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml b/base/pgsql/pgsql.Deployment.yaml similarity index 93% rename from examples/aws/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml rename to base/pgsql/pgsql.Deployment.yaml index 00c91f08b799..041d2ad7d9ba 100644 --- a/examples/aws/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml +++ b/base/pgsql/pgsql.Deployment.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: Postgres database for various data. - labels: + labels: deploy: sourcegraph name: pgsql spec: @@ -60,7 +58,6 @@ spec: requests: cpu: 10m memory: 50Mi - volumeMounts: securityContext: runAsUser: 0 volumes: diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/base/pgsql/pgsql.PersistentVolumeClaim.yaml similarity index 56% rename from examples/manual-storage-class/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml rename to base/pgsql/pgsql.PersistentVolumeClaim.yaml index 095a470d4c17..17ff3f9bad51 100644 --- a/examples/manual-storage-class/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ b/base/pgsql/pgsql.PersistentVolumeClaim.yaml @@ -1,10 +1,6 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default labels: deploy: sourcegraph name: pgsql diff --git a/templates/pgsql/pgsql.Service.yaml b/base/pgsql/pgsql.Service.yaml similarity index 83% rename from templates/pgsql/pgsql.Service.yaml rename to base/pgsql/pgsql.Service.yaml index b87fb2566816..465349bc394d 100644 --- a/templates/pgsql/pgsql.Service.yaml +++ b/base/pgsql/pgsql.Service.yaml @@ -1,4 +1,3 @@ -{{- if not (hasKey .Values.cluster "postgreSQL") -}} apiVersion: v1 kind: Service metadata: @@ -17,4 +16,3 @@ spec: selector: app: pgsql type: ClusterIP -{{end}} \ No newline at end of file diff --git a/examples/aws/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/base/query-runner/query-runner.Deployment.yaml similarity index 76% rename from examples/aws/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml rename to base/query-runner/query-runner.Deployment.yaml index 4e9a58c35004..4a55c1864019 100644 --- a/examples/aws/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ b/base/query-runner/query-runner.Deployment.yaml @@ -1,13 +1,9 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: Saved search query runner / notification service. - labels: + labels: deploy: sourcegraph name: query-runner spec: @@ -26,15 +22,11 @@ spec: spec: containers: - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: DEPLOY_TYPE - value: datacenter - name: SOURCEGRAPH_CONFIG_FILE value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - image: sourcegraph/query-runner:2.10.1 + - name: DEPLOY_TYPE + value: datacenter + image: sourcegraph/query-runner:2.11.0 name: query-runner ports: - containerPort: 3183 diff --git a/templates/query-runner/query-runner.Service.yaml b/base/query-runner/query-runner.Service.yaml similarity index 100% rename from templates/query-runner/query-runner.Service.yaml rename to base/query-runner/query-runner.Service.yaml diff --git a/examples/aws/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml b/base/redis/redis-cache.ConfigMap.yaml similarity index 83% rename from examples/aws/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml rename to base/redis/redis-cache.ConfigMap.yaml index d2899ab68ade..a4c5b44d75bd 100644 --- a/examples/aws/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml +++ b/base/redis/redis-cache.ConfigMap.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.ConfigMap.yaml apiVersion: v1 data: redis.conf: | @@ -15,6 +13,6 @@ data: save 60 1 kind: ConfigMap metadata: - name: redis-cache labels: deploy: sourcegraph + name: redis-cache diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml b/base/redis/redis-cache.Deployment.yaml similarity index 94% rename from examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml rename to base/redis/redis-cache.Deployment.yaml index 7db56c45089d..1299fc50d614 100644 --- a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml +++ b/base/redis/redis-cache.Deployment.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -27,18 +25,18 @@ spec: - redis-server - /etc/redis/redis.conf image: sourcegraph/redis:18-02-07_8205764_3.2-alpine + livenessProbe: + initialDelaySeconds: 30 + tcpSocket: + port: redis name: redis ports: - containerPort: 6379 name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 readinessProbe: + initialDelaySeconds: 5 tcpSocket: port: redis - initialDelaySeconds: 5 resources: limits: cpu: "1" @@ -64,7 +62,6 @@ spec: requests: cpu: 10m memory: 100Mi - volumeMounts: securityContext: runAsUser: 0 volumes: diff --git a/examples/aws/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/base/redis/redis-cache.PersistentVolumeClaim.yaml similarity index 56% rename from examples/aws/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml rename to base/redis/redis-cache.PersistentVolumeClaim.yaml index c100d569a89a..5f8771387529 100644 --- a/examples/aws/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ b/base/redis/redis-cache.PersistentVolumeClaim.yaml @@ -1,10 +1,6 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default labels: deploy: sourcegraph name: redis-cache diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.Service.yaml b/base/redis/redis-cache.Service.yaml similarity index 81% rename from examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.Service.yaml rename to base/redis/redis-cache.Service.yaml index 0634270075e8..6c4a48f460ae 100644 --- a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.Service.yaml +++ b/base/redis/redis-cache.Service.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Service.yaml apiVersion: v1 kind: Service metadata: diff --git a/examples/gcp/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml b/base/redis/redis-store.ConfigMap.yaml similarity index 85% rename from examples/gcp/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml rename to base/redis/redis-store.ConfigMap.yaml index 8664390e22de..232aa112cb0e 100644 --- a/examples/gcp/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml +++ b/base/redis/redis-store.ConfigMap.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.ConfigMap.yaml apiVersion: v1 data: redis.conf: | @@ -16,6 +14,6 @@ data: save 600 1 kind: ConfigMap metadata: - name: redis-store labels: deploy: sourcegraph + name: redis-store diff --git a/examples/aws/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml b/base/redis/redis-store.Deployment.yaml similarity index 94% rename from examples/aws/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml rename to base/redis/redis-store.Deployment.yaml index 75cd48196f1d..d98d4b85614a 100644 --- a/examples/aws/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml +++ b/base/redis/redis-store.Deployment.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -27,18 +25,18 @@ spec: - redis-server - /etc/redis/redis.conf image: sourcegraph/redis:18-02-07_8205764_3.2-alpine + livenessProbe: + initialDelaySeconds: 30 + tcpSocket: + port: redis name: redis ports: - containerPort: 6379 name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 readinessProbe: + initialDelaySeconds: 5 tcpSocket: port: redis - initialDelaySeconds: 5 resources: limits: cpu: "1" @@ -64,7 +62,6 @@ spec: requests: cpu: 10m memory: 100Mi - volumeMounts: securityContext: runAsUser: 0 volumes: diff --git a/examples/gcp/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml b/base/redis/redis-store.PersistentVolumeClaim.yaml similarity index 56% rename from examples/gcp/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml rename to base/redis/redis-store.PersistentVolumeClaim.yaml index ae604b0d12f1..0667e814a57d 100644 --- a/examples/gcp/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ b/base/redis/redis-store.PersistentVolumeClaim.yaml @@ -1,10 +1,6 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default labels: deploy: sourcegraph name: redis-store diff --git a/examples/gcp/generated/sourcegraph/templates/redis/redis-store.Service.yaml b/base/redis/redis-store.Service.yaml similarity index 81% rename from examples/gcp/generated/sourcegraph/templates/redis/redis-store.Service.yaml rename to base/redis/redis-store.Service.yaml index 7fa5bd6e6a9e..2a3ac44dfcfa 100644 --- a/examples/gcp/generated/sourcegraph/templates/redis/redis-store.Service.yaml +++ b/base/redis/redis-store.Service.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Service.yaml apiVersion: v1 kind: Service metadata: diff --git a/examples/aws/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/base/repo-updater/repo-updater.Deployment.yaml similarity index 81% rename from examples/aws/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml rename to base/repo-updater/repo-updater.Deployment.yaml index 5f76e1c9f26b..dab4a54a1971 100644 --- a/examples/aws/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ b/base/repo-updater/repo-updater.Deployment.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -25,13 +23,11 @@ spec: spec: containers: - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - name: SOURCEGRAPH_CONFIG_FILE value: /etc/sourcegraph/config.json - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 + value: gitserver-0.gitserver:3178 + image: sourcegraph/repo-updater:2.11.0 name: repo-updater ports: - containerPort: 3182 diff --git a/templates/repo-updater/repo-updater.Service.yaml b/base/repo-updater/repo-updater.Service.yaml similarity index 100% rename from templates/repo-updater/repo-updater.Service.yaml rename to base/repo-updater/repo-updater.Service.yaml diff --git a/examples/gcp/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/base/searcher/searcher.Deployment.yaml similarity index 81% rename from examples/gcp/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml rename to base/searcher/searcher.Deployment.yaml index c2bab34d0772..83594c8ccc8e 100644 --- a/examples/gcp/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ b/base/searcher/searcher.Deployment.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -24,21 +22,19 @@ spec: spec: containers: - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - name: SOURCEGRAPH_CONFIG_FILE value: /etc/sourcegraph/config.json + - name: SEARCHER_CACHE_SIZE_MB + value: "100000" - name: SRC_GIT_SERVERS - value: gitserver-1:3178 + value: gitserver-0.gitserver:3178 - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: CACHE_DIR value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 + image: sourcegraph/searcher:2.11.0 name: searcher ports: - containerPort: 3181 @@ -55,10 +51,10 @@ spec: resources: limits: cpu: "2" - memory: "2G" + memory: 2G requests: - cpu: "500m" - memory: "500M" + cpu: 500m + memory: 500M volumeMounts: - mountPath: /etc/sourcegraph name: sg-config diff --git a/templates/searcher/searcher.Service.yaml b/base/searcher/searcher.Service.yaml similarity index 100% rename from templates/searcher/searcher.Service.yaml rename to base/searcher/searcher.Service.yaml diff --git a/examples/gcp/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/base/symbols/symbols.Deployment.yaml similarity index 80% rename from examples/gcp/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml rename to base/symbols/symbols.Deployment.yaml index f14d244c27e4..104c59a9710f 100644 --- a/examples/gcp/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ b/base/symbols/symbols.Deployment.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -24,12 +22,10 @@ spec: spec: containers: - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - name: SOURCEGRAPH_CONFIG_FILE value: /etc/sourcegraph/config.json - name: SRC_GIT_SERVERS - value: gitserver-1:3178 + value: gitserver-0.gitserver:3178 - name: SYMBOLS_CACHE_SIZE_MB value: "100000" - name: POD_NAME @@ -38,7 +34,7 @@ spec: fieldPath: metadata.name - name: CACHE_DIR value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 + image: sourcegraph/symbols:2.11.0 name: symbols ports: - containerPort: 3184 @@ -48,10 +44,10 @@ spec: resources: limits: cpu: "2" - memory: "2G" + memory: 2G requests: - cpu: "500m" - memory: "500M" + cpu: 500m + memory: 500M volumeMounts: - mountPath: /etc/sourcegraph name: sg-config diff --git a/templates/symbols/symbols.Service.yaml b/base/symbols/symbols.Service.yaml similarity index 100% rename from templates/symbols/symbols.Service.yaml rename to base/symbols/symbols.Service.yaml diff --git a/examples/node-selector/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/base/syntect-server/syntect-server.Deployment.yaml similarity index 90% rename from examples/node-selector/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml rename to base/syntect-server/syntect-server.Deployment.yaml index bf1fcce0e603..f8d7c46de603 100644 --- a/examples/node-selector/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ b/base/syntect-server/syntect-server.Deployment.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -50,7 +48,5 @@ spec: requests: cpu: 250m memory: 512M - volumeMounts: securityContext: runAsUser: 0 - volumes: diff --git a/templates/syntect-server/syntect-server.Service.yaml b/base/syntect-server/syntect-server.Service.yaml similarity index 100% rename from templates/syntect-server/syntect-server.Service.yaml rename to base/syntect-server/syntect-server.Service.yaml diff --git a/configure/jaeger/README.md b/configure/jaeger/README.md new file mode 100644 index 000000000000..cb8c0d7ed920 --- /dev/null +++ b/configure/jaeger/README.md @@ -0,0 +1,54 @@ +# Jaeger + +[Jaeger](https://github.com/jaegertracing/jaeger) is an open-source request tracing system that can run inside of your Kubernetes cluster. + +1. Append the `kubectl apply` command for the Jaeger resources to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=jaeger -f configure/jaeger --recursive >> kubectl-apply-all.sh + ``` + +1. Apply your changes to Jaeger to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` + +1. Add the Jaeger collector agent to supported services. + + ```bash + COLLECTOR_PATCH=$(yj < + +## Steps + +1. Edit `extra.rules` in [prometheus.ConfigMap.yaml](prometheus.ConfigMap.yaml) to define custom [Prometheus recording rules](https://prometheus.io/docs/practices/rules/). + + Here are some example rules: + + ``` + # This is a comment + myCustomMetric1 = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[5m]) + myCustomMetric2 = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) + ``` + +1. Optional: [Enable Alertmanager](alertmanager/README.md). + +1. Append the `kubectl apply` command for the Prometheus resources to your cluster. + + ```bash + echo kubectl apply --prune -l deploy=prometheus -f configure/prometheus --recursive >> kubectl-apply-all.sh + ``` + +1. Apply your changes to Prometheus to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` + +## Making Prometheus accessible + +### Port-forwarding + +Use `kubectl port-forward` to grant direct access to the Prometheus UI. This is the simplest way to +access Prometheus data, but requires access to the cluster via `kubectl`. + +1. Forward port 9090: + ```bash + kubectl port-forward $(kubectl get pods -l app=prometheus -o jsonpath="{.items[0].metadata.name}") 9090 + ``` +1. Navigate to `http://localhost:9090`. + +### Kubernetes service + +Create a YAML file defining +a +[Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service) that +exposes the Prometheus deployment. + +We recommend using a NodePort service with the following configuration: + +```yaml +apiVersion: v1 +kind: Service +metadata: + labels: + app: prometheus + name: prometheus-node-port + namespace: default +spec: + externalTrafficPolicy: Cluster + ports: + - name: http + nodePort: 30010 + port: 30010 + protocol: TCP + targetPort: http + selector: + app: prometheus + type: NodePort +``` + +(Note: some cloud infrastructure providers support the "LoadBalancer" service type, which +automatically provisions an external load balancer for the service. We recommend against this type +of service for Prometheus, because almost certainly you do NOT want to expose Prometheus to public +Internet traffic.) + +After creating the Prometheus service, add the appropriate network ingress rules in your +infrastructure provider to allow trusted incoming traffic to access port 30010 on nodes in the +Kubernetes cluster. SECURITY NOTE: Prometheus is unauthenticated, so whatever incoming traffic the +ingress rules allow will have _complete access_ to the Prometheus UI. Be careful that the ingress +rules restrict incoming traffic to trusted sources. + +If a stable IP is required, provision a static IP and an external load balancer in lieu of adding +ingress rules. On most infrastructure providers, the steps are roughly the following: + +- Provision the static IP. +- Create an external load balancer. (On AWS, use an "Application Load Balancer".) +- Connect the internal/backend half of the load balancer to the set of nodes in the Kubernetes + cluster. (On AWS, create a "target group" that contains the instances in the cluster. On Google + Cloud, define a "target pool".) +- Connect the external/frontend half of the load balancer to the static IP. (On AWS, create a + "listener rule". On Google Cloud, create a "forwarding rule".) + +### Exposing the Prometheus API endpoint + +Some customers may want to make the Prometheus API endpoint accessible to other services like the +following: + +- An analytics visualization tool like Grafana +- An metrics ingestion pipeline + +To expose the Prometheus API to such a service, follow the steps to expose Prometheus via Kubernetes +service with an external load balancer. Ensure that the load balancer permits incoming traffic from +the other service. The [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/) +is reachable under the path `/api/v1`. + +## Defining alerts + +The following alerts are recommended and included by default when Prometheus is enabled: + +- `PodsMissing`: Alerts when pods are missing. +- `NoPodsRunning`: Alerts when no pods are running for a service. +- `ProdPageLoadLatency`: Alerts when the page load latency is too high. +- `GoroutineLeak`: Alerts when a service has excessive running goroutines. +- `FSINodesRemainingLow`: Alerts when a node's remaining FS inodes are low. +- `DiskSpaceLow`: Alerts when a node has less than 10% available disk space. +- `DiskSpaceLowCritical`: Alerts when a node has less than 5% available disk space. +- `SearcherErrorRatioTooHigh`: Alerts when the search service has more than 10% of requests failing. + +You can view these alerts and their definitions in the Prometheus UI under the "Alerts" tab +(http://localhost:9090/alerts if you're using `kubectl port-forward` to expose the Prometheus UI). + +Refer to the [Prometheus alerting rules docs](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) for the alert definition syntax. To see the definition of the default alerts, open the Prometheus "Alerts" tab and click on the rule of interest. These can be useful starting points for defining new alerting rules. + +Here is an example alerting rule that fires on high page load latency (specifically when the p90 latency exceeds 20 +seconds): + +``` +ALERT ProdPageLoadLatency + IF histogram_quantile(0.9, sum(rate(src_http_request_duration_seconds_bucket{job="sourcegraph-frontend",route!="xlang",route!="lsp"}[10m])) by (le)) > 20 + LABELS { severity="page" } + ANNOTATIONS { + summary = "High page load latency", + description = "Page load latency > 20s (90th percentile over all routes; current value: {{$value}}s)", + help = "Alerts when the page load latency is too high.", + } +``` + +## Metrics + +See the [Prometheus metrics page](prom-metrics.md) for a full list of available +Prometheus metrics. + +## Sample queries + +Sourcegraph Data Center's Prometheus includes by default many useful metrics for tracking +application performance. The following are some commonly used queries that you can try out in the +UI: + +- Average (5-minute) HTTP requests per second: `job:src_http_request_count:rate5m` +- Average (5-minute) HTTP requests per second, bucketed by request duration: + `route:src_http_request_duration_seconds_bucket:rate5m` +- CPU utilization by container: `max by (container_name)(task:container_cpu_usage_seconds_total:sum{container_name=~"$name"})` +- Memory utilization by container: `max by (container_name)(container_memory_rss{container_name=~"$name"}) / 1024 / 1024 / 1024` diff --git a/configure/prometheus/alertmanager/README.md b/configure/prometheus/alertmanager/README.md new file mode 100644 index 000000000000..227f206e1c01 --- /dev/null +++ b/configure/prometheus/alertmanager/README.md @@ -0,0 +1,32 @@ +# Alertmanager + +[Alertmanager](https://prometheus.io/docs/alerting/alertmanager/) handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts. + +1. Update `data."config.yml"` in [alertmanager.ConfigMap.yaml](alertmanager.ConfigMap.yaml) with your Alertmanager configuration. +2. Update [alertmanager.Deployment.yaml](alertmanager.Deployment.yaml) with the URL to your Alertmanager instance. + + ```bash + ALERT_MANAGER_URL="https://alertmanager.example.com" # update this url + AD=configure/prometheus/alertmanager/alertmanager.Deployment.yaml + cat $AD | yj | jq "(.spec.template.spec.containers[] | select(.name == \"alertmanager\") | .args) |= (. + [\"--web.external-url=$ALERT_MANAGER_URL\"] | unique)" | jy -o $AD + ``` + +3. Update [../prometheus.Deployment.yaml](prometheus.Deployment.yaml) with the URL to your Alertmanager instance. + + ```bash + ALERT_MANAGER_URL="https://alertmanager.example.com" # update this url + PD=configure/prometheus/prometheus.Deployment.yaml + cat $PD | yj | jq "(.spec.template.spec.containers[] | select(.name == \"prometheus\") | .args) |= (. + [\"--web.external-url=$ALERT_MANAGER_URL\"] | unique)" | jy -o $PD + ``` + +4. Apply the Alertmanager resources to your cluster. + + ```bash + kubectl apply --prune -l deploy=alertmanager -f configure/prometheus/alertmanager --recursive + ``` + +5. Apply the Prometheus resources to your cluster. + + ```bash + kubectl apply --prune -l deploy=prometheus -f configure/prometheus --recursive + ``` diff --git a/configure/prometheus/alertmanager/alertmanager.ConfigMap.yaml b/configure/prometheus/alertmanager/alertmanager.ConfigMap.yaml new file mode 100644 index 000000000000..ec48d6834062 --- /dev/null +++ b/configure/prometheus/alertmanager/alertmanager.ConfigMap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +data: + config.yml: "" +kind: ConfigMap +metadata: + labels: + deploy: alertmanager + name: alertmanager diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Deployment.yaml b/configure/prometheus/alertmanager/alertmanager.Deployment.yaml similarity index 80% rename from test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Deployment.yaml rename to configure/prometheus/alertmanager/alertmanager.Deployment.yaml index ba6916876717..5434f3583e60 100644 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Deployment.yaml +++ b/configure/prometheus/alertmanager/alertmanager.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/prometheus/alertmanager/alertmanager.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: Receives alerts from Prometheus and pushes them to OpsGenie. labels: - deploy: sourcegraph + deploy: alertmanager name: alertmanager spec: minReadySeconds: 10 @@ -26,8 +24,7 @@ spec: - args: - --config.file=/etc/alertmanager/config.yml - --storage.path=/alertmanager - - --web.external-url= - image: sourcegraph/alertmanager:v0.15.1 + image: docker.sourcegraph.com/alertmanager:v0.15.1 name: alertmanager ports: - containerPort: 9093 @@ -45,11 +42,9 @@ spec: readOnly: true - mountPath: /alertmanager name: data - securityContext: - runAsUser: 0 volumes: - configMap: name: alertmanager name: config - emptyDir: {} - name: data \ No newline at end of file + name: data diff --git a/templates/prometheus/alertmanager/alertmanager.Service.yaml b/configure/prometheus/alertmanager/alertmanager.Service.yaml similarity index 73% rename from templates/prometheus/alertmanager/alertmanager.Service.yaml rename to configure/prometheus/alertmanager/alertmanager.Service.yaml index a7ab94421f4a..647ec03f6a15 100644 --- a/templates/prometheus/alertmanager/alertmanager.Service.yaml +++ b/configure/prometheus/alertmanager/alertmanager.Service.yaml @@ -1,10 +1,9 @@ -{{- if .Values.site.useAlertManager -}} apiVersion: v1 kind: Service metadata: labels: app: alertmanager - deploy: sourcegraph + deploy: alertmanager name: alertmanager spec: ports: @@ -14,4 +13,3 @@ spec: selector: app: alertmanager type: ClusterIP -{{- end -}} diff --git a/docs/prom-metrics.md b/configure/prometheus/prom-metrics.md similarity index 100% rename from docs/prom-metrics.md rename to configure/prometheus/prom-metrics.md diff --git a/templates/prometheus/prometheus-node-port.Service.yaml b/configure/prometheus/prometheus-node-port.Service.yaml similarity index 74% rename from templates/prometheus/prometheus-node-port.Service.yaml rename to configure/prometheus/prometheus-node-port.Service.yaml index 0e07bb0013c8..047e9cee376d 100644 --- a/templates/prometheus/prometheus-node-port.Service.yaml +++ b/configure/prometheus/prometheus-node-port.Service.yaml @@ -1,10 +1,9 @@ -{{- if hasKey .Values.site "prometheus" -}} apiVersion: v1 kind: Service metadata: labels: app: prometheus - deploy: sourcegraph + deploy: prometheus name: prometheus-node-port spec: ports: @@ -15,4 +14,3 @@ spec: selector: app: prometheus type: NodePort -{{ end -}} diff --git a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml b/configure/prometheus/prometheus.ClusterRole.yaml similarity index 74% rename from examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml rename to configure/prometheus/prometheus.ClusterRole.yaml index d46bfd3d0b2e..6081bf4bf716 100644 --- a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml +++ b/configure/prometheus/prometheus.ClusterRole.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: + labels: + deploy: prometheus name: prometheus - labels: - deploy: sourcegraph rules: - apiGroups: - "" diff --git a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml b/configure/prometheus/prometheus.ClusterRoleBinding.yaml similarity index 56% rename from examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml rename to configure/prometheus/prometheus.ClusterRoleBinding.yaml index 496481e91e3d..5456711b53a7 100644 --- a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml +++ b/configure/prometheus/prometheus.ClusterRoleBinding.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: - name: 'default-prometheus' labels: - deploy: sourcegraph + deploy: prometheus + name: prometheus roleRef: apiGroup: "" kind: ClusterRole @@ -13,4 +11,3 @@ roleRef: subjects: - kind: ServiceAccount name: prometheus - namespace: 'default' diff --git a/templates/prometheus/prometheus.ConfigMap.yaml b/configure/prometheus/prometheus.ConfigMap.yaml similarity index 98% rename from templates/prometheus/prometheus.ConfigMap.yaml rename to configure/prometheus/prometheus.ConfigMap.yaml index cac8dc8c7375..afcc77e80cc8 100644 --- a/templates/prometheus/prometheus.ConfigMap.yaml +++ b/configure/prometheus/prometheus.ConfigMap.yaml @@ -1,10 +1,5 @@ -{{- if hasKey .Values.site "prometheus" -}} apiVersion: v1 data: -{{- if .Values.site.prometheus.noDefaultAlerts }} - alert.rules: | - # DISABLED -{{- else }} alert.rules: | ALERT PodsMissing IF app:up:ratio{app!=""} < 0.9 @@ -105,8 +100,6 @@ data: summary = "{{`{{`}}$labels.job{{`}}`}} in {{`{{`}}$labels.ns{{`}}`}} is probably leaking metrics (unbounded attribute)", help = "Alerts when a service is probably leaking metrics (unbounded attribute).", } -{{ end }} - apdex.rules: |+ # Generated with apdex.py # Do not manually edit @@ -179,13 +172,8 @@ data: sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[1d])) by (mode, method) ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) -{{- if .Values.site.prometheus.customRules }} - extra.rules: | -{{ .Values.site.prometheus.customRules | indent 4 }} -{{- else }} - extra.rules: "" -{{- end }} + extra.rules: "" node.rules: | node:container_cpu_usage_seconds_total:ratio_rate5m = sum by (instance) (rate(container_cpu_usage_seconds_total{kubernetes_pod_name=""}[5m])) @@ -484,7 +472,6 @@ data: sum by (le, mode, method)(rate(src_xlang_request_duration_seconds_bucket{success="true"}[1d])) kind: ConfigMap metadata: - name: prometheus labels: - deploy: sourcegraph -{{ end -}} + deploy: prometheus + name: prometheus diff --git a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.Deployment.yaml b/configure/prometheus/prometheus.Deployment.yaml similarity index 86% rename from examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.Deployment.yaml rename to configure/prometheus/prometheus.Deployment.yaml index 44938f3a2df3..d531de7858c4 100644 --- a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.Deployment.yaml +++ b/configure/prometheus/prometheus.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: Collects metrics and aggregates them into graphs. labels: - deploy: sourcegraph + deploy: prometheus name: prometheus spec: minReadySeconds: 10 @@ -24,13 +22,12 @@ spec: spec: containers: - args: + - -alertmanager.url=http://alertmanager - -config.file=/etc/prometheus/prometheus.yml - -storage.local.path=/prometheus/data - -web.console.libraries=/etc/prometheus/console_libraries - -web.console.templates=/etc/prometheus/consoles - - -web.external-url= - - -alertmanager.url=http://alertmanager - image: sourcegraph/prometheus:v1.4.1 + image: docker.sourcegraph.com/prometheus:v1.4.1 name: prometheus ports: - containerPort: 9090 @@ -50,7 +47,7 @@ spec: - args: - --volume-dir=/etc/prometheus - --webhook-url=http://localhost:9090/-/reload - image: sourcegraph/configmap-reload:v0.1 + image: docker.sourcegraph.com/configmap-reload:v0.1 name: configmap-reload resources: limits: @@ -63,8 +60,6 @@ spec: - mountPath: /etc/prometheus name: config readOnly: true - securityContext: - runAsUser: 0 serviceAccountName: prometheus volumes: - name: data diff --git a/configure/prometheus/prometheus.PersistentVolumeClaim.yaml b/configure/prometheus/prometheus.PersistentVolumeClaim.yaml new file mode 100644 index 000000000000..97c9dc7ad4c4 --- /dev/null +++ b/configure/prometheus/prometheus.PersistentVolumeClaim.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + deploy: prometheus + name: prometheus +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi diff --git a/templates/prometheus/prometheus.Service.yaml b/configure/prometheus/prometheus.Service.yaml similarity index 71% rename from templates/prometheus/prometheus.Service.yaml rename to configure/prometheus/prometheus.Service.yaml index 64b8dc04f7a1..18fb40ee2d63 100644 --- a/templates/prometheus/prometheus.Service.yaml +++ b/configure/prometheus/prometheus.Service.yaml @@ -1,10 +1,9 @@ -{{- if hasKey .Values.site "prometheus" -}} apiVersion: v1 kind: Service metadata: labels: app: prometheus - deploy: sourcegraph + deploy: prometheus name: prometheus spec: ports: @@ -14,4 +13,3 @@ spec: selector: app: prometheus type: ClusterIP -{{ end -}} diff --git a/templates/prometheus/prometheus.ServiceAccount.yaml b/configure/prometheus/prometheus.ServiceAccount.yaml similarity index 53% rename from templates/prometheus/prometheus.ServiceAccount.yaml rename to configure/prometheus/prometheus.ServiceAccount.yaml index 558be2a3c149..82e43a2ff14c 100644 --- a/templates/prometheus/prometheus.ServiceAccount.yaml +++ b/configure/prometheus/prometheus.ServiceAccount.yaml @@ -1,10 +1,8 @@ -{{- if hasKey .Values.site "prometheus" -}} apiVersion: v1 imagePullSecrets: - name: docker-registry kind: ServiceAccount metadata: + labels: + deploy: prometheus name: prometheus - labels: - deploy: sourcegraph -{{ end -}} diff --git a/configure/ssd/README.md b/configure/ssd/README.md new file mode 100644 index 000000000000..842207d442ba --- /dev/null +++ b/configure/ssd/README.md @@ -0,0 +1,50 @@ +# SSDs + +Using local SSDs dramatically speeds up many of Sourcegraph's services. Read your cloud provider's documentation for mouting local SSDs. + +- [GCP](https://cloud.google.com/compute/docs/disks/local-ssd) +- [AWS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ssd-instance-store.html) + +If you mount local SSDs on your nodes: + +1. Change the `cache-ssd` volume to point to `${SSD_NODE_PATH}/pod-tmp` where `${SSD_NODE_PATH}` is the absolute path of the SSD on each node. + + For example, GCP mounts the first SSD disk to `/mnt/disks/ssd0`, so the `cache-ssd` volume would be configured like this: + + ```yaml + volumes: + - hostPath: + path: /mnt/disks/ssd0/pod-tmp + name: cache-ssd + ``` + +1. Append the `kubectl apply` command for the provided `pod-tmp-gc` [DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) to `kubectl-apply-all.sh` to periodically clean up files in the SSD on each node. This is necessary because files on the SSDs are not automatically cleaned up if pods crash or are rescheduled which can cause the SSDs to fill up. + + ```bash + echo kubectl apply --prune -l deploy=pod-tmp-gc -f configure/ssd --recursive >> kubectl-apply-all.sh + ``` + +1. Apply your changes to `pod-tmp-gc` and the base deployments to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` + +Here is a convenience script: + +```bash +# This script requires https://github.com/sourcegraph/jy and https://github.com/sourcegraph/yj + +SSD_NODE_PATH=/mnt/disks/ssd0 # update this to reflect the absolute path where SSDs are mounted on each node + +# Mount the SSDs path in each deployment +find . -name "*Deployment.yaml" -exec sh -c "cat {} | yj | jq '(.spec.template.spec.volumes | select(. != null) | .[] | select(.name == \"cache-ssd\")) |= (del(.emptyDir) + {hostPath: {path: \"$SSD_NODE_PATH/pod-tmp\"}})' | jy -o {}" \; + +# Update pod-tmp-gc.DaemonSet.yaml with SSD_NODE_PATH +DS=configure/ssd/pod-tmp-gc.DaemonSet.yaml +cat $DS | yj | jq ".spec.template.spec.volumes = [{name: \"pod-tmp\", hostPath: {path: \"$SSD_NODE_PATH/pod-tmp\"}}]" | jy -o $DS + +# Deploy everything +echo kubectl apply --prune -l deploy=pod-tmp-gc -f configure/ssd --recursive >> kubectl-apply-all.sh +./kubectl-apply-all.sh +``` diff --git a/templates/node-ssd/pod-tmp-gc.ClusterRole.yaml b/configure/ssd/pod-tmp-gc.ClusterRole.yaml similarity index 66% rename from templates/node-ssd/pod-tmp-gc.ClusterRole.yaml rename to configure/ssd/pod-tmp-gc.ClusterRole.yaml index 26fdb2059934..4d955da19508 100644 --- a/templates/node-ssd/pod-tmp-gc.ClusterRole.yaml +++ b/configure/ssd/pod-tmp-gc.ClusterRole.yaml @@ -1,10 +1,9 @@ -{{- if and (.Values.site.nodeSSDPath) (ne .Values.cluster.rbac "disabled") -}} apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: - name: pod-tmp-gc labels: - deploy: sourcegraph + deploy: pod-tmp-gc + name: pod-tmp-gc rules: - apiGroups: - "" @@ -18,4 +17,3 @@ rules: - pods verbs: - list -{{- end -}} diff --git a/templates/node-ssd/pod-tmp-gc.ClusterRoleBinding.yaml b/configure/ssd/pod-tmp-gc.ClusterRoleBinding.yaml similarity index 51% rename from templates/node-ssd/pod-tmp-gc.ClusterRoleBinding.yaml rename to configure/ssd/pod-tmp-gc.ClusterRoleBinding.yaml index bc4f7adeb40c..4088ab2461e5 100644 --- a/templates/node-ssd/pod-tmp-gc.ClusterRoleBinding.yaml +++ b/configure/ssd/pod-tmp-gc.ClusterRoleBinding.yaml @@ -1,10 +1,9 @@ -{{- if and (.Values.site.nodeSSDPath) (ne .Values.cluster.rbac "disabled") -}} apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: - name: '{{.Release.Namespace}}-pod-tmp-gc' labels: - deploy: sourcegraph + deploy: pod-tmp-gc + name: pod-tmp-gc roleRef: apiGroup: "" kind: ClusterRole @@ -12,5 +11,3 @@ roleRef: subjects: - kind: ServiceAccount name: pod-tmp-gc - namespace: '{{.Release.Namespace}}' -{{- end -}} diff --git a/templates/node-ssd/pod-tmp-gc.DaemonSet.yaml b/configure/ssd/pod-tmp-gc.DaemonSet.yaml similarity index 60% rename from templates/node-ssd/pod-tmp-gc.DaemonSet.yaml rename to configure/ssd/pod-tmp-gc.DaemonSet.yaml index d04c9f94ac5e..d4e137f06cf9 100644 --- a/templates/node-ssd/pod-tmp-gc.DaemonSet.yaml +++ b/configure/ssd/pod-tmp-gc.DaemonSet.yaml @@ -1,10 +1,9 @@ -{{- if .Values.site.nodeSSDPath -}} apiVersion: extensions/v1beta1 kind: DaemonSet metadata: - name: pod-tmp-gc labels: - deploy: sourcegraph + deploy: pod-tmp-gc + name: pod-tmp-gc spec: template: metadata: @@ -21,19 +20,18 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName - image: {{ .Values.const.podTmpGC.image }} + image: sourcegraph/pod-tmp-gc:latest name: pod-tmp-gc resources: limits: cpu: 10m memory: 20M - volumeMounts: - - mountPath: /pod-tmp - name: pod-tmp + # Replace ${SSD_MOUNT_PATH} with the with the absolute directory path + # on the node where the local SSD is mounted. + # See ../README.md for more information. + # + # volumeMounts: + # - mountPath: ${SSD_MOUNT_PATH}/pod-tmp + # name: pod-tmp serviceAccountName: pod-tmp-gc - volumes: - - hostPath: - path: {{ .Values.site.nodeSSDPath }}/pod-tmp - name: pod-tmp updateStrategy: {} -{{- end -}} diff --git a/templates/node-ssd/pod-tmp-gc.ServiceAccount.yaml b/configure/ssd/pod-tmp-gc.ServiceAccount.yaml similarity index 61% rename from templates/node-ssd/pod-tmp-gc.ServiceAccount.yaml rename to configure/ssd/pod-tmp-gc.ServiceAccount.yaml index 6defd38997ab..385338fbbaa9 100644 --- a/templates/node-ssd/pod-tmp-gc.ServiceAccount.yaml +++ b/configure/ssd/pod-tmp-gc.ServiceAccount.yaml @@ -1,10 +1,8 @@ -{{- if .Values.site.nodeSSDPath -}} apiVersion: v1 imagePullSecrets: - name: docker-registry kind: ServiceAccount metadata: - name: pod-tmp-gc labels: - deploy: sourcegraph -{{- end -}} + deploy: pod-tmp-gc + name: pod-tmp-gc diff --git a/configure/xlang/experimental/bash/README.md b/configure/xlang/experimental/bash/README.md new file mode 100644 index 000000000000..370d402298ec --- /dev/null +++ b/configure/xlang/experimental/bash/README.md @@ -0,0 +1,28 @@ +# Bash language server + +This folder contains the deployment files for the Bash language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the Bash language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-bash -f configure/experimental/bash --recursive >> kubectl-apply-all.sh + ``` + +2. Add the following environment variables to the `lsp-proxy` deployment to make it aware of the Bash language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_BASH + value: tcp://xlang-bash:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the Bash language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/bash/xlang-bash.Deployment.yaml b/configure/xlang/experimental/bash/xlang-bash.Deployment.yaml new file mode 100644 index 000000000000..ac788522957d --- /dev/null +++ b/configure/xlang/experimental/bash/xlang-bash.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for bash (used for live requests). + labels: + deploy: xlang-bash + name: xlang-bash +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-bash + spec: + containers: + - image: sourcegraph/codeintel-bash:00239_2018-05-31_6b6cac4 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-bash + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/bash/xlang-bash.Service.yaml b/configure/xlang/experimental/bash/xlang-bash.Service.yaml new file mode 100644 index 000000000000..8d43ee23c81f --- /dev/null +++ b/configure/xlang/experimental/bash/xlang-bash.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-bash + deploy: xlang-bash + name: xlang-bash +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-bash + type: ClusterIP diff --git a/configure/xlang/experimental/clojure/README.md b/configure/xlang/experimental/clojure/README.md new file mode 100644 index 000000000000..d380e3c06150 --- /dev/null +++ b/configure/xlang/experimental/clojure/README.md @@ -0,0 +1,28 @@ +# Clojure language server + +This folder contains the deployment files for the Clojure language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the Clojure language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-clojure -f configure/experimental/clojure --recursive >> kubectl-apply-all.sh + ``` + +2. Add the following environment variables to the `lsp-proxy` deployment to make it aware of the Clojure language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_CLOJURE + value: tcp://xlang-clojure:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the Clojure language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/clojure/xlang-clojure.Deployment.yaml b/configure/xlang/experimental/clojure/xlang-clojure.Deployment.yaml new file mode 100644 index 000000000000..9866e45c34b7 --- /dev/null +++ b/configure/xlang/experimental/clojure/xlang-clojure.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for clojure (used for live requests). + labels: + deploy: xlang-clojure + name: xlang-clojure +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-clojure + spec: + containers: + - image: sourcegraph/codeintel-clojure:00231_2018-05-31_eef495b + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-clojure + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/clojure/xlang-clojure.Service.yaml b/configure/xlang/experimental/clojure/xlang-clojure.Service.yaml new file mode 100644 index 000000000000..c6b7a9e3d4dc --- /dev/null +++ b/configure/xlang/experimental/clojure/xlang-clojure.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-clojure + deploy: xlang-clojure + name: xlang-clojure +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-clojure + type: ClusterIP diff --git a/configure/xlang/experimental/cpp/README.md b/configure/xlang/experimental/cpp/README.md new file mode 100644 index 000000000000..f51033c9604d --- /dev/null +++ b/configure/xlang/experimental/cpp/README.md @@ -0,0 +1,28 @@ +# C++ language server + +This folder contains the deployment files for the C++ language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the C++ language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-cpp -f configure/experimental/cpp --recursive >> kubectl-apply-all.sh + ``` + +2. Add the following environment variables to the `lsp-proxy` deployment to make it aware of the C++ language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_CPP + value: tcp://xlang-cpp:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the C++ language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/cpp/xlang-cpp.Deployment.yaml b/configure/xlang/experimental/cpp/xlang-cpp.Deployment.yaml new file mode 100644 index 000000000000..ab52d31a3b4d --- /dev/null +++ b/configure/xlang/experimental/cpp/xlang-cpp.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for cpp (used for live requests). + labels: + deploy: xlang-cpp + name: xlang-cpp +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-cpp + spec: + containers: + - image: sourcegraph/codeintel-cpp:00239_2018-05-31_6b6cac4 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-cpp + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/cpp/xlang-cpp.Service.yaml b/configure/xlang/experimental/cpp/xlang-cpp.Service.yaml new file mode 100644 index 000000000000..e800b5d9591f --- /dev/null +++ b/configure/xlang/experimental/cpp/xlang-cpp.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-cpp + deploy: xlang-cpp + name: xlang-cpp +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-cpp + type: ClusterIP diff --git a/configure/xlang/experimental/cs/README.md b/configure/xlang/experimental/cs/README.md new file mode 100644 index 000000000000..3a2c15d8c052 --- /dev/null +++ b/configure/xlang/experimental/cs/README.md @@ -0,0 +1,28 @@ +# C\# language server + +This folder contains the deployment files for the C# language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the C# language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-cs -f configure/experimental/cs --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the C# language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_CS + value: tcp://xlang-cs:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the C# language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/cs/xlang-cs.Deployment.yaml b/configure/xlang/experimental/cs/xlang-cs.Deployment.yaml new file mode 100644 index 000000000000..c2312b27ca09 --- /dev/null +++ b/configure/xlang/experimental/cs/xlang-cs.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for cs (used for live requests). + labels: + deploy: xlang-cs + name: xlang-cs +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-cs + spec: + containers: + - image: sourcegraph/codeintel-csharp:00225_2018-05-26_26f55a3 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-cs + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/cs/xlang-cs.Service.yaml b/configure/xlang/experimental/cs/xlang-cs.Service.yaml new file mode 100644 index 000000000000..d14d91290626 --- /dev/null +++ b/configure/xlang/experimental/cs/xlang-cs.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-cs + deploy: xlang-cs + name: xlang-cs +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-cs + type: ClusterIP diff --git a/configure/xlang/experimental/css/README.md b/configure/xlang/experimental/css/README.md new file mode 100644 index 000000000000..4a5337ea2b1f --- /dev/null +++ b/configure/xlang/experimental/css/README.md @@ -0,0 +1,28 @@ +# CSS language server + +This folder contains the deployment files for the CSS language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the CSS language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-css -f configure/experimental/css --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the CSS language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_CSS + value: tcp://xlang-css:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the CSS language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/css/xlang-css.Deployment.yaml b/configure/xlang/experimental/css/xlang-css.Deployment.yaml new file mode 100644 index 000000000000..0f4f0612138c --- /dev/null +++ b/configure/xlang/experimental/css/xlang-css.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for css (used for live requests). + labels: + deploy: xlang-css + name: xlang-css +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-css + spec: + containers: + - image: sourcegraph/codeintel-css:00239_2018-05-31_6b6cac4 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-css + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/css/xlang-css.Service.yaml b/configure/xlang/experimental/css/xlang-css.Service.yaml new file mode 100644 index 000000000000..2d95fcd5ee4a --- /dev/null +++ b/configure/xlang/experimental/css/xlang-css.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-css + deploy: xlang-css + name: xlang-css +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-css + type: ClusterIP diff --git a/configure/xlang/experimental/dockerfile/README.md b/configure/xlang/experimental/dockerfile/README.md new file mode 100644 index 000000000000..90c24328de68 --- /dev/null +++ b/configure/xlang/experimental/dockerfile/README.md @@ -0,0 +1,28 @@ +# Dockerfile language server + +This folder contains the deployment files for the Dockerfile language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the Dockerfile language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-dockerfile -f configure/experimental/dockerfile --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the Dockerfile language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_DOCKERFILE + value: tcp://xlang-dockerfile:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the Dockerfile language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/dockerfile/xlang-dockerfile.Deployment.yaml b/configure/xlang/experimental/dockerfile/xlang-dockerfile.Deployment.yaml new file mode 100644 index 000000000000..1e4e79e3d9c8 --- /dev/null +++ b/configure/xlang/experimental/dockerfile/xlang-dockerfile.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for dockerfile (used for live requests). + labels: + deploy: xlang-dockerfile + name: xlang-dockerfile +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-dockerfile + spec: + containers: + - image: sourcegraph/codeintel-docker:00239_2018-05-31_6b6cac4 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-dockerfile + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/dockerfile/xlang-dockerfile.Service.yaml b/configure/xlang/experimental/dockerfile/xlang-dockerfile.Service.yaml new file mode 100644 index 000000000000..a15cd3b20eeb --- /dev/null +++ b/configure/xlang/experimental/dockerfile/xlang-dockerfile.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-dockerfile + deploy: xlang-dockerfile + name: xlang-dockerfile +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-dockerfile + type: ClusterIP diff --git a/configure/xlang/experimental/elixir/README.md b/configure/xlang/experimental/elixir/README.md new file mode 100644 index 000000000000..db099f7fd567 --- /dev/null +++ b/configure/xlang/experimental/elixir/README.md @@ -0,0 +1,28 @@ +# Elixir language server + +This folder contains the deployment files for the Elixir language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the Elixir language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-elixir -f configure/experimental/elixir --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the Elixir language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_ELIXIR + value: tcp://xlang-elixir:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the Elixir language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/elixir/xlang-elixir.Deployment.yaml b/configure/xlang/experimental/elixir/xlang-elixir.Deployment.yaml new file mode 100644 index 000000000000..11c70add7fef --- /dev/null +++ b/configure/xlang/experimental/elixir/xlang-elixir.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for elixir (used for live requests). + labels: + deploy: xlang-elixir + name: xlang-elixir +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-elixir + spec: + containers: + - image: sourcegraph/codeintel-elixir:00239_2018-05-31_6b6cac4 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-elixir + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/elixir/xlang-elixir.Service.yaml b/configure/xlang/experimental/elixir/xlang-elixir.Service.yaml new file mode 100644 index 000000000000..68f3c3c31497 --- /dev/null +++ b/configure/xlang/experimental/elixir/xlang-elixir.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-elixir + deploy: xlang-elixir + name: xlang-elixir +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-elixir + type: ClusterIP diff --git a/configure/xlang/experimental/html/README.md b/configure/xlang/experimental/html/README.md new file mode 100644 index 000000000000..6770a0a43575 --- /dev/null +++ b/configure/xlang/experimental/html/README.md @@ -0,0 +1,28 @@ +# HTML language server + +This folder contains the deployment files for the HTML language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the HTML language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-html -f configure/experimental/html --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the HTML language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_HTML + value: tcp://xlang-html:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the HTML language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/xlang/experimental.yaml b/configure/xlang/experimental/html/xlang-html.Deployment.yaml similarity index 70% rename from test-cases/custom-ls-address/generated/sourcegraph/templates/xlang/experimental.yaml rename to configure/xlang/experimental/html/xlang-html.Deployment.yaml index a54bc6fe830f..4419ad1a16b7 100644 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/xlang/experimental.yaml +++ b/configure/xlang/experimental/html/xlang-html.Deployment.yaml @@ -1,30 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/experimental.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-html - deploy: sourcegraph - name: xlang-html -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-html - type: ClusterIP - ---- - apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: LSP server for html (used for live requests). labels: - deploy: sourcegraph + deploy: xlang-html name: xlang-html spec: minReadySeconds: 10 @@ -55,4 +35,4 @@ spec: tcpSocket: port: lsp securityContext: - runAsUser: 0 \ No newline at end of file + runAsUser: 0 diff --git a/configure/xlang/experimental/html/xlang-html.Service.yaml b/configure/xlang/experimental/html/xlang-html.Service.yaml new file mode 100644 index 000000000000..c74c60a5a0f7 --- /dev/null +++ b/configure/xlang/experimental/html/xlang-html.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-html + deploy: xlang-html + name: xlang-html +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-html + type: ClusterIP diff --git a/configure/xlang/experimental/lua/README.md b/configure/xlang/experimental/lua/README.md new file mode 100644 index 000000000000..96ad2a4d1a82 --- /dev/null +++ b/configure/xlang/experimental/lua/README.md @@ -0,0 +1,28 @@ +# Lua language server + +This folder contains the deployment files for the Lua language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the Lua language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-lua -f configure/experimental/lua --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the Lua language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_LUA + value: tcp://xlang-lua:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the Lua language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/lua/xlang-lua.Deployment.yaml b/configure/xlang/experimental/lua/xlang-lua.Deployment.yaml new file mode 100644 index 000000000000..10e88ec26d43 --- /dev/null +++ b/configure/xlang/experimental/lua/xlang-lua.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for lua (used for live requests). + labels: + deploy: xlang-lua + name: xlang-lua +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-lua + spec: + containers: + - image: sourcegraph/codeintel-lua:00225_2018-05-26_26f55a3 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-lua + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/lua/xlang-lua.Service.yaml b/configure/xlang/experimental/lua/xlang-lua.Service.yaml new file mode 100644 index 000000000000..894cfa5437fd --- /dev/null +++ b/configure/xlang/experimental/lua/xlang-lua.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-lua + deploy: xlang-lua + name: xlang-lua +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-lua + type: ClusterIP diff --git a/configure/xlang/experimental/ocaml/README.md b/configure/xlang/experimental/ocaml/README.md new file mode 100644 index 000000000000..b4b68ba23cd6 --- /dev/null +++ b/configure/xlang/experimental/ocaml/README.md @@ -0,0 +1,28 @@ +# OCaml language server + +This folder contains the deployment files for the OCaml language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the OCaml language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-ocaml -f configure/experimental/ocaml --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the OCaml language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_OCAML + value: tcp://xlang-ocaml:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the OCaml language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/ocaml/xlang-ocaml.Deployment.yaml b/configure/xlang/experimental/ocaml/xlang-ocaml.Deployment.yaml new file mode 100644 index 000000000000..bdd94490586f --- /dev/null +++ b/configure/xlang/experimental/ocaml/xlang-ocaml.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for ocaml (used for live requests). + labels: + deploy: xlang-ocaml + name: xlang-ocaml +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-ocaml + spec: + containers: + - image: sourcegraph/codeintel-ocaml:00239_2018-05-31_6b6cac4 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-ocaml + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/ocaml/xlang-ocaml.Service.yaml b/configure/xlang/experimental/ocaml/xlang-ocaml.Service.yaml new file mode 100644 index 000000000000..f84dc5d09237 --- /dev/null +++ b/configure/xlang/experimental/ocaml/xlang-ocaml.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-ocaml + deploy: xlang-ocaml + name: xlang-ocaml +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-ocaml + type: ClusterIP diff --git a/configure/xlang/experimental/r/README.md b/configure/xlang/experimental/r/README.md new file mode 100644 index 000000000000..b35fe219eaf9 --- /dev/null +++ b/configure/xlang/experimental/r/README.md @@ -0,0 +1,28 @@ +# R language server + +This folder contains the deployment files for the R language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the R language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-r -f configure/experimental/r --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the R language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_R + value: tcp://xlang-r:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the R language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/r/xlang-r.Deployment.yaml b/configure/xlang/experimental/r/xlang-r.Deployment.yaml new file mode 100644 index 000000000000..ce10372daaaf --- /dev/null +++ b/configure/xlang/experimental/r/xlang-r.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for r (used for live requests). + labels: + deploy: xlang-r + name: xlang-r +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-r + spec: + containers: + - image: sourcegraph/codeintel-r:00239_2018-05-31_6b6cac4 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-r + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/r/xlang-r.Service.yaml b/configure/xlang/experimental/r/xlang-r.Service.yaml new file mode 100644 index 000000000000..c68f65ca00f7 --- /dev/null +++ b/configure/xlang/experimental/r/xlang-r.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-r + deploy: xlang-r + name: xlang-r +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-r + type: ClusterIP diff --git a/configure/xlang/experimental/ruby/README.md b/configure/xlang/experimental/ruby/README.md new file mode 100644 index 000000000000..daeecde7a5e4 --- /dev/null +++ b/configure/xlang/experimental/ruby/README.md @@ -0,0 +1,28 @@ +# Ruby language server + +This folder contains the deployment files for the Ruby language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the Ruby language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-ruby -f configure/experimental/ruby --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the Ruby language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_RUBY + value: tcp://xlang-ruby:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the Ruby language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/ruby/xlang-ruby.Deployment.yaml b/configure/xlang/experimental/ruby/xlang-ruby.Deployment.yaml new file mode 100644 index 000000000000..f5406b87d905 --- /dev/null +++ b/configure/xlang/experimental/ruby/xlang-ruby.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for ruby (used for live requests). + labels: + deploy: xlang-ruby + name: xlang-ruby +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-ruby + spec: + containers: + - image: sourcegraph/codeintel-ruby:00239_2018-05-31_6b6cac4 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-ruby + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/ruby/xlang-ruby.Service.yaml b/configure/xlang/experimental/ruby/xlang-ruby.Service.yaml new file mode 100644 index 000000000000..d93cf5d64330 --- /dev/null +++ b/configure/xlang/experimental/ruby/xlang-ruby.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-ruby + deploy: xlang-ruby + name: xlang-ruby +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-ruby + type: ClusterIP diff --git a/configure/xlang/experimental/rust/README.md b/configure/xlang/experimental/rust/README.md new file mode 100644 index 000000000000..9a3cb5075c0a --- /dev/null +++ b/configure/xlang/experimental/rust/README.md @@ -0,0 +1,28 @@ +# Rust language server + +This folder contains the deployment files for the Rust language server. + +🚨 **Warning**: This language server is experimental. Please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling it. 🚨 + +You can enable it by: + +1. Append the `kubectl apply` command for the Rust language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-rust -f configure/experimental/rust --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the Rust language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_RUST + value: tcp://xlang-rust:8080 + ``` + +3. Apply your changes to `lsp-proxy` and the Rust language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/configure/xlang/experimental/rust/xlang-rust.Deployment.yaml b/configure/xlang/experimental/rust/xlang-rust.Deployment.yaml new file mode 100644 index 000000000000..c89768545166 --- /dev/null +++ b/configure/xlang/experimental/rust/xlang-rust.Deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + annotations: + description: LSP server for rust (used for live requests). + labels: + deploy: xlang-rust + name: xlang-rust +spec: + minReadySeconds: 10 + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: xlang-rust + spec: + containers: + - image: sourcegraph/codeintel-rust:00239_2018-05-31_6b6cac4 + livenessProbe: + initialDelaySeconds: 5 + tcpSocket: + port: lsp + timeoutSeconds: 5 + name: xlang-rust + ports: + - containerPort: 8080 + name: lsp + readinessProbe: + tcpSocket: + port: lsp + securityContext: + runAsUser: 0 diff --git a/configure/xlang/experimental/rust/xlang-rust.Service.yaml b/configure/xlang/experimental/rust/xlang-rust.Service.yaml new file mode 100644 index 000000000000..1ea8d314a8bc --- /dev/null +++ b/configure/xlang/experimental/rust/xlang-rust.Service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: xlang-rust + deploy: xlang-rust + name: xlang-rust +spec: + ports: + - name: lsp + port: 8080 + targetPort: lsp + selector: + app: xlang-rust + type: ClusterIP diff --git a/configure/xlang/go/README.md b/configure/xlang/go/README.md new file mode 100644 index 000000000000..71b20c53f068 --- /dev/null +++ b/configure/xlang/go/README.md @@ -0,0 +1,28 @@ +# Go language server + +This folder contains the deployment files for the Go language server. + +You can enable it by: + +1. Append the `kubectl apply` command for the Go language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-go -f configure/xlang/go/ --recursive >> kubectl-apply-all.sh + ``` + +2. Add the following environment variables to the `lsp-proxy` deployment to make it aware of the Go language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_GO + value: tcp://xlang-go:4389 + - name: LANGSERVER_GO_BG + value: tcp://xlang-go-bg:4389 + ``` + +3. Apply your changes to `lsp-proxy` and the Go language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml b/configure/xlang/go/xlang-go-bg.Deployment.yaml similarity index 76% rename from examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml rename to configure/xlang/go/xlang-go-bg.Deployment.yaml index dad0fb1d971b..15f78e108cfa 100644 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml +++ b/configure/xlang/go/xlang-go-bg.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: LSP server for Go (used for background indexing jobs). labels: - deploy: sourcegraph + deploy: xlang-go name: xlang-go-bg spec: minReadySeconds: 10 @@ -31,15 +29,18 @@ spec: value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - name: SOURCEGRAPH_CONFIG_FILE value: /etc/sourcegraph/config.json + # SRC_GIT_SERVERS must be kept in sync with the specified replica count in + # gitserver.Statefulset.yaml + # See ../../docs/configure.md for more information. - name: SRC_GIT_SERVERS - value: gitserver-1:3178 + value: gitserver-0.gitserver:3178 - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: CACHE_DIR value: /mnt/cache/$(POD_NAME) - image: sourcegraph/xlang-go:18575_2018-07-20_a470dcb + image: sourcegraph/xlang-go:2.11.0 livenessProbe: initialDelaySeconds: 5 tcpSocket: @@ -57,10 +58,10 @@ spec: resources: limits: cpu: "4" - memory: "8Gi" + memory: 8Gi requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /etc/sourcegraph name: sg-config @@ -68,12 +69,12 @@ spec: name: cache-ssd securityContext: runAsUser: 0 - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge volumes: - configMap: defaultMode: 464 name: config-file name: sg-config + # See ../../docs/configure.md for more information about how to increase the + # performance of this delpoyment by using an SSD. - emptyDir: {} name: cache-ssd diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml b/configure/xlang/go/xlang-go-bg.Service.yaml similarity index 77% rename from examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml rename to configure/xlang/go/xlang-go-bg.Service.yaml index 439483e62ad1..ed9efa5cd70e 100644 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml +++ b/configure/xlang/go/xlang-go-bg.Service.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml apiVersion: v1 kind: Service metadata: @@ -8,7 +6,7 @@ metadata: prometheus.io/scrape: "true" labels: app: xlang-go-bg - deploy: sourcegraph + deploy: xlang-go name: xlang-go-bg spec: ports: diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml b/configure/xlang/go/xlang-go.Deployment.yaml similarity index 79% rename from examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml rename to configure/xlang/go/xlang-go.Deployment.yaml index fb85bf14b6de..50b9871522e4 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml +++ b/configure/xlang/go/xlang-go.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: LSP server for Go (used for live requests). labels: - deploy: sourcegraph + deploy: xlang-go name: xlang-go spec: minReadySeconds: 10 @@ -31,8 +29,11 @@ spec: value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - name: SOURCEGRAPH_CONFIG_FILE value: /etc/sourcegraph/config.json + # SRC_GIT_SERVERS must be kept in sync with the specified replica count in + # gitserver.Statefulset.yaml + # See ../../docs/configure.md for more information. - name: SRC_GIT_SERVERS - value: gitserver-1:3178 + value: gitserver-0.gitserver:3178 - name: POD_NAME valueFrom: fieldRef: @@ -57,10 +58,10 @@ spec: resources: limits: cpu: "4" - memory: "8Gi" + memory: 8Gi requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /etc/sourcegraph name: sg-config @@ -73,5 +74,7 @@ spec: defaultMode: 464 name: config-file name: sg-config + # See ../../docs/configure.md for more information about how to increase the + # performance of this delpoyment by using an SSD. - emptyDir: {} name: cache-ssd diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go.Service.yaml b/configure/xlang/go/xlang-go.Service.yaml similarity index 77% rename from examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go.Service.yaml rename to configure/xlang/go/xlang-go.Service.yaml index f4a65a2d4166..f6f320278ba1 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go.Service.yaml +++ b/configure/xlang/go/xlang-go.Service.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go.Service.yaml apiVersion: v1 kind: Service metadata: @@ -8,7 +6,7 @@ metadata: prometheus.io/scrape: "true" labels: app: xlang-go - deploy: sourcegraph + deploy: xlang-go name: xlang-go spec: ports: diff --git a/configure/xlang/java/README.md b/configure/xlang/java/README.md new file mode 100644 index 000000000000..c77c338eac44 --- /dev/null +++ b/configure/xlang/java/README.md @@ -0,0 +1,72 @@ +# Java language server + +This folder contains the deployment files for the Java language server. + +## How to deploy + +You can enable it by: + +1. Append the `kubectl apply` command for the Java language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-java -f configure/xlang/java/ --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the Java language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_JAVA + value: tcp://xlang-java:2088 + - name: LANGSERVER_JAVA_BG + value: tcp://xlang-java-bg:2088 + ``` + +3. Apply your changes to `lsp-proxy` and the Java language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` + +## Gradle and Aritfactory configuration + +The `xlang-java` and `xlang-java-bg` deployments support configuring Gradle and Artifactory via the following environment variables: + +```yaml +# configure/xlang/java/xlang-java.Deployment.yaml +# configure/xlang/java/xlang-java-bg.Deployment.yaml + +env: + # A comma-delimited list of patterns that selects repository revisions + # for which to execute Gradle scripts,rather than extracting Gradle metadata statically. + # + # **Security note**: these should be restricted to repositories within your own organization. + # + # A percent sign (`%`) can be used to prefix-match. For example, `git://my.internal.host/org1/% + # git://my.internal.host/org2/repoA?%` would select all revisions of all repositories in `org1` + # and all revisions of `repoA` in `org2`. + # + # Note: this field is misnamed, as it matches against the `originalRootURI` LSP initialize parameter, + # rather than the no-longer-used `originalRootPath` parameter. + - name: EXECUTE_GRADLE_ORIGINAL_ROOT_PATHS + value: "git://my.internal.host/org1/%,git://my.internal.host/org2/repoA?%" + + # Private artifact repository ID in your build files. If you do not explicitly include the private artifact + # repository, then set this to some unique string (e.g,. `my-repository`). + - name: PRIVATE_ARTIFACT_REPO_ID + value: my-repository + + # The URL that corresponds to `PRIVATE_ARTIFACT_REPO_ID` + # (e.g., `http://my.artifactory.local/artifactory/root`). + - name: PRIVATE_ARTIFACT_REPO_URL + value: "http://my.artifactory.local/artifactory/root" + + # The username to authenticate to the private Artifactory. + - name: PRIVATE_ARTIFACT_REPO_USERNAME + value: my_username + + # The password to authenticate to the private Artifactory. + - name: PRIVATE_ARTIFACT_REPO_PASSWORD + value: hunter2 +``` diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml b/configure/xlang/java/xlang-java-bg.Deployment.yaml similarity index 75% rename from examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml rename to configure/xlang/java/xlang-java-bg.Deployment.yaml index 37e30120d71e..5c69c84e84f0 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml +++ b/configure/xlang/java/xlang-java-bg.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: LSP server for Java (used for background indexing jobs). labels: - deploy: sourcegraph + deploy: xlang-java name: xlang-java-bg spec: minReadySeconds: 10 @@ -25,9 +23,12 @@ spec: containers: - env: - name: JVM_OPT - value: -Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y + value: -Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true + -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y - name: LS_OPT value: -l INFO + # See (./README.md) for information about + # additional environment variables that you can set here. image: sourcegraph/xlang-java-skinny:2018-05-10-1621 name: xlang-java-bg ports: @@ -36,10 +37,10 @@ spec: resources: limits: cpu: "4" - memory: "8Gi" + memory: 8Gi requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /tmp name: tmp diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml b/configure/xlang/java/xlang-java-bg.Service.yaml similarity index 67% rename from examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml rename to configure/xlang/java/xlang-java-bg.Service.yaml index 4e40a94c141a..2ff5a7e87e33 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml +++ b/configure/xlang/java/xlang-java-bg.Service.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml apiVersion: v1 kind: Service metadata: labels: app: xlang-java-bg - deploy: sourcegraph + deploy: xlang-java name: xlang-java-bg spec: ports: diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml b/configure/xlang/java/xlang-java.Deployment.yaml similarity index 73% rename from examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml rename to configure/xlang/java/xlang-java.Deployment.yaml index f15fccf24837..70ec928e6b1e 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml +++ b/configure/xlang/java/xlang-java.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: LSP server for Java (used for live requests). - labels: - deploy: sourcegraph + labels: + deploy: xlang-java name: xlang-java spec: minReadySeconds: 10 @@ -25,9 +23,12 @@ spec: containers: - env: - name: JVM_OPT - value: -Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y + value: -Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true + -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y - name: LS_OPT value: -l INFO + # See (./README.md) for information about + # additional environment variables that you can set here. image: sourcegraph/xlang-java-skinny:2018-05-10-1621 name: xlang-java ports: @@ -36,10 +37,10 @@ spec: resources: limits: cpu: "4" - memory: "8Gi" + memory: 8Gi requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /tmp name: tmp diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java.Service.yaml b/configure/xlang/java/xlang-java.Service.yaml similarity index 67% rename from examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java.Service.yaml rename to configure/xlang/java/xlang-java.Service.yaml index de75751d080f..9ad16988e66b 100644 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java.Service.yaml +++ b/configure/xlang/java/xlang-java.Service.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java.Service.yaml apiVersion: v1 kind: Service metadata: labels: app: xlang-java - deploy: sourcegraph + deploy: xlang-java name: xlang-java spec: ports: diff --git a/configure/xlang/php/README.md b/configure/xlang/php/README.md new file mode 100644 index 000000000000..7fd6d718412c --- /dev/null +++ b/configure/xlang/php/README.md @@ -0,0 +1,26 @@ +# PHP language server + +This folder contains the deployment files for the PHP language server. + +You can enable it by: + +1. Append the `kubectl apply` command for the PHP language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-php -f configure/xlang/php/ --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the PHP language server's existence: + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_PHP + value: tcp://xlang-php:2088 + ``` + +3. Apply your changes to `lsp-proxy` and the PHP language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml b/configure/xlang/php/xlang-php.Deployment.yaml similarity index 83% rename from examples/with-langs/generated/sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml rename to configure/xlang/php/xlang-php.Deployment.yaml index 3f9d7dcfc829..90ad4efbe60b 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml +++ b/configure/xlang/php/xlang-php.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: LSP server for PHP. labels: - deploy: sourcegraph + deploy: xlang-php name: xlang-php spec: minReadySeconds: 10 @@ -34,10 +32,10 @@ spec: resources: limits: cpu: "4" - memory: "8Gi" + memory: 8Gi requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /tmp name: tmp diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/php/xlang-php.Service.yaml b/configure/xlang/php/xlang-php.Service.yaml similarity index 67% rename from examples/with-langs/generated/sourcegraph/templates/xlang/php/xlang-php.Service.yaml rename to configure/xlang/php/xlang-php.Service.yaml index e9880797c1bb..e824c352a4c5 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/php/xlang-php.Service.yaml +++ b/configure/xlang/php/xlang-php.Service.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/xlang/php/xlang-php.Service.yaml apiVersion: v1 kind: Service metadata: labels: app: xlang-php - deploy: sourcegraph + deploy: xlang-php name: xlang-php spec: ports: diff --git a/configure/xlang/python/README.md b/configure/xlang/python/README.md new file mode 100644 index 000000000000..9e81a273cbc7 --- /dev/null +++ b/configure/xlang/python/README.md @@ -0,0 +1,28 @@ +# Python language server + +This folder contains the deployment files for the Python language server. + +You can enable it by: + +1. Append the `kubectl apply` command for the Python language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-python -f configure/xlang/python/ --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the Python language server's existence: + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_PYTHON + value: tcp://xlang-python:2087 + - name: LANGSERVER_PYTHON_BG + value: tcp://xlang-python-bg:2087 + ``` + +3. Apply your changes to `lsp-proxy` and the Python language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml b/configure/xlang/python/xlang-python-bg.Deployment.yaml similarity index 75% rename from examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml rename to configure/xlang/python/xlang-python-bg.Deployment.yaml index 820a587c445d..fc0dc054c35f 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml +++ b/configure/xlang/python/xlang-python-bg.Deployment.yaml @@ -1,13 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: LSP server for Python (used for background indexing jobs). - labels: - deploy: sourcegraph - app: xlang-java-bg + labels: + deploy: xlang-python name: xlang-python-bg spec: minReadySeconds: 10 @@ -39,10 +36,8 @@ spec: port: lsp resources: limits: - cpu: "500m" - memory: "1G" + cpu: 500m + memory: 1G requests: - cpu: "500m" - memory: "1G" - volumeMounts: - volumes: + cpu: 500m + memory: 1G diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml b/configure/xlang/python/xlang-python-bg.Service.yaml similarity index 67% rename from examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml rename to configure/xlang/python/xlang-python-bg.Service.yaml index 25076e3b67dd..de83cd498546 100644 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml +++ b/configure/xlang/python/xlang-python-bg.Service.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml apiVersion: v1 kind: Service metadata: labels: app: xlang-python-bg - deploy: sourcegraph + deploy: xlang-python name: xlang-python-bg spec: ports: diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml b/configure/xlang/python/xlang-python.Deployment.yaml similarity index 74% rename from examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml rename to configure/xlang/python/xlang-python.Deployment.yaml index e89196432b0f..00f58b69c5ae 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml +++ b/configure/xlang/python/xlang-python.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: LSP server for Python (used for live requests). labels: - deploy: sourcegraph + deploy: xlang-python name: xlang-python spec: minReadySeconds: 10 @@ -38,12 +36,8 @@ spec: port: lsp resources: limits: - cpu: "500m" - memory: "1G" + cpu: 500m + memory: 1G requests: - cpu: "500m" - memory: "1G" - volumeMounts: - securityContext: - runAsUser: 0 - volumes: + cpu: 500m + memory: 1G diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python.Service.yaml b/configure/xlang/python/xlang-python.Service.yaml similarity index 67% rename from examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python.Service.yaml rename to configure/xlang/python/xlang-python.Service.yaml index a4339a7efa8a..33dd3f712827 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python.Service.yaml +++ b/configure/xlang/python/xlang-python.Service.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python.Service.yaml apiVersion: v1 kind: Service metadata: labels: app: xlang-python - deploy: sourcegraph + deploy: xlang-python name: xlang-python spec: ports: diff --git a/configure/xlang/typescript/README.md b/configure/xlang/typescript/README.md new file mode 100644 index 000000000000..300d1be237fb --- /dev/null +++ b/configure/xlang/typescript/README.md @@ -0,0 +1,32 @@ +# Javascript / Typescript language server + +This folder contains the deployment files for the Javascript / Typescript language server. + +You can enable it by: + +1. Append the `kubectl apply` command for the Javascript / Typescript language server deployment to `kubectl-apply-all.sh`. + + ```bash + echo kubectl apply --prune -l deploy=xlang-typescript -f configure/xlang/typescript/ --recursive >> kubectl-apply-all.sh + ``` + +2. Adding the following environment variables to the `lsp-proxy` deployment to make it aware of the Javascript / Typescript language server's existence. + + ```yaml + # base/lsp-proxy/lsp-proxy.Deployment.yaml + env: + - name: LANGSERVER_JAVASCRIPT + value: tcp://xlang-typescript:2088 + - name: LANGSERVER_JAVASCRIPT_BG + value: tcp://xlang-typescript-bg:2088 + - name: LANGSERVER_TYPESCRIPT + value: tcp://xlang-typescript:2088 + - name: LANGSERVER_TYPESCRIPT_BG + value: tcp://xlang-typescript-bg:2088 + ``` + +3. Apply your changes to `lsp-proxy` and the Javascript / Typescript language server to the cluster. + + ```bash + ./kubectl-apply-all.sh + ``` diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml b/configure/xlang/typescript/npm-proxy.Deployment.yaml similarity index 89% rename from examples/node-selector/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml rename to configure/xlang/typescript/npm-proxy.Deployment.yaml index b19ff460da56..718d26b9f40b 100644 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml +++ b/configure/xlang/typescript/npm-proxy.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: Cache for NPM. labels: - deploy: sourcegraph + deploy: xlang-typescript name: npm-proxy spec: minReadySeconds: 10 diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml b/configure/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml similarity index 67% rename from examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml rename to configure/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml index ccca8a7f3452..5593ef8ad9d6 100644 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml +++ b/configure/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml @@ -1,12 +1,11 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: volume.beta.kubernetes.io/storage-class: default labels: - deploy: sourcegraph + app: npm-proxy + deploy: xlang-typescript name: npm-proxy spec: accessModes: diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml b/configure/xlang/typescript/npm-proxy.Service.yaml similarity index 66% rename from examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml rename to configure/xlang/typescript/npm-proxy.Service.yaml index 1aabc807d18b..8f3dcb28218f 100644 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml +++ b/configure/xlang/typescript/npm-proxy.Service.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml apiVersion: v1 kind: Service metadata: labels: app: npm-proxy - deploy: sourcegraph + deploy: xlang-typescript name: npm-proxy spec: ports: diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml b/configure/xlang/typescript/xlang-typescript-bg.Deployment.yaml similarity index 85% rename from examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml rename to configure/xlang/typescript/xlang-typescript-bg.Deployment.yaml index c6eeedc70ec9..2804099091cc 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml +++ b/configure/xlang/typescript/xlang-typescript-bg.Deployment.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -7,7 +5,7 @@ metadata: description: LSP server for JavaScript and TypeScript (used for background indexing jobs). labels: - deploy: sourcegraph + deploy: xlang-typescript name: xlang-typescript-bg spec: minReadySeconds: 10 @@ -47,10 +45,10 @@ spec: resources: limits: cpu: "4" - memory: "5Gi" + memory: 5Gi requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /yarn-config name: yarn-config @@ -59,6 +57,8 @@ spec: securityContext: runAsUser: 0 volumes: + # See ../../docs/configure.md for more information about how to increase the + # performance of this deployment by using an SSD. - emptyDir: {} name: cache-ssd - configMap: diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml b/configure/xlang/typescript/xlang-typescript-bg.Service.yaml similarity index 67% rename from examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml rename to configure/xlang/typescript/xlang-typescript-bg.Service.yaml index 576d0c77b5ec..475023bac8ee 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml +++ b/configure/xlang/typescript/xlang-typescript-bg.Service.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml apiVersion: v1 kind: Service metadata: labels: app: xlang-typescript-bg - deploy: sourcegraph + deploy: xlang-typescript name: xlang-typescript-bg spec: ports: diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml b/configure/xlang/typescript/xlang-typescript.Deployment.yaml similarity index 85% rename from examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml rename to configure/xlang/typescript/xlang-typescript.Deployment.yaml index 40d9f8abe1c0..46e22d974d00 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml +++ b/configure/xlang/typescript/xlang-typescript.Deployment.yaml @@ -1,12 +1,10 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment metadata: annotations: description: LSP server for JavaScript and TypeScript (used for live requests). labels: - deploy: sourcegraph + deploy: xlang-typescript name: xlang-typescript spec: minReadySeconds: 10 @@ -46,10 +44,10 @@ spec: resources: limits: cpu: "4" - memory: "5Gi" + memory: 5Gi requests: - cpu: "500m" - memory: "2Gi" + cpu: 500m + memory: 2Gi volumeMounts: - mountPath: /yarn-config name: yarn-config @@ -58,6 +56,8 @@ spec: securityContext: runAsUser: 0 volumes: + # See ../../docs/configure.md for more information about how to increase the + # performance of this deployment by using an SSD. - emptyDir: {} name: cache-ssd - configMap: diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml b/configure/xlang/typescript/xlang-typescript.Service.yaml similarity index 66% rename from examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml rename to configure/xlang/typescript/xlang-typescript.Service.yaml index 02d0ea2c6192..196ae375b432 100644 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml +++ b/configure/xlang/typescript/xlang-typescript.Service.yaml @@ -1,11 +1,9 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml apiVersion: v1 kind: Service metadata: labels: app: xlang-typescript - deploy: sourcegraph + deploy: xlang-typescript name: xlang-typescript spec: ports: diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml b/configure/xlang/typescript/yarn-config.ConfigMap.yaml similarity index 69% rename from examples/node-selector/generated/sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml rename to configure/xlang/typescript/yarn-config.ConfigMap.yaml index 884d2134dc79..4f55c1b6fe51 100644 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml +++ b/configure/xlang/typescript/yarn-config.ConfigMap.yaml @@ -1,5 +1,3 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml apiVersion: v1 data: .yarnrc: | @@ -12,6 +10,7 @@ data: strict-ssl false kind: ConfigMap metadata: + labels: + app: yarn-config + deploy: xlang-typescript name: yarn-config - labels: - deploy: sourcegraph diff --git a/create-new-cluster.sh b/create-new-cluster.sh new file mode 100644 index 000000000000..2e3021eba35a --- /dev/null +++ b/create-new-cluster.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# This file should be filled in by customers with the `kubectl` commands that should be run on +# new cluster creation. +# +# ./kubectl-apply-all.sh already runs all the `kubectl apply` commands +# that applies your YAML files to the cluster. In addition, you should add commands +# to create Kubernetes objects which satisfy one of the following conditions: +# +# * The object is a secret that shouldn't be committed to version control. (.e.g `kubectl create secret ...`) +# * The object will never be updated after creation. (e.g., a network load balancer - `kubectl expose ...`) +# +# Objects that do not meet the above criteria should NOT be created by this script. Instead, create +# a YAML file that can be `kubectl apply`d to the cluster, version that file in this repository, and add +# the relevant `kubectl apply` command to ./kubectl-apply-all.sh + +./kubectl-apply-all.sh diff --git a/docs/admin-guide.md b/docs/admin-guide.md index 47b7ce60a45f..d5935f2dd938 100644 --- a/docs/admin-guide.md +++ b/docs/admin-guide.md @@ -4,8 +4,6 @@ This guide is intended for system administrators and operations engineers who ar Sourcegraph Data Center installation. Each section covers a topic or tool that may be helpful in managing a Data Center cluster. ---- - ## Debugging The following commands are useful to gain visibility into cluster status. @@ -48,307 +46,43 @@ The following commands are useful to gain visibility into cluster status. [Prometheus](https://prometheus.io/) is an open-source application monitoring system and time series database. It is commonly used to track key performance metrics over time, such as the following: -* QPS -* Application requests by URL route name -* HTTP response latency -* HTTP error codes -* Time since last search index update +- QPS +- Application requests by URL route name +- HTTP response latency +- HTTP error codes +- Time since last search index update -Sourcegraph Data Center includes an optional Prometheus instance. To turn on Prometheus, add the -following snippet to `values.yaml`: - -```yaml -site: { - "prometheus": {} -} -``` +Follow the [steps to deploy Prometheus](../configure/prometheus/README.md). After updating the cluster, the running Prometheus pod will be visible in the list printed by `kubectl get pods`. Once this is enabled, Prometheus will begin recording performance metrics across all services running in Sourcegraph Data Center. ---- - -### Making Prometheus accessible - -#### Port-forwarding - -Use `kubectl port-forward` to grant direct access to the Prometheus UI. This is the simplest way to -access Prometheus data, but requires access to the cluster via `kubectl`. - -1. Forward port 9090: - ```bash - kubectl port-forward $(kubectl get pods -l app=prometheus -o jsonpath="{.items[0].metadata.name}") 9090 - ``` -1. Navigate to `http://localhost:9090`. - -#### Kubernetes service - -Create a YAML file defining -a -[Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service) that -exposes the Prometheus deployment. - -We recommend using a NodePort service with the following configuration: - -```yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: prometheus - name: prometheus-node-port - namespace: default -spec: - externalTrafficPolicy: Cluster - ports: - - name: http - nodePort: 30010 - port: 30010 - protocol: TCP - targetPort: http - selector: - app: prometheus - type: NodePort -``` - -(Note: some cloud infrastructure providers support the "LoadBalancer" service type, which -automatically provisions an external load balancer for the service. We recommend against this type -of service for Prometheus, because almost certainly you do NOT want to expose Prometheus to public -Internet traffic.) - -After creating the Prometheus service, add the appropriate network ingress rules in your -infrastructure provider to allow trusted incoming traffic to access port 30010 on nodes in the -Kubernetes cluster. SECURITY NOTE: Prometheus is unauthenticated, so whatever incoming traffic the -ingress rules allow will have _complete access_ to the Prometheus UI. Be careful that the ingress -rules restrict incoming traffic to trusted sources. - -If a stable IP is required, provision a static IP and an external load balancer in lieu of adding -ingress rules. On most infrastructure providers, the steps are roughly the following: - -* Provision the static IP. -* Create an external load balancer. (On AWS, use an "Application Load Balancer".) -* Connect the internal/backend half of the load balancer to the set of nodes in the Kubernetes - cluster. (On AWS, create a "target group" that contains the instances in the cluster. On Google - Cloud, define a "target pool".) -* Connect the external/frontend half of the load balancer to the static IP. (On AWS, create a - "listener rule". On Google Cloud, create a "forwarding rule".) - -#### Exposing the Prometheus API endpoint - -Some customers may want to make the Prometheus API endpoint accessible to other services like the -following: - -* An analytics visualization tool like Grafana -* An metrics ingestion pipeline - -To expose the Prometheus API to such a service, follow the steps to expose Prometheus via Kubernetes -service with an external load balancer. Ensure that the load balancer permits incoming traffic from -the other service. The [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/) -is reachable under the path `/api/v1`. - ---- - -### Metrics - -See the [Prometheus metrics page](prom-metrics.md) for a full list of available -Prometheus metrics. - ---- - -### Sample queries - -Sourcegraph Data Center's Prometheus includes by default many useful metrics for tracking -application performance. The following are some commonly used queries that you can try out in the -UI: - -* Average (5-minute) HTTP requests per second: `job:src_http_request_count:rate5m` -* Average (5-minute) HTTP requests per second, bucketed by request duration: - `route:src_http_request_duration_seconds_bucket:rate5m` -* CPU utilization by container: `max by (container_name)(task:container_cpu_usage_seconds_total:sum{container_name=~"$name"})` -* Memory utilization by container: `max by (container_name)(container_memory_rss{container_name=~"$name"}) / 1024 / 1024 / 1024` - ---- - -### Custom recording rules - -Admins can define custom [Prometheus recording rules](https://prometheus.io/docs/practices/rules/) -via the `customPrometheusRules` configuration field. - -Add a file named `custom.rules` to the same directory that contains your `values.yaml`. Define your -recording rules in this file. Here's an example: - -``` -# This is a comment -myCustomMetric1 = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[5m]) -myCustomMetric2 = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) -``` - -Add the following flag when running the `helm upgrade ...` command: - -``` ---set site.customPrometheusRules="$(cat custom.rules)" -``` - ---- - -### Alerting - -There are two parts to creating actionable alerts: - -1. Define the alerts in Prometheus. -2. Configure [Prometheus Alertmanager](https://prometheus.io/docs/alerting/alertmanager/) to forward alerts to external - services like PagerDuty, OpsGenie, Slack, or email. - -#### Defining alerts - -The following alerts are recommended and included by default when Prometheus is enabled: - -* `PodsMissing`: Alerts when pods are missing. -* `NoPodsRunning`: Alerts when no pods are running for a service. -* `ProdPageLoadLatency`: Alerts when the page load latency is too high. -* `GoroutineLeak`: Alerts when a service has excessive running goroutines. -* `FSINodesRemainingLow`: Alerts when a node's remaining FS inodes are low. -* `DiskSpaceLow`: Alerts when a node has less than 10% available disk space. -* `DiskSpaceLowCritical`: Alerts when a node has less than 5% available disk space. -* `SearcherErrorRatioTooHigh`: Alerts when the search service has more than 10% of requests failing. - -You can view these alerts and their definitions in the Prometheus UI under the "Alerts" tab -(http://localhost:9090/alerts if you're using `kubectl port-forward` to expose the Prometheus UI). - -To define additional alerting rules, add them to a file named `custom.rules`. (If you've already created such a file for -custom recording rules, add the alerting rules to the end of the existing file.) Then ensure your `helm update ...` -command contains the following flag: - -``` ---set site.customPrometheusRules="$(cat custom.rules)" -``` - -Refer to the -[Prometheus alerting rules docs](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) for the -alert definition syntax. To see the definition of the default alerts, open the Prometheus "Alerts" tab and click on the -rule of interest. These can be useful starting points for defining new alerting rules. - -Here is an example alerting rule that fires on high page load latency (specifically when the p90 latency exceeds 20 -seconds): - -``` -ALERT ProdPageLoadLatency - IF histogram_quantile(0.9, sum(rate(src_http_request_duration_seconds_bucket{job="sourcegraph-frontend",route!="xlang",route!="lsp"}[10m])) by (le)) > 20 - LABELS { severity="page" } - ANNOTATIONS { - summary = "High page load latency", - description = "Page load latency > 20s (90th percentile over all routes; current value: {{$value}}s)", - help = "Alerts when the page load latency is too high.", - } -``` - -The default set of alerts can be disabled with the following config: - -```yaml -site: { - "prometheus": { - "noDefaultAlerts": true - }, -} -``` - -#### Alertmanager - -Enable [Alertmanager](https://prometheus.io/docs/alerting/alertmanager/) to send alerts to external services like -PagerDuty, OpsGenie, Slack, or email. To enable, do the following: - -1. Add the following to `values.yaml`: - ```yaml - site: { - "useAlertManager": true, - } - ``` -1. Create a file in the same directory called `alertmanager.yaml`. To determine the contents of this - file, refer to - the - [Alertmanager configuration documentation](https://prometheus.io/docs/alerting/configuration/). -1. Include the following flag when running `helm update ...`: - ``` - --set site.alertmanagerConfig="$(cat alertmanager.yaml)" - ``` - - ---- - ## Distributed tracing Distributed tracing tools are useful when debugging performance issues such as high query latency. Sourcegraph uses the [OpenTracing standard](http://opentracing.io/) and can be made to work with any tracing tool that satisfies that standard. Currently, two tracing tools are supported by Sourcegraph configuration: -* [Lightstep](https://lightstep.com/) -* [Jaeger](http://jaegertracing.io/) - ---- - -### Jaeger - -Jaeger is an open-source distributed tracing system created by Uber that was inspired by Dapper and OpenZipkin. When -enabled, Sourcegraph Data Center will run a Jaeger instance inside the Kubernetes cluster. - -To enable, add the following to `values.yaml`: - -```yaml -site: { - "useJaeger": true, -} -``` - -After applying the config change, some additional manual setup is required to initialize the Jaeger Cassandra DB: - -* Clone https://github.com/jaegertracing/jaeger. -* Install [cqlsh](http://cassandra.apache.org/doc/latest/tools/cqlsh.html). -* Forward port 9042: - ```bash - kubectl port-forward $(kubectl get pods -l app=jaeger-cassandra -o jsonpath='{.items[0].metadata.name}') 9042 - ``` -* In the root directory of the jaeger repositiory, run `env MODE=test sh ./plugin/storage/cassandra/schema/create.sh | cqlsh` - -To access the Jaeger UI, forward port 16686: -```bash -kubectl port-forward $(kubectl get pods -l app=jaeger-query -o jsonpath='{.items[0].metadata.name}') 16686 -``` -Then navigate to http://localhost:16686. - ---- - -### Lightstep - -Lightstep is a closed-source distributed tracing and performance monitoring tool created by some of the authors of -Dapper. - -To enable, you must first purchase Lightstep and create a project corresponding to the Sourcegraph instance. Then add -the following to `values.yaml`: - -``` -site: { - "lightstepAccessToken": "${LIGHTSTEP_TOKEN}", - "lightstepProject": "${LIGHTSTEP_PROJECT}", -} -``` +- [Lightstep](../configure/configure.md#configure-lightstep-tracing) +- [Jaeger](../configure/jaeger/README.md) ## Snapshots The `sourcegraph-server-gen` command supports creating and restoring snapshots of the database, which can be useful for backups and syncing database state from one cluster to another: -* On macOS: - ``` - curl -O https://storage.googleapis.com/sourcegraph-assets/sourcegraph-server-gen/darwin_amd64/sourcegraph-server-gen - chmod +x ./sourcegraph-server-gen - ``` -* On Linux: - ```bash - curl -O https://storage.googleapis.com/sourcegraph-assets/sourcegraph-server-gen/linux_amd64/sourcegraph-server-gen - chmod +x ./sourcegraph-server-gen - ``` +- On macOS: + ``` + curl -O https://storage.googleapis.com/sourcegraph-assets/sourcegraph-server-gen/darwin_amd64/sourcegraph-server-gen + chmod +x ./sourcegraph-server-gen + ``` +- On Linux: + ```bash + curl -O https://storage.googleapis.com/sourcegraph-assets/sourcegraph-server-gen/linux_amd64/sourcegraph-server-gen + chmod +x ./sourcegraph-server-gen + ``` Run `sourcegraph-server-gen snapshot --help` for more information. diff --git a/docs/configure.md b/docs/configure.md new file mode 100644 index 000000000000..f8f8c187f01c --- /dev/null +++ b/docs/configure.md @@ -0,0 +1,407 @@ +# Configuring Sourcegraph + +Sourcegraph Data Center is configured by applying Kubernetes YAML files and simple `kubectl` commands. + +Since everything is vanilla Kubernetes, you can configure Sourcegraph as flexibly as you need to meet the requirements of your deployment environment. +We provide simple instructions for common things like setting up TLS, enabling code intelligence, and exposing Sourcegraph to external traffic below. + +## Fork this repository + +We recommend you fork this repository to track your configuration changes in Git. +This will make upgrades far easier and is a good practice not just for Sourcegraph, but for any Kubernetes application. + +1. Create a fork of this repository. + + - The fork can be public **unless** you plan to store secrets in the repository itself. + - We recommend not storing secrets in the repository itself and these instructions document how. + +1. Create a release branch to track all of your customizations to Sourcegraph. + When you upgrade Sourcegraph Data Center, you will merge upstream into this branch. + + ```bash + git checkout HEAD -b release + ``` + + If you followed the installation instructions, `HEAD` should point at the Git tag you've deployed to your running Kubernetes cluster. + +1. Commit customizations to your release branch: + + - Commit manual modifications to Kubernetes YAML files. + - Commit commands that should be run on every update (e.g. `kubectl apply`) to [./kubectl-apply-all.sh](../kubectl-apply-all.sh). + - Commit commands that generally only need to be run once per cluster to (e.g. `kubectl create secret`, `kubectl expose`) to [./create-new-cluster.sh](../create-new-cluster.sh). + +## Dependencies + +Configuration steps in this file depend on [jq](https://stedolan.github.io/jq/), +[yj](https://github.com/sourcegraph/yj) and [jy](https://github.com/sourcegraph/jy). + +## Table of contents + +### Common configuration + +- [Configure network access](#configure-network-access) +- [Update site configuration](#update-site-configuration) +- [Configure TLS/SSL](#configure-tlsssl) +- [Configure repository cloning via SSH](#configure-repository-cloning-via-ssh) +- [Configure language servers](#configure-language-servers) +- [Configure SSDs to boost performance](../configure/ssd/README.md). + +### Less common configuration + +- [Configure gitserver replica count](#configure-gitserver-replica-count) +- [Assign resource-hungry pods to larger nodes](#assign-resource-hungry-pods-to-larger-nodes) +- [Configure a storage class](#configure-a-storage-class) +- [Configure Prometheus](../configure/prometheus/README.md) + - [Configure Alertmanager](../configure/prometheus/alertmanager/README.md) +- [Configure Jaeger tracing](../configure/jaeger/README.md) +- [Configure Lightstep tracing](#configure-lightstep-tracing) +- [Configure custom Redis](#configure-custom-redis) +- [Configure custom PostgreSQL](#configure-custom-redis) +- [Install without RBAC](#install-without-rbac) + +## Configure network access + +You need to make the main web server accessible over the network to external users. + +There are a few approaches, but using a load balancer is recommended. + +### Load balancer (recommended) + +For production environments, we recommend using a [load balancer](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/). + +Run one of the following commands depending on your desired transport protocol: + +- HTTP + ``` + kubectl expose deployment sourcegraph-frontend --type=LoadBalancer --name=sourcegraph-frontend-loadbalancer --port=80 --target-port=3080 + ``` +- HTTPS (requires you to [configure TLS/SSL](#configure-tlsssl)) + ``` + kubectl expose deployment sourcegraph-frontend --type=LoadBalancer --name=sourcegraph-frontend-loadbalancer --port=443 --target-port=3443 + ``` + +Add the command you ran to [create-new-cluster.sh](../create-new-cluster.sh) and commit the change. + +Once the load balancer has acquired an external IP address, you should be able to access Sourcegraph using that. You can check the external IP address by running the following command: + +```bash +kubectl get service sourcegraph-frontend-loadbalancer -o=custom-columns=EXTERNAL-IP:.status.loadBalancer.ingress[*].ip +``` + +### Network rule + +Add a network rule that allows ingress traffic to port 30080 (HTTP) and/or 30081 (HTTPS) on at least one node. + +- [Google Cloud Platform Firewall rules](https://cloud.google.com/compute/docs/vpc/using-firewalls). + + 1. Expose the necessary ports. + + ```bash + gcloud compute --project=$PROJECT firewall-rules create sourcegraph-frontend-http --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:30080 + gcloud compute --project=$PROJECT firewall-rules create sourcegraph-frontend-https --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:30081 + ``` + + 2. Find a node name. + + ```bash + kubectl get pods -l app=sourcegraph-frontend -o=custom-columns=NODE:.spec.nodeName + ``` + + 3. Get the EXTERNAL-IP address (will be ephemeral unless you [make it static](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-external-ip-address#promote_ephemeral_ip)). + ```bash + kubectl get node $NODE -o wide + ``` + +- [AWS Security Group rules](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html). + +Sourcegraph should now be accessible at `$EXTERNAL_ADDR:30080` and/or `$EXTERNAL_ADDR:30081`, where `$EXTERNAL_ADDR` is the address of _any_ node in the cluster. + +### Ingress controller + +You can also use an [Ingress controller](https://kubernetes.io/docs/concepts/services-networking/ingress/). + +## Update site configuration + +The site configuration is stored inside a [ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#add-configmap-data-to-a-volume), which is mounted inside every deployment that needs it. You can change the site configuration by editing +[base/config-file.ConfigMap.yaml](../base/config-file.ConfigMap.yaml). + +Updates to the site configuration are [propagated to the relevant services](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#mounted-configmaps-are-updated-automatically) in about 1 minute. ([Future Kubernetes versions will decrease this latency.](https://github.com/kubernetes/kubernetes/pull/64752)) + +For the impatient, site configuration changes can be applied immediately by changing the name of the ConfigMap. `kubectl apply`ing these changes will force the relevant pods to restart immediately with the new config: + +1. Change the name of the ConfigMap in all deployments. + + The following convenience script changes the name of the site configuration's ConfigMap (and all references to it) by appending the current date and time. This script should be run + at the root of your `deploy-sourcegraph-$VERSION` folder. + + ```bash + #!/bin/bash + + # e.g. 2018-08-15t23-42-08z + CONFIG_DATE=$(date -u +"%Y-%m-%dt%H-%M-%Sz") + + # update all references to the site config's ConfigMap + # from: 'config-file.*' , to:' config-file-$CONFIG_DATE' + find . -name "*yaml" -exec sed -i.sedibak -e "s/name: config-file.*/name: config-file-$CONFIG_DATE/g" {} + + + # delete sed's backup files + find . -name "*.sedibak" -delete + ``` + +2. Apply the new configuration to your Kubernetes cluster. + + ```bash + ./kubectl-apply-all.sh + ``` + +## Configure TLS/SSL + +If you intend to make your Sourcegraph instance accessible on the Internet or another untrusted network, you should use TLS so that all traffic will be served over HTTPS. + +1. Create a [secret](https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables) that contains your TLS certificate and private key. + + ```bash + kubectl create secret generic tls --from-file=cert=$PATH_TO_CERT --from-file=key=$PATH_TO_KEY + ``` + + Update [create-new-cluster.sh](../create-new-cluster.sh) with the previous command. + + ``` + echo kubectl create secret generic tls --from-file=cert=$PATH_TO_CERT --from-file=key=$PATH_TO_KEY >> create-new-cluster.sh + ``` + +2. Add the `TLS_CERT` and `TLS_KEY` environment variables to [base/frontend/sourcegraph-frontend.Deployment.yaml](../base/frontend/sourcegraph-frontend.Deployment.yaml). + + ```yaml + # base/frontend/sourcegraph-frontend.Deployment.yaml + env: + - name: TLS_CERT + valueFrom: + secretKeyRef: + key: cert + name: tls + - name: TLS_KEY + valueFrom: + secretKeyRef: + key: key + name: tls + ``` + + Convenience script: + + ```bash + # This script requires https://github.com/sourcegraph/jy and https://github.com/sourcegraph/yj + FE=base/frontend/sourcegraph-frontend.Deployment.yaml + cat $FE | yj | jq '(.spec.template.spec.containers[] | select(.name == "frontend") | .env) += [{name: "TLS_CERT", valueFrom: {secretKeyRef: {key: "cert", name: "tls"}}}, {name: "TLS_KEY", valueFrom: {secretKeyRef: {key: "key", name: "tls"}}}]' | jy -o $FE + ``` + +3. Change your `appURL` in the site configuration stored in `base/config-file.ConfigMap.yaml`. + + ```json + { + "appURL": "https://example.com:3443" // Must begin with "https"; replace with the public IP or hostname of your machine + } + ``` + +4. Deploy the changes by following the [instructions to update to the site configuration](#update-site-configuration). + +5. Refer to the [Configure network access](#configure-network-access) section to make sure that `sourcegraph-frontend`'s port `3443` is properly exposed. + +**WARNING:** Do NOT commit the actual TLS cert and key files to your fork (unless your fork is +private **and** you are okay with storing secrets in it). + +## Configure repository cloning via SSH + +Sourcegraph will clone repositories using SSH credentials if they are mounted at `/root/.ssh` in the `gitserver` deployment. + +1. [Create a secret](https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables) that contains the base64 encoded contents of your SSH private key (_make sure it doesn't require a password_) and known_hosts file. + + ```bash + kubectl create secret generic gitserver-ssh \ + --from-file id_rsa=${HOME}/.ssh/id_rsa \ + --from-file known_hosts=${HOME}/.ssh/known_hosts + ``` + + Update [create-new-cluster.sh](../create-new-cluster.sh) with the previous command. + + ```bash + echo kubectl create secret generic gitserver-ssh \ + --from-file id_rsa=${HOME}/.ssh/id_rsa \ + --from-file known_hosts=${HOME}/.ssh/known_hosts >> create-new-cluster.sh + ``` + +2. Mount the [secret as a volume](https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-files-from-a-pod) in [gitserver.StatefulSet.yaml](../base/gitserver/gitserver.StatefulSet.yaml). + + For example: + + ```yaml + # base/gitserver/gitserver.StatefulSet.yaml + spec: + containers: + volumeMounts: + - mountPath: /root/.ssh + name: ssh + volumes: + - name: ssh + secret: + defaultMode: 384 + secretName: gitserver-ssh + ``` + + Convenience script: + + ```bash + # This script requires https://github.com/sourcegraph/jy and https://github.com/sourcegraph/yj + GS=base/gitserver/gitserver.StatefulSet.yaml + cat $GS | yj | jq '.spec.template.spec.containers[].volumeMounts += [{mountPath: "/root/.ssh", name: "ssh"}]' | jy -o $GS + cat $GS | yj | jq '.spec.template.spec.volumes += [{name: "ssh", secret: {defaultMode: 384, secretName:"gitserver-ssh"}}]' | jy -o $GS + ``` + +3. Apply the updated `gitserver` configuration to your cluster. + + ```bash + ./kubectl-apply-all.sh + ``` + +**WARNING:** Do NOT commit the actual `id_rsa` and `known_hosts` files to your fork (unless +your fork is private **and** you are okay with storing secrets in it). + +## Configure language servers + +> Code intelligence is a paid upgrade on top of the Data Center deployment option. After following these instructions to confirm it works, [buy code intelligence](https://about.sourcegraph.com/pricing). + +Code intelligence provides advanced code navigation and cross-references for your code on Sourcegraph. + +After setting up the base Sourcegraph deployment, refer to the following docs for each language for instructions about how to deploy / configure each language server: + +- [Go](../configure/xlang/go/README.md) +- [Java](../configure/xlang/java/README.md) +- [PHP](../configure/xlang/php/README.md) +- [Python](../configure/xlang/python/README.md) +- [Javascript / Typescript](../configure/xlang/typescript/README.md) + +We also have the following experimental language servers (please [read about the caveats](https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers/#caveats-of-experimental-language-servers) before enabling them): + +- [Bash](../configure/xlang/experimental/bash/README.md) +- [Clojure](../configure/xlang/experimental/clojure/README.md) +- [C++](../configure/xlang/experimental/cpp/README.md) +- [C#](../configure/xlang/experimental/cs/README.md) +- [CSS](../configure/xlang/experimental/css/README.md) +- [Dockerfile](../configure/xlang/experimental/dockerfile/README.md) +- [Elixir](../configure/xlang/experimental/elixir/README.md) +- [HTML](../configure/xlang/experimental/html/README.md) +- [Lua](../configure/xlang/experimental/lua/README.md) +- [OCaml](../configure/xlang/experimental/ocaml/README.md) +- [R](../configure/xlang/experimental/r/README.md) +- [Ruby](../configure/xlang/experimental/ruby/README.md) +- [Rust](../configure/xlang/experimental/rust/README.md) + +## Configure gitserver replica count + +Repository clones are consistently striped across all `gitserver` replicas. Other services need to be aware of how many `gitserver` replicas exist so they can resolve an individual repo. + +To change the number of `gitserver` replicas: + +1. Update the `replicas` field in [gitserver.StatefulSet.yaml](../base/gitserver/gitserver.StatefulSet.yaml). +2. Update the `SRC_GIT_SERVERS` environment variable in all services to reflect the number of replicas. + + For example, if there are 2 gitservers then `SRC_GIT_SERVERS` should have the value `gitserver-0.gitserver:3178 gitserver-1.gitserver:3178`. + + ```yaml + - env: + - name: SRC_GIT_SERVERS + value: gitserver-0.gitserver:3178 gitserver-1.gitserver:3178 + ``` + +Here is a convenience script that performs both steps: + +```bash +# This script requires https://github.com/sourcegraph/jy and https://github.com/sourcegraph/yj + +REPLICA_COUNT=2 # number of gitserver replicas + +# Update gitserver replica count +cat $GS | yj | jq ".spec.replicas = \"$REPLICA_COUNT\"" | jy -o $GS + +# Compute all gitserver names +GITSERVERS=$(for i in `seq 0 $(($REPLICA_COUNT-1))`; do echo -n "gitserver-$i.gitserver:3178 "; done) + +# Update SRC_GIT_SERVERS environment variable in other services +find . -name "*yaml" -exec sed -i.sedibak -e "s/value: gitserver-0.gitserver:3178.*/value: $GITSERVERS/g" {} + + +# Delete sed's backup files +find . -name "*.sedibak" -delete +``` + +Commit the outstanding changes. + +## Assign resource-hungry pods to larger nodes + +If you have a heterogeneous cluster where you need to ensure certain more resource-hungry pods are assigned to more powerful nodes (e.g. `indexedSearch`), you can [specify node constraints](https://kubernetes.io/docs/concepts/configuration/assign-pod-node) (such as `nodeSelector`, etc.). + +This is useful if, for example, you have a very large monorepo that performs best when `gitserver` +and `searcher` are on very large nodes, but you want to use smaller nodes for +`sourcegraph-frontend`, `repo-updater`, etc. Node constraints can also be useful to ensure fast +updates by ensuring certain pods are assigned to specific nodes, preventing the need for manual pod +shuffling. + +See [the official documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) for instructions about applying node constraints. + +## Configure a storage class + +Sourcegraph relies on the default storage class of your cluster. If your cluster does not have a default storage class or if you wish to use a different storage class for Sourcegraph, then you need to update all PersistentVolumeClaims with the name of the desired storage class. + +```bash +# This script requires https://github.com/sourcegraph/jy and https://github.com/sourcegraph/yj +find . -name "*PersistentVolumeClaim.yaml" -exec sh -c "cat {} | yj | jq '.spec.storageClassName = \"$STORAGE_CLASS_NAME\"' | jy -o {}" \; +``` + +## Configure Lightstep tracing + +Lightstep is a closed-source distributed tracing and performance monitoring tool created by some of the authors of Dapper. Every Sourcegraph deployment supports Lightstep, and it can be configured via the following environment variables (with example values): + +```yaml +env: + # https://about.sourcegraph.com/docs/config/site/#lightstepproject-string + - name: LIGHTSTEP_PROJECT + value: my_project + + # https://about.sourcegraph.com/docs/config/site/#lightstepaccesstoken-string + - name: LIGHTSTEP_ACCESS_TOKEN + value: abcdefg + + # If false, any logs (https://github.com/opentracing/specification/blob/master/specification.md#log-structured-data) + # from spans will be omitted from the spans sent to Lightstep. + - name: LIGHTSTEP_INCLUDE_SENSITIVE + value: true +``` + +To enable this, you must first purchase Lightstep and create a project corresponding to the Sourcegraph instance. Then, add the above environment to each deployment. + +## Configure custom Redis + +Sourcegraph supports specifying a custom Redis server for: + +- caching information (specified via the `REDIS_CACHE_ENDPOINT` environment variable) +- storing information (session data) (specified via the `REDIS_STORE_ENDPOINT` environment variable) + +If you want to specify a custom Redis server, you'll need specify the corresponding environment variable for each of the following deployments: + +- `sourcegraph-frontend` +- `indexer` +- `lsp-proxy` +- `repo-updater` +- `xlang-go` +- `xlang-go-bg` + +## Configure custom PostgreSQL + +You may prefer to configure Sourcegraph to store data in an external PostgreSQL instance if you already have existing database management or backup infrastructure. + +Simply edit the relevant PostgreSQL environment variables (e.g. PGHOST, PGPORT, PGUSER, [etc.](http://www.postgresql.org/docs/current/static/libpq-envars.html)) in [base/frontend/sourcegraph-frontend.Deployment.yaml](../base/frontend/sourcegraph-frontend.Deployment.yaml) to point to your existing PostgreSQL instance. + +## Install without RBAC + +Sourcegraph Data Center communicates with the Kubernetes API for service discovery. It also has some janitor DaemonSets that clean up temporary cache data. To do that we need to create RBAC resources. + +If using RBAC is not an option, then you will not want to apply `*.Role.yaml` and `*.RoleBinding.yaml` files. diff --git a/docs/install.md b/docs/install.md index f9d2ab6053e1..89e32c695262 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,208 +1,65 @@ -# Installation - -## Requirements - -* kubectl, v1.8.6 or later -* Helm, v2.9.1 or later -* Access to server infrastructure on which you can create a Kubernetes cluster (see - [resource allocation guidelines](scale.md)) - -## Install +# Installing Sourcegraph > **Note:** Sourcegraph sends performance and usage data to Sourcegraph to help us make our product > better for you. The data sent does NOT include any source code or file data (including URLs that -> might implicitly contain this information). You can view traces and disable telemetry in the site +> might implicitly contain this information). You can view traces and disable telemetry in the site > admin area on the server. -Sourcegraph Data Center is deployed using Kubernetes. Before proceeding with these -instructions, [provision a Kubernetes](k8s.md) cluster on the infrastructure of your choice. Make -sure you have [configured `kubectl` to access your cluster](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/). +## Requirements +- [Kubernetes](https://kubernetes.io/) v1.8.7 or later +- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.9.7 or later +- Access to server infrastructure on which you can create a Kubernetes cluster (see + [resource allocation guidelines](scale.md)). -1. Install Tiller with RBAC privileges (the server-side counterpart to Helm) on your cluster: +## Steps - ```bash - # Give Helm privileges to create RBAC resources. - kubectl create serviceaccount --namespace kube-system tiller - kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller +1. [Provision a Kubernetes cluster](k8s.md) on the infrastructure of your choice. +1. Make sure you have configured `kubectl` to [access your cluster](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/). - # Add Helm to your cluster using the created service account. - helm init --service-account tiller - ``` + - If you are using GCP, you'll need to give your user the ability to create roles in Kubernetes [(see GCP's documentation)](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#prerequisites_for_using_role-based_access_control): - * If installing Tiller is not an option, consult the instructions below - for [installing without Tiller](#install-without-tiller). - * If your Kubernetes environment does not permit RBAC, consult the instructions below - for [installing without RBAC](#install-without-rbac). + ```bash + kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user $USER_EMAIL_ADDRESS + ``` -1. Create a `values.yaml` file with the following contents: +1. Clone this repository and check out the version tag you wish to deploy. - ``` - cluster: - storageClass: - create: {none,aws,gcp} - name: $NAME - zone: $ZONE - site: { - "auth.providers": [{"type": "builtin", "allowSignup": false}], - } + ```bash + # Go to https://github.com/sourcegraph/deploy-sourcegraph/tags and select the latest version tag + git clone https://github.com/sourcegraph/deploy-sourcegraph && cd deploy-sourcegraph && git checkout ${VERSION} ``` - - If using Google Cloud, set `cluster.storageClass.create` to `gcp` and - `cluster.storageClass.zone` to the zone of your cluster (e.g., `us-west1-a`). Delete the - `cluster.storageClass.name` line. - - If using AWS, set `cluster.storageClass.create` to `aws` and `cluster.storageClass.zone` to the - zone of your cluster (e.g., `us-east-1a`). Delete the `cluster.storageClass.name` line. - - If using Azure, set `cluster.storageClass.create` to `none` and set `cluster.storageClass.name` - to `managed-premium`. Delete the `cluster.storageClass.zone` line. - - If using anything else OR if you would prefer to provide your own storage class, set - `cluster.storageClass.create` to `none` and delete `cluster.storageClass.name` and - `cluster.storageClass.zone`. Now create - a [storage class](https://kubernetes.io/docs/concepts/storage/storage-classes/) in your - Kubernetes cluster with name "default". We recommend that the storage class use SSDs as the - underlying disk type. For more info, see the section below on "creating a storage class - manually". - -1. Install the Helm chart to your cluster: +1. Deploy the desired version of Sourcegraph to your cluster: ```bash - helm install --name sourcegraph -f values.yaml https://github.com/sourcegraph/datacenter/archive/latest.tar.gz + ./kubectl-apply-all.sh ``` - If you see the error `could not find a ready tiller pod`, wait a minute and try again. - -1. Confirm that your deployment is launching by running `kubectl get pods`. If pods get stuck in `Pending` - status, see the [Troubleshooting page](troubleshoot.md). - -1. When the deployment completes, you need to make the main web server accessible over the network to external users. To - do so, connect port 30080 (or the value of `httpNodePort` in the site config) on the nodes in the cluster to the - Internet. The easiest way to do this is to add a network rule that allows ingress traffic to port 30080 on at least - one node - (see - [AWS Security Group rules](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html), - [Google Cloud Platform Firewall rules](https://cloud.google.com/compute/docs/vpc/using-firewalls)). - Sourcegraph should then be accessible at `$EXTERNAL_ADDR:30080`, where `$EXTERNAL_ADDR` is the - address of *any* node in the cluster. For production environments, we recommend using - an [Internet Gateway](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Internet_Gateway.html) (or - equivalent) and configuring a load balancer in Kubernetes. +1. Monitor the status of the deployment. -You will now see the Sourcegraph setup page when you visit the address of your instance. If you made your instance -accessible on the public Internet, make sure you secure it before adding your private repositories. - -### Add language servers for code intelligence - -> Code intelligence is a [paid upgrade](https://about.sourcegraph.com/pricing/) on top of the Data -> Center deployment option. After following these instructions to confirm it -> works, [buy code intelligence](https://about.sourcegraph.com/contact/sales). - -[Code intelligence](https://about.sourcegraph.com/docs/code-intelligence) provides advanced code -navigation and cross-references for your code on Sourcegraph. - -To enable code intelligence, add a `site.langservers` property to your `values.yaml` file specifying which -language servers to run (omitting languages you don't want): - -```yaml -# values.yaml - -site: { - "langservers": [ - { "language": "go" }, - { "language": "javascript" }, - { "language": "typescript" }, - { "language": "python" }, - { "language": "java" }, - { "language": "php" } - ] -} -``` - -After modifying `values.yaml`, update your cluster: - -```bash -helm upgrade -f values.yaml sourcegraph https://github.com/sourcegraph/datacenter/archive/$VERSION.tar.gz -``` - -For more information, -* Refer to the [examples](../examples) directory for an example of a cluster config with code - intelligence enabled. -* See the [language-specific docs](https://about.sourcegraph.com/docs/code-intelligence) for - configuring specific languages. -* [Contact us](mailto:support@sourcegraph.com) with questions or problems relating to code - intelligence. + ```bash + watch kubectl get pods -o wide + ``` -### Additional configuration +1. Once the deployment completes, verify Sourcegraph is running by temporarily making the frontend port accessible: -You can set additional fields in `values.yaml` to configure your Sourcegraph instance. The `values.yaml` file is split into two top-level fields: + kubectl 1.9.x: -- `site` defines Sourcegraph site configuration. For the full list of options, see "[Sourcegraph site configuration options](https://about.sourcegraph.com/docs/config/site)". -- `cluster` defines settings specific to the configuration of the Kubernetes cluster, like replica counts and CPU/memory - allocation. Refer to [`../values.yaml`](../values.yaml) in this repository to see which `cluster` fields can be overridden. + ```bash + kubectl port-forward $(kubectl get pod -l app=sourcegraph-frontend -o template --template="{{(index .items 0).metadata.name}}") 30080:3080 + ``` -The default configuration is defined in this repository's [top-level `values.yaml`](../values.yaml). + kubectl 1.10.0 or later: -For common site configuration tasks, see: + ``` + kubectl port-forward svc/sourcegraph-frontend 30080 + ``` -- "[Add repositories](https://about.sourcegraph.com/docs/config/repositories)" -- "[User authentication](https://about.sourcegraph.com/docs/config/authentication)" (passwords, SAML, OpenID Connect, HTTP proxy auth, etc.) -- "[Use a custom domain](https://about.sourcegraph.com/docs/config/custom-domain)" -- "[Using TLS/SSL](https://about.sourcegraph.com/docs/config/tlsssl)" -- "[Monitoring and tracing](https://about.sourcegraph.com/docs/config/monitoring-and-tracing)" + Open http://localhost:30080 in your browser and you will see a setup page. Congrats, you have Sourcegraph up and running! -After updating configuration, follow the [update instructions](./update.md) to apply the changes to -your Sourcegraph Data Center instance. +1. Now [configure your deployment](configure.md). ### Troubleshooting -See the [Troubleshooting page](troubleshoot.md). - - -### Install without RBAC - -Sourcegraph Data Center communicates with the Kubernetes API for service discovery. It also has some janitor DaemonSets -that clean up temporary cache data. To do that we need to create RBAC resources. For details, see -Helm's -[Role-based Access Control documentation](https://github.com/kubernetes/helm/blob/v2.8.2/docs/rbac.md). - -If using RBAC is not an option, then -* Set `"site.rbac": "disabled"` in your `values.yaml` -* Run `helm init` instead of `helm init --service-account tiller` to install Tiller. - - -### Install without Tiller - -If installing Tiller is not an option, you can locally generate the Kubernetes configuration by running the following: - -``` -mkdir -p generated -wget https://github.com/sourcegraph/datacenter/archive/latest.tar.gz -helm template -f values.yaml latest.tar.gz --output-dir=generated -kubectl apply -R -f generated/sourcegraph/templates -``` - -### Creating a storage class manually - -If `cluster.storageClass.create` is set to `none`, then you will need to create a storage class manually: - -1. Create a file called `storage-class.yaml` that meets - the [requirements described in the Kubernetes docs](https://kubernetes.io/docs/concepts/storage/storage-classes/). - The name of the storage class should match the name set in `cluster.storageClass.name` ("default" by default). We - recommend specifying SSDs as the disk type if possible. -1. Run `kubectl apply -f storage-class.yaml`. -1. You should see the storage class appear when you run `kubectl get storageclass`. - -After installing the Sourcegraph Helm chart, you should see persistent volume claims (`kubectl get pvc`) bound to -volumes provisioned using this storage class. - -### Secrets - -In some cases, it is desirable to set config fields to the contents of external files. The Helm CLI -supports this with the `--set` flag. For example, if you had an AWS Code Commit access key and a SSH -`known_hosts` file, you could use the following command to incorporate these values into the config -while deploying: - -```bash -helm install --name sourcegraph -f values.yaml \ - --set "site.awsCodeCommit[0].secretAccessKey"="$(cat secretAccessKeyFile)" \ - --set "cluster.gitserver.ssh.known_hosts"="$(cat known_hosts)" \ - https://github.com/sourcegraph/datacenter/archive/latest.tar.gz -``` +See the [Troubleshooting docs](troubleshoot.md). diff --git a/docs/migrate.md b/docs/migrate.md new file mode 100644 index 000000000000..f5cd9e4f0551 --- /dev/null +++ b/docs/migrate.md @@ -0,0 +1,79 @@ +# Migrating from Data Center 2.10.x or prior + +Two things have changed in 2.11.x that require migration: + +- Gitserver is now configured using [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/). +- We have [a new deployment strategy](#why-is-there-a-new-deployment-strategy). + +## Deferring migration + +If you want to update to 2.11.x without performing any migrations, you can use 2.11.x-no-migration tags. + +2.12.x will require this migration. + +## Migrating + +These steps will uninstall Sourcegraph from your cluster while preserving your data. Then you will be able to deploy Sourcegraph using the new process. If you would like help with this process, please reach out to support@sourcegraph.com. + +**Please read through all instructions first before starting the migration so you know what is involved** + +1. Make a backup of the yaml deployed to your cluster. + + ```bash + kubectl get all --export -o yaml > backup.yaml + ``` + +2. Set the reclaim policy for your existing deployments to `retained`. + + ```bash + kubectl get pv -o json | jq --raw-output ".items | map(select(.spec.claimRef.name)) | .[] | \"kubectl patch pv -p '{\\\"spec\\\":{\\\"persistentVolumeReclaimPolicy\\\":\\\"Retain\\\"}}' \\(.metadata.name)\"" | bash + ``` + +3. (**Downtime starts here**) Delete the `sourcegraph` release from your cluster. + + ```bash + helm del --purge sourcegraph + ``` + +4. Remove `tiller` from your cluster + + ```bash + helm reset + ``` + +5. Update the old persistent volumes so they can be reused by the new deployment + + ```bash + # mark all persistent volumes as claimable by the new deployments + + kubectl get pv -o json | jq --raw-output ".items | map(select(.spec.claimRef.name)) | .[] | \"kubectl patch pv -p '{\\\"spec\\\":{\\\"claimRef\\\":{\\\"uid\\\":null}}}' \\(.metadata.name)\"" | bash + + # rename the `gitserver` persistent volumes so that the new `gitserver` stateful set can re-use it + + kubectl get pv -o json | jq --raw-output ".items | map(select(.spec.claimRef.name | contains(\"gitserver-\"))) | .[] | \"kubectl patch pv -p '{\\\"spec\\\":{\\\"claimRef\\\":{\\\"name\\\":\\\"repos-gitserver-\\(.spec.claimRef.name | ltrimstr(\"gitserver-\") | tonumber - 1)\\\"}}}' \\(.metadata.name)\"" | bash + ``` + +6. Proceed with the normal [installation steps](install.md). + +7. The previous step produces a fresh base state, so you will need to reconfigure your cluster by following the relevant steps in [configure.md](configure.md) (e.g. exposing ports, applying your site config, enabling other services like language servers, Prometheus, Alertmanager, Jaeger, etc.). + + If you were previously configuring Gradle and Artifactory for the Java Language Server, you'll now need to set those options via environment variables instead of just the site configuration. [configure/xlang/java/README.md](../configure/xlang/java/README.md#Gradle-and-Aritfactory-configuration) contains information about the environment variables that you'll need to set. + + **Downtime ends once installation and configuration is complete** + +## Why is there a new deployment strategy? + +2.10.x and prior was deployed by configuring `values.yaml` and using `helm` to generate the final yaml to deploy to a cluster. + +There were a few downsides with this approach: + +- `values.yaml` was a custom configuration format defined by us which implicitly made configuring certain Kubernetes settings special cases. We didn't want this to grow over time into an unmaintainable/unusable mess. +- If customers wanted to configure things not supported in `values.yaml`, then we would either need to add support or the customer would need to make further modifications to the generated yaml. +- Writing Go templates inside of yaml was error prone and hard to maintain. It was too easy to make a silly mistake and generate invalid yaml. Our editors could not help us because Go template logic made the yaml templates not valid yaml. +- It required using `helm` to generate templates even though some customers don't care to use `helm` to deploy the yaml. + +Our new approach is simpler and more flexible. + +- We have removed our dependency on `helm`. It is no longer needed to generate templates, and we no longer recommend it as the easiest way to deploy our yaml to a cluster. You are still free to use `helm` to deploy to your cluster if you wish. +- Our base config is pure yaml which can be deployed directly to a cluster. It is easier for you to use, and also easier for us to maintain. +- You can configure our base yaml using whatever process best for you (Git ops, [Kustomize](https://github.com/kubernetes-sigs/kustomize), custom scripts, etc.). We provide [documentation and recipies for common customizations](configure.md). diff --git a/docs/scale.md b/docs/scale.md index 8518072628d6..084a22543174 100644 --- a/docs/scale.md +++ b/docs/scale.md @@ -7,14 +7,12 @@ parameters can yield a drastic improvement in performance. > For assistance scaling and tuning > Sourcegraph, [contact us](https://about.sourcegraph.com/contact/). We're happy to help! - ## Tuning replica counts for horizontal scalability By default, your cluster has a single pod for each of `sourcegraph-frontend`, `searcher`, and `gitserver`. You can increase the number of replicas of each of these services to handle higher scale. -We recommend setting the `sourcegraph-frontend`, `searcher`, and `gitserver` replica counts according to the following -table. See the following sections for how to modify your `values.yaml` file to apply these changes. +We recommend setting the `sourcegraph-frontend`, `searcher`, and `gitserver` replica counts according to the following tables:
@@ -26,31 +24,38 @@ table. See the following sections for how to modify your `values.yaml` file to a | 4000-10000 | 18 | | 10000+ | 28 | +_You can change the replica count of `sourcegraph-frontend` by editing [base/frontend/sourcegraph-frontend.Deployment.yaml](../base/frontend/sourcegraph-frontend.Deployment.yaml)._ +
-| Repositories | Number of `searcher` replicas | -| ------------ | ------------------------------------ | -| 1-20 | 1 | -| 20-50 | 2 | -| 50-200 | 3-5 | -| 200-1k | 5-10 | -| 1k-5k | 10-15 | -| 5k-25k | 20-40 | +| Repositories | Number of `searcher` replicas | +| ------------ | ------------------------------------------------------------------------------ | +| 1-20 | 1 | +| 20-50 | 2 | +| 50-200 | 3-5 | +| 200-1k | 5-10 | +| 1k-5k | 10-15 | +| 5k-25k | 20-40 | | 25k+ | 40+ ([contact us](https://about.sourcegraph.com/contact/) for scaling advice) | | Monorepo | 1-25 ([contact us](https://about.sourcegraph.com/contact/) for scaling advice) | +_You can change the replica count of `searcher` by editing [base/searcher/searcher.Deployment.yaml](../base/searcher/searcher.Deployment.yaml)._ +
-| Repositories | Number of `gitserver` replicas | -| ------------ | ----------------------------------- | -| 1-200 | 1 | -| 200-500 | 2 | -| 500-1000 | 3 | -| 1k-5k | 4-8 | -| 5k-25k | 8-20 | +| Repositories | Number of `gitserver` replicas | +| ------------ | ----------------------------------------------------------------------------- | +| 1-200 | 1 | +| 200-500 | 2 | +| 500-1000 | 3 | +| 1k-5k | 4-8 | +| 5k-25k | 8-20 | | 25k+ | 20+ ([contact us](https://about.sourcegraph.com/contact/) for scaling advice) | | Monorepo | 1 ([contact us](https://about.sourcegraph.com/contact/) for scaling advice) | +_Read [docs/configure.md](docs/configure.md#Configure-gitserver-replica-count) to learn about how to change +the replica count of `gitserver`._ +
--- @@ -59,81 +64,25 @@ table. See the following sections for how to modify your `values.yaml` file to a When you're using Sourcegraph with many repositories (100s-10,000s), the most important parameters to tune are: -* `sourcegraph-frontend` CPU/memory resource allocations -* `searcher` replica count -* `indexedSearch` CPU/memory resource allocations -* `gitserver` replica count -* `symbols` replica count and CPU/memory resource allocations -* `gitMaxConcurrentClones`, because `git clone` and `git fetch` operations are IO- and CPU-intensive -* `repoListUpdateInterval` (in minutes), because each interval triggers `git fetch` operations for all repositories +- `sourcegraph-frontend` CPU/memory resource allocations +- `searcher` replica count +- `indexedSearch` CPU/memory resource allocations +- `gitserver` replica count +- `symbols` replica count and CPU/memory resource allocations +- `gitMaxConcurrentClones`, because `git clone` and `git fetch` operations are IO- and CPU-intensive +- `repoListUpdateInterval` (in minutes), because each interval triggers `git fetch` operations for all repositories Consult the tables above for the recommended replica counts to use. **Note:** the `gitserver` replica count is specified -differently from the replica counts for other services; this will be standardized in a future release (in a -backward-compatible manner). - -The following configuration fragment shows a sample configuration for using Sourcegraph with a large number of -repositories: - -```yaml -cluster: - frontend: - replicas: 4 - containers: - frontend: - limits: - cpu: "8" - memory: 8G - requests: - cpu: "8" - memory: 8G - searcher: - replicas: 8 - indexedSearch: - replicas: 1 - containers: - zoekt-indexserver: - limits: - cpu: "4" - memory: 5G - requests: - cpu: "4" - memory: 5G - zoekt-webserver: - limits: - cpu: "2" - memory: 10G - requests: - cpu: "2" - memory: 10G - symbols: - replicas: 2 - containers: - symbols: - limits: - cpu: "4" - memory: 4G - requests: - cpu: "4" - memory: 4G - gitserver: - shards: 3 -``` +differently from the replica counts for other services; read [docs/configure.md](docs/configure.md#Configure-gitserver-replica-count) to learn about how to change +the replica count of `gitserver`. Notes: -* After you change the `gitserver` shard count and run `helm upgrade`, you may see an error of the - form `Error: UPGRADE FAILED: PersistentVolumeClaim "indexed-search" is invalid: spec: Forbidden: - field is immutable after creation`. This occurs because the `indexed-search` volume's size - depends on the `gitserver` replica count, and your Kubernetes cluster is running on - infrastructure that does not support online volume resizing. To fix this, first `helm rollback - sourcegraph N` (where `N` is the previous version number as reported by `helm history sourcegraph`). - Then run `kubectl delete deployment indexed-search && kubectl delete pvc - indexed-search` and `helm upgrade sourcegraph ./helm-chart` again. -* If your change requires `gitserver` pods to be restarted and they are scheduled on another node - when they restart, they may go offline for 60-90 seconds (and temporarily show a `Multi-Attach` - error). This delay is caused by Kubernetes detaching and reattaching the volume. Mitigation - steps depend on your cloud provider; [contact us](https://about.sourcegraph.com/contact/) for - advice. +- If your change requires `gitserver` pods to be restarted and they are scheduled on another node + when they restart, they may go offline for 60-90 seconds (and temporarily show a `Multi-Attach` + error). This delay is caused by Kubernetes detaching and reattaching the volume. Mitigation + steps depend on your cloud provider; [contact us](https://about.sourcegraph.com/contact/) for + advice. --- @@ -142,78 +91,11 @@ Notes: When you're using Sourcegraph with a large monorepo (or several large monorepos), the most important parameters to tune are: -* `sourcegraph-frontend` CPU/memory resource allocations -* `searcher` CPU/memory resource allocations (allocate enough memory to hold all non-binary files in your repositories) -* `indexedSearch` CPU/memory resource allocations (for the `zoekt-indexserver` pod, allocate enough memory to hold all non-binary files in your largest repository; for the `zoekt-webserver` pod, allocate enough memory to hold ~2.7x the size of all non-binary files in your repositories) -* `symbols` CPU/memory resource allocations -* `gitserver` CPU/memory resource allocations (allocate enough memory to hold your Git packed bare repositories) - -**Note:** the `gitserver` resource allocations are specified differently (one per replica) from the those for other -services; this will be standardized in a future release (in a backward-compatible manner). - -The following configuration fragment shows a sample configuration for using Sourcegraph with multi-gigabyte monorepo: - -```yaml -cluster: - frontend: - replicas: 1 - containers: - frontend: - limits: - cpu: "4" - memory: 8G - requests: - cpu: "4" - memory: 8G - searcher: - replicas: 1 - containers: - searcher: - limits: - cpu: "4" - memory: 10G - requests: - cpu: "4" - memory: 10G - indexedSearch: - replicas: 1 - containers: - zoekt-indexserver: - limits: - cpu: "4" - memory: 8G - requests: - cpu: "4" - memory: 8G - zoekt-webserver: - limits: - cpu: "2" - memory: 27G - requests: - cpu: "2" - memory: 27G - symbols: - replicas: 1 - containers: - symbols: - limits: - cpu: "8" - memory: 8G - requests: - cpu: "8" - memory: 8G - gitserver: - shards: 1 - containers: - gitserver: - limits: - cpu: "4" - memory: 16G - requests: - cpu: "4" - memory: 16G -``` - +- `sourcegraph-frontend` CPU/memory resource allocations +- `searcher` CPU/memory resource allocations (allocate enough memory to hold all non-binary files in your repositories) +- `indexedSearch` CPU/memory resource allocations (for the `zoekt-indexserver` pod, allocate enough memory to hold all non-binary files in your largest repository; for the `zoekt-webserver` pod, allocate enough memory to hold ~2.7x the size of all non-binary files in your repositories) +- `symbols` CPU/memory resource allocations +- `gitserver` CPU/memory resource allocations (allocate enough memory to hold your Git packed bare repositories) --- @@ -225,26 +107,7 @@ Kubernetes [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostp same IO speed as the underlying node's disk. Even if the node's default disk is a SSD, however, it is likely network-mounted rather than local. -Some cloud providers optionally mount local SSDs. If you mount local SSDs on your nodes, add the -following to your site configuration to make Sourcegraph use the local SSDs: - -```yaml -site: { - "nodeSSDPath": "${SSD_MOUNT_PATH}", -} -``` - -Replace `${SSD_MOUNT_PATH}` with the absolute directory path on the node where the local SSD is mounted. - -For example, on Google Cloud Platform, -add [Local SSDs](https://cloud.google.com/compute/docs/disks/local-ssd) to the nodes running the -searcher pods. Then add the following to your site config: - -```yaml -site: { - "nodeSSDPath": "/mnt/disks/ssd0", -} -``` +See [configure/ssd/README.md](../configure/ssd/README.md) for instructions about configuring SSDs. --- @@ -271,126 +134,4 @@ Kubernetes cluster, based on the number of users in your organization: ## Using heterogeneous node pools with `nodeSelector` -If you're using multiple node pools in your Kubernetes cluster with different underlying node types, -you can -use -[node selectors](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) -to ensure that the cluster schedules pods on the most appropriate nodes. - -This is useful if, for example, you have a very large monorepo that performs best when `gitserver` -and `searcher` are on very large nodes, but you want to use smaller nodes for -`sourcegraph-frontend`, `repo-updater`, etc. Node selectors can also be useful to ensure fast -updates by ensuring certain pods are assigned to specific nodes, preventing the need for manual pod -shuffling. - -To use node selectors, do the following: - -1. Apply the label to the desired nodes in the cluster. For example, to reserve one of the nodes in - the cluster for the `indexed-search` pod, run the following: - - ```bash - kubectl label nodes node_type=indexed-search - ``` - - Then run the following for all the other nodes in the cluster: - - ```bash - kubectl label nodes node_type=regular - ``` - - If either of these fails with an "invalid command" error, you are likely using an older version - of Kubernetes and can refer to - the - [legacy instructions for applying a label to a node](https://github.com/kubernetes/kubernetes/blob/a053dbc313572ed60d89dae9821ecab8bfd676dc/examples/node-selection/README.md). - -1. Set `cluster.${DEPLOYMENT}.nodeSelector` to the appropriate map of selectors for each deployment in `values.yaml`: - - ```yaml - cluster: - frontend: - nodeSelector: - node_type: regular - searcher: - nodeSelector: - node_type: regular - symbols: - nodeSelector: - node_type: regular - gitserver: - nodeSelector: - node_type: regular - indexedSearch: - nodeSelector: - node_type: indexed-search - lspProxy: - nodeSelector: - node_type: regular - xlangGo: - nodeSelector: - node_type: regular - xlangJava: - nodeSelector: - node_type: regular - xlangJavascriptTypescript: - nodeSelector: - node_type: regular - xlangPython: - nodeSelector: - node_type: regular - xlangPHP: - nodeSelector: - node_type: regular - ``` - - Note: you must apply a `nodeSelector` label to every deployment in order to ensure that no - non-`indexed-search` deployment pods are ever assigned to the `index-search`-labeled node. - -In addition to user-defined labels, Kubernetes has a -some -[built-in labels](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#interlude-built-in-node-labels), -which you can use if you have a heterogeneous cluster where you wish certain pods to be assigned to -certain types of nodes. For example, if you had a heterogeneous AWS cluster with `m4.2xlarge` and -`m4.10xlarge` instances and you wished to reserve the `m4.10xlarge` instances for `indexed-search`, -you could add the following to `values.yaml`: - - ```yaml - cluster: - frontend: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - searcher: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - symbols: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - gitserver: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - indexedSearch: - nodeSelector: - beta.kubernetes.io/instance-type: m4.10xlarge - lspProxy: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - xlangGo: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - xlangJava: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - xlangJavascriptTypescript: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - xlangPython: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - xlangPHP: - nodeSelector: - beta.kubernetes.io/instance-type: m4.2xlarge - ``` - -Again, you must apply a `nodeSelector` label to every deployment in order to ensure that no -non-`indexed-search` pods are ever assigned to the `m4.10xlarge` nodes. - -The [examples directory](/examples) contains a cluster config that uses node selectors. +See ["Assign resource-hungry pods to larger nodes" in docs/configure.md](configure.md#Assign-resource-hungry-pods-to-larger-nodes). diff --git a/docs/troubleshoot.md b/docs/troubleshoot.md index ca8b13825722..b5f4790e542f 100644 --- a/docs/troubleshoot.md +++ b/docs/troubleshoot.md @@ -3,50 +3,45 @@ If Sourcegraph does not start up or shows unexpected behavior, there are a variety of ways you can determine the root cause of the failure. The most useful commands are: -* `kubectl get pods -o=wide` — lists all pods in your cluster and the corresponding health status of each. -* `kubectl logs -f $POD_NAME` — tails the logs for the specified pod. +- `kubectl get pods -o=wide` — lists all pods in your cluster and the corresponding health status of each. +- `kubectl logs -f $POD_NAME` — tails the logs for the specified pod. If Sourcegraph is unavailable and the `sourcegraph-frontend-*` pod(s) are not in status `Running`, then view their logs with `kubectl logs -f sourcegraph-frontend-$POD_ID` (filling in `$POD_ID` from the `kubectl get pods` output). Inspect both the log messages printed at startup (at the beginning of the log output) and recent log messages. - Less frequently used commands: -* `kubectl describe $POD_NAME` — shows detailed info about the status of a single pod. -* `kubectl get pvc` — lists all Persistent Volume Claims (PVCs) and the status of each. -* `kubectl get pv` — lists all Persistent Volumes (PVs) that have been provisioned. In a healthy cluster, there should - be a one-to-one mapping between PVs and PVCs. -* `kubectl get events` — lists all events in the cluster's history. -* `kubectl delete pod $POD_NAME` — delete a failing pod so it gets recreated, possibly on a different node -* `kubectl drain --force --ignore-daemonsets --delete-local-data $NODE` — remove all pods from a node and mark it as unschedulable to prevent new pods from arriving +- `kubectl describe $POD_NAME` — shows detailed info about the status of a single pod. +- `kubectl get pvc` — lists all Persistent Volume Claims (PVCs) and the status of each. +- `kubectl get pv` — lists all Persistent Volumes (PVs) that have been provisioned. In a healthy cluster, there should + be a one-to-one mapping between PVs and PVCs. +- `kubectl get events` — lists all events in the cluster's history. +- `kubectl delete pod $POD_NAME` — delete a failing pod so it gets recreated, possibly on a different node +- `kubectl drain --force --ignore-daemonsets --delete-local-data $NODE` — remove all pods from a node and mark it as unschedulable to prevent new pods from arriving ### Common errors -* `kubectl get pv` shows no Persistent Volumes, and/or `kubectl get events` shows a `Failed to provision volume with - StorageClass "default"` error. +- `Error from server (Forbidden): error when creating "base/frontend/sourcegraph-frontend.Role.yaml": roles.rbac.authorization.k8s.io "sourcegraph-frontend" is forbidden: attempt to grant extra privileges` - Check that a storage class named "default" exists via `kubectl get storageclass`. If one does exist, run `kubectl get storageclass default -o=yaml` and verify that the zone indicated in the output matches the zone of your cluster. - Google Cloud Platform users may need to [request an increase in storage quota](https://cloud.google.com/compute/quotas). + - The account you are using to apply the Kubernetes configuration doesn't have sufficient permissions to create roles. + - GCP: `kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user $YOUR_EMAIL` -* `Error: release sourcegraph failed: namespaces "default" is forbidden: User "system:serviceaccount:kube-system:default" cannot get namespaces in the namespace "default": Unknown user "system:serviceaccount:kube-system:default"`. Ensure you have created the RBAC resources and helm is using them. A common reason for it to fail is you are already using Helm, so `helm init --service-account tiller` does not work correctly. To fix this for your existing Helm installation, run: +- `kubectl get pv` shows no Persistent Volumes, and/or `kubectl get events` shows a `Failed to provision volume with StorageClass "default"` error. - ```bash - kubectl apply -f https://about.sourcegraph.com/k8s/rbac-config.yml - kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}' - helm init --service-account tiller --upgrade - ``` + Check that a storage class named "default" exists via `kubectl get storageclass`. If one does exist, run `kubectl get storageclass default -o=yaml` and verify that the zone indicated in the output matches the zone of your cluster. + Google Cloud Platform users may need to [request an increase in storage quota](https://cloud.google.com/compute/quotas). -* Many pods are stuck in Pending status. Use `kubectl cluster-info dump > dump.txt` to obtain a dump of - the logs. One thing to check for is insufficient resources: +- Many pods are stuck in Pending status. Use `kubectl cluster-info dump > dump.txt` to obtain a dump of + the logs. One thing to check for is insufficient resources: - ``` - "Reason": "FailedScheduling", - "Message": "0/3 nodes are available: 1 Insufficient memory, 3 Insufficient cpu.", - ``` + ``` + "Reason": "FailedScheduling", + "Message": "0/3 nodes are available: 1 Insufficient memory, 3 Insufficient cpu.", + ``` - This indicates that no available nodes meet the requirements specified for the corresponding nodes. - If you're using Google Cloud Platform, note that the default node type is `n1-standard-1`, a machine - with only one CPU, and that some components request a 2-CPU node. When creating a cluster, use - `--machine-type=n1-standard-16`. + This indicates that no available nodes meet the requirements specified for the corresponding nodes. + If you're using Google Cloud Platform, note that the default node type is `n1-standard-1`, a machine + with only one CPU, and that some components request a 2-CPU node. When creating a cluster, use + `--machine-type=n1-standard-16`. Any other issues? Contact us at [@srcgraph](https://twitter.com/srcgraph) or , or file issues on diff --git a/docs/update.md b/docs/update.md index 3d46f67868b4..dc4151374c2f 100644 --- a/docs/update.md +++ b/docs/update.md @@ -1,45 +1,37 @@ -# Updating +# Updating Sourcegraph -A new version of Sourcegraph is released every month (with patch releases in between, released as -needed). Check the [Sourcegraph blog](https://about.sourcegraph.com/blog) for release announcements. +> 🚨 If you are updating from a 2.10.x or previous deployment, follow the migration steps in [docs/migrate.md](docs/migrate.md) before updating. -## Update Sourcegraph Data Center +A new version of Sourcegraph is released every month (with patch releases in between, released as needed). Check the [Sourcegraph blog](https://about.sourcegraph.com/blog) for release announcements. -To update configuration or update to a new version, do the following: +## Steps -1. Make whatever changes you want to your `values.yaml` file. +1. Following the [forking instructions in docs/configure.md](configure.md#fork-this-repository), rebase your fork on the new version tag from https://github.com/sourcegraph/deploy-sourcegraph/releases -1. (Recommended) Check the diff the update will apply to your Kubernetes cluster: ```bash - # NOTE: use `./helm.sh` instead of `helm` if you migrated from `sourcegraph-server-gen` - helm diff upgrade -f values.yaml sourcegraph https://github.com/sourcegraph/datacenter/archive/$VERSION.tar.gz | less -R + cd $DEPLOY_SOURCEGRAPH_FORK + git rebase $VERSION # Choose which version you want to deploy from https://github.com/sourcegraph/deploy-sourcegraph/releases ``` - You can find a list of all version releases here: https://github.com/sourcegraph/deploy-sourcegraph/releases. - You may first need to install the Helm diff plugin: - ```bash - helm plugin install https://github.com/databus23/helm-diff - ``` -1. Apply the update: + +1. Deploy the updated version of Sourcegraph to your Kubernetes cluster: + ```bash - # NOTE: use `./helm.sh` instead of `helm` if you migrated from `sourcegraph-server-gen` - helm upgrade -f values.yaml sourcegraph https://github.com/sourcegraph/datacenter/archive/$VERSION.tar.gz + ./kubectl-apply-all.sh ``` -1. Check the health of the cluster after upgrade: + +1. Monitor the status of the deployment. + ```bash watch kubectl get pods -o wide ``` -### Rollback +## Rollback -``` -helm history sourcegraph -helm rollback sourcegraph [REVISION] -``` +You can rollback by performing the [update steps](#steps) with the previous version. -Note: if an update includes a database migration, rollback will require some manual DB +_If an update includes a database migration, rollback will require some manual DB modifications. We plan to eliminate these in the near future, but for now, -email if you have concerns before updating to a new release. - +email if you have concerns before updating to a new release._ ## Improving update reliability and latency with node selectors @@ -51,11 +43,11 @@ accommodate them. This may be especially true if the cluster is heterogeneous (i have the same amount of CPU/memory). If this happens, do the following: -* Use `kubectl drain $NODE` to drain a node of existing pods, so it has enough allocation for the larger + +- Use `kubectl drain $NODE` to drain a node of existing pods, so it has enough allocation for the larger service. -* Run `watch kubectl get pods -o wide` and wait until the node has been drained. Run `kubectl get - pods` to check that all pods except for the resource-hungry one(s) have been assigned to a node. -* Run `kubectl uncordon $NODE` to enable the larger pod(s) to be scheduled on the drained node. +- Run `watch kubectl get pods -o wide` and wait until the node has been drained. Run `kubectl get pods` to check that all pods except for the resource-hungry one(s) have been assigned to a node. +- Run `kubectl uncordon $NODE` to enable the larger pod(s) to be scheduled on the drained node. Note that the need to run the above steps can be prevented altogether with @@ -63,23 +55,21 @@ with which tell Kubernetes to assign certain pods to specific nodes. See the [docs on enabling node selectors](scale.md#node-selector) for Sourcegraph Data Center. - ## High-availability updates Sourcegraph Data Center is designed to be a high-availability (HA) service. Updates require zero downtime and employ health checks to test the health of newly updated components before switching live traffic over to them. HA-enabling features include the following: -* Replication: nearly all of the critical services within Sourcegraph are replicated. If a single instance of a +- Replication: nearly all of the critical services within Sourcegraph are replicated. If a single instance of a service fails, that instance is restarted and removed from operation until it comes online again. -* Updates are applied in a rolling fashion to each service such that a subset of instances are updated first while +- Updates are applied in a rolling fashion to each service such that a subset of instances are updated first while traffic continues to flow to the old instances. Once the health check determines the set of new instances is healthy, traffic is directed to the new set and the old set is terminated. -* Each service includes a health check that detects whether the service is in a healthy state. This check is specific to +- Each service includes a health check that detects whether the service is in a healthy state. This check is specific to the service. These are used to check the health of new instances after an update and during regular operation to determine if an instance goes down. -* Database migrations are handled automatically on update when they are necessary. - +- Database migrations are handled automatically on update when they are necessary. ### Updating blue-green deployments @@ -88,17 +78,15 @@ Some users may wish to opt for running two separate Sourcegraph clusters running the update step more complex, but it can still be done with the `sourcegraph-server-gen snapshot` command: -* Suppose cluster A is currently live, and cluster B is in standby. As a precondition, both should +- Suppose cluster A is currently live, and cluster B is in standby. As a precondition, both should be running the same version of Sourcegraph Data Center. -* Upgrade `sourcegraph-server-gen` to the version of Sourcegraph Data Center currently running (`sourcegraph-server-gen update ${VERSION}`). -* Snapshot A: Configure `kubectl` to access A and then run `sourcegraph-server-gen - snapshot create`. -* Restore A's snapshot to B: Configure `kubectl` to access B and then run `sourcegraph-server-gen - snapshot restore` from the same directory as you ran it before. -* Upgrade B to the new version. -* Switch traffic over to B. (B is now live.) -* Upgrade A to the new version. -* Switch traffic back to A. (A is now live again.) +- Upgrade `sourcegraph-server-gen` to the version of Sourcegraph Data Center currently running (`sourcegraph-server-gen update ${VERSION}`). +- Snapshot A: Configure `kubectl` to access A and then run `sourcegraph-server-gen snapshot create`. +- Restore A's snapshot to B: Configure `kubectl` to access B and then run `sourcegraph-server-gen snapshot restore` from the same directory as you ran it before. +- Upgrade B to the new version. +- Switch traffic over to B. (B is now live.) +- Upgrade A to the new version. +- Switch traffic back to A. (A is now live again.) After the update, cluster A will be live, cluster B will be in standby, and both will be running the same new version of Sourcegraph Data Center. You may lose a few minutes of database updates while A @@ -108,7 +96,6 @@ To keep the database on B current, you may periodically wish to sync A's databas (`sourcegraph-server-gen snapshot create` on A, `sourcegraph-server-gen snapshot restore` on B). It is important that the versions of A and B are equivalent when this is done. - ### Troubleshooting See the [troubleshooting page](troubleshoot.md). diff --git a/examples/aws/README.md b/examples/aws/README.md deleted file mode 100644 index a52b514ca257..000000000000 --- a/examples/aws/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Basic AWS example - -An example of a simple Sourcegraph Data Center cluster configuration for AWS. diff --git a/examples/aws/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/examples/aws/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index b11313134feb..000000000000 --- a/examples/aws/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "appURL": "http://localhost:3080", - "httpNodePort": 30080, - "langservers": [ - ] - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index d66e805fb728..000000000000 --- a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: - - name: http - nodePort: 30080 - port: 30080 - targetPort: http - selector: - app: sourcegraph-frontend - type: NodePort diff --git a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/examples/aws/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/examples/aws/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/examples/aws/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index 7f5b9482aa42..000000000000 --- a/examples/aws/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: LOG_REQUESTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/aws/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/examples/aws/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/examples/aws/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/examples/aws/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index 521205257892..000000000000 --- a/examples/aws/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-1 - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_REPOS_DIR - value: /data/repos - image: sourcegraph/gitserver:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-1 - ports: - - containerPort: 3178 - name: rpc - resources: - limits: - cpu: "4" - memory: "8G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - diff --git a/examples/aws/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/examples/aws/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/examples/aws/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/examples/aws/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/examples/aws/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/examples/aws/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/examples/aws/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/examples/aws/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index f66a1cb62dbb..000000000000 --- a/examples/aws/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http - resources: - limits: - cpu: "4" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/examples/aws/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/examples/aws/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index de07b9bd8199..000000000000 --- a/examples/aws/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/aws/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/examples/aws/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/examples/aws/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/examples/aws/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index 876e7df9ee22..000000000000 --- a/examples/aws/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,66 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/aws/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/examples/aws/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/examples/aws/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/examples/aws/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/examples/aws/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/examples/aws/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml deleted file mode 100644 index 095a470d4c17..000000000000 --- a/examples/aws/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: pgsql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/aws/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml b/examples/aws/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml deleted file mode 100644 index bb9eac0e653e..000000000000 --- a/examples/aws/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9113" - prometheus.io/scrape: "true" - labels: - app: pgsql - deploy: sourcegraph - name: pgsql -spec: - ports: - - name: pgsql - port: 5432 - targetPort: pgsql - selector: - app: pgsql - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/examples/aws/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/examples/aws/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml b/examples/aws/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml deleted file mode 100644 index 7db56c45089d..000000000000 --- a/examples/aws/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing short-lived caches. - labels: - deploy: sourcegraph - name: redis-cache -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-cache - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-cache - - configMap: - name: redis-cache - name: config diff --git a/examples/aws/generated/sourcegraph/templates/redis/redis-cache.Service.yaml b/examples/aws/generated/sourcegraph/templates/redis/redis-cache.Service.yaml deleted file mode 100644 index 0634270075e8..000000000000 --- a/examples/aws/generated/sourcegraph/templates/redis/redis-cache.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-cache - deploy: sourcegraph - name: redis-cache -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-cache - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml b/examples/aws/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml deleted file mode 100644 index 8664390e22de..000000000000 --- a/examples/aws/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, return error when hitting limit - maxmemory 5gb - maxmemory-policy noeviction - - # live commit log to disk, additionally snapshots every 10 minutes - dir /redis-data/ - appendonly yes - save 600 1 -kind: ConfigMap -metadata: - name: redis-store - labels: - deploy: sourcegraph diff --git a/examples/aws/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml b/examples/aws/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml deleted file mode 100644 index ae604b0d12f1..000000000000 --- a/examples/aws/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-store -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/aws/generated/sourcegraph/templates/redis/redis-store.Service.yaml b/examples/aws/generated/sourcegraph/templates/redis/redis-store.Service.yaml deleted file mode 100644 index 7fa5bd6e6a9e..000000000000 --- a/examples/aws/generated/sourcegraph/templates/redis/redis-store.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-store - deploy: sourcegraph - name: redis-store -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-store - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/examples/aws/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/examples/aws/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/examples/aws/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index c2bab34d0772..000000000000 --- a/examples/aws/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/aws/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/examples/aws/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/examples/aws/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/storage-class.yaml b/examples/aws/generated/sourcegraph/templates/storage-class.yaml deleted file mode 100644 index 32c6847194a3..000000000000 --- a/examples/aws/generated/sourcegraph/templates/storage-class.yaml +++ /dev/null @@ -1,11 +0,0 @@ -##--- -# Source: sourcegraph/templates/storage-class.yaml -kind: StorageClass -apiVersion: storage.k8s.io/v1 -metadata: - name: default -provisioner: kubernetes.io/aws-ebs -parameters: - type: gp2 - zones: us-east-1d - diff --git a/examples/aws/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/examples/aws/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index f14d244c27e4..000000000000 --- a/examples/aws/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: SYMBOLS_CACHE_SIZE_MB - value: "100000" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/aws/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/examples/aws/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/examples/aws/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/examples/aws/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index bf1fcce0e603..000000000000 --- a/examples/aws/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: sourcegraph/syntect_server:624a1a2 - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - securityContext: - runAsUser: 0 - volumes: diff --git a/examples/aws/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/examples/aws/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/examples/aws/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/examples/aws/generated/sourcegraph/templates/tls.Secret.yaml b/examples/aws/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 65f658f3e77f..000000000000 --- a/examples/aws/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: "" - key: "" -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/examples/aws/values.yaml b/examples/aws/values.yaml deleted file mode 100644 index 43ea3e8b4968..000000000000 --- a/examples/aws/values.yaml +++ /dev/null @@ -1,4 +0,0 @@ -cluster: - storageClass: - create: aws - zone: us-east-1d diff --git a/examples/custom-env-vars/README.md b/examples/custom-env-vars/README.md deleted file mode 100644 index a279b0d58f7e..000000000000 --- a/examples/custom-env-vars/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Custom environment variables - -An example of a configuration that injects custom environment variables into certain deployments. diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/auth-proxy/auth-proxy.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/auth-proxy/auth-proxy.Deployment.yaml deleted file mode 100644 index 984d19ba21c8..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/auth-proxy/auth-proxy.Deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -##--- -# Source: sourcegraph/templates/auth-proxy/auth-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: HTTP basic auth proxy for sourcegraph-frontend - labels: - deploy: sourcegraph - name: auth-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: auth-proxy - spec: - containers: - - image: sourcegraph/auth-proxy:latest - name: auth-proxy - ports: - - containerPort: 8080 - name: http - - containerPort: 8081 - name: https - resources: - limits: - cpu: "1" - memory: 1Gi - requests: - cpu: 500m - memory: 1Gi - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /tls - name: tls - readOnly: true - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - name: tls - secret: - secretName: tls diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/auth-proxy/auth-proxy.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/auth-proxy/auth-proxy.Service.yaml deleted file mode 100644 index 66e0f282edf2..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/auth-proxy/auth-proxy.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/auth-proxy/auth-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: auth-proxy - deploy: sourcegraph - name: auth-proxy -spec: - loadBalancerIP: 0.0.0.0 - ports: - - name: http - port: 80 - targetPort: http - - name: https - port: 443 - targetPort: https - selector: - app: auth-proxy - type: LoadBalancer diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index bb1f9c05952c..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,39 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "appURL": "http://localhost:3080", - "authProxyIP": "0.0.0.0", - "authProxyPassword": "asdf", - "httpNodePort": 30080, - "langservers": [ - { - "language": "go" - }, - { - "language": "java" - }, - { - "language": "javascript" - }, - { - "language": "typescript" - }, - { - "language": "python" - }, - { - "language": "php" - } - ], - "prometheus": { - }, - "useAlertManager": true - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index 3b2ca643b536..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,93 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: DEPLOY_TYPE - value: datacenter - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: PUBLIC_REPO_REDIRECTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: VAR - value: val - image: sourcegraph/frontend:2.10.1 - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "1G" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - serviceAccountName: sourcegraph-frontend - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index 1e7b9e85eb2b..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,59 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: LOG_REQUESTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index da2d803a9477..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-1 - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_REPOS_DIR - value: /data/repos - - name: VAR - value: val - image: sourcegraph/gitserver:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-1 - ports: - - containerPort: 3178 - name: rpc - resources: - limits: - cpu: "4" - memory: "8G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index ee7391faa0f3..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,93 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http - resources: - limits: - cpu: "4" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /data - name: disk - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index de07b9bd8199..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index fdebe07713af..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,71 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index a07b1c2ed80e..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,107 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: LANGSERVER_GO - value: tcp://xlang-go:4389 - - name: LANGSERVER_GO_BG - value: tcp://xlang-go-bg:4389 - - name: LANGSERVER_JAVA - value: tcp://xlang-java:2088 - - name: LANGSERVER_JAVASCRIPT - value: tcp://xlang-typescript:2088 - - name: LANGSERVER_JAVASCRIPT_BG - value: tcp://xlang-typescript-bg:2088 - - name: LANGSERVER_JAVA_BG - value: tcp://xlang-java-bg:2088 - - name: LANGSERVER_PHP - value: tcp://xlang-php:2088 - - name: LANGSERVER_PHP_BG - value: tcp://xlang-php:2088 - - name: LANGSERVER_PYTHON - value: tcp://xlang-python:2087 - - name: LANGSERVER_PYTHON_BG - value: tcp://xlang-python-bg:2087 - - name: LANGSERVER_TYPESCRIPT - value: tcp://xlang-typescript:2088 - - name: LANGSERVER_TYPESCRIPT_BG - value: tcp://xlang-typescript-bg:2088 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: VAR - value: val - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - resources: - limits: - cpu: "1" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml deleted file mode 100644 index b37b0aa2b337..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Postgres database for various data. - labels: - deploy: sourcegraph - name: pgsql -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: pgsql - group: backend - spec: - containers: - - env: - - name: PGDATA - value: /data/pgdata - - name: POSTGRES_USER - value: sg - image: sourcegraph/postgres:9.4 - livenessProbe: - initialDelaySeconds: 15 - tcpSocket: - port: 5432 - name: pgsql - ports: - - containerPort: 5432 - name: pgsql - resources: - limits: - cpu: "4" - memory: 2Gi - requests: - cpu: 250m - memory: 1G - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/mount1 - name: vol1 - - mountPath: /etc/mount2 - name: vol2 - - mountPath: /data - name: disk - - env: - - name: DATA_SOURCE_NAME - value: postgres://sg:@localhost:5432/?sslmode=disable - image: sourcegraph/pgsql-exporter:a294a9b6d83c139d3e1217f02c8f80a54cbf73ac - name: pgsql-exporter - resources: - limits: - cpu: 10m - memory: 50Mi - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - - mountPath: /etc/ssl - name: ssl - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - emptyDir: {} - name: vol1 - - configMap: - defaultMode: 384 - name: config - name: vol2 - - name: disk - persistentVolumeClaim: - claimName: pgsql diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml deleted file mode 100644 index 095a470d4c17..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: pgsql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml deleted file mode 100644 index bb9eac0e653e..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9113" - prometheus.io/scrape: "true" - labels: - app: pgsql - deploy: sourcegraph - name: pgsql -spec: - ports: - - name: pgsql - port: 5432 - targetPort: pgsql - selector: - app: pgsql - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml deleted file mode 100644 index 395128894bf7..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml -apiVersion: v1 -data: - config.yml: "" -kind: ConfigMap -metadata: - name: alertmanager - labels: - deploy: sourcegraph \ No newline at end of file diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Deployment.yaml deleted file mode 100644 index bb0205441c67..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Deployment.yaml +++ /dev/null @@ -1,60 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/alertmanager/alertmanager.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Receives alerts from Prometheus and pushes them to OpsGenie. - labels: - deploy: sourcegraph - name: alertmanager -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: alertmanager - spec: - containers: - - args: - - --config.file=/etc/alertmanager/config.yml - - --storage.path=/alertmanager - - --web.external-url= - image: sourcegraph/alertmanager:v0.15.1 - name: alertmanager - ports: - - containerPort: 9093 - name: http - resources: - limits: - cpu: 100m - memory: 20M - requests: - cpu: 50m - memory: 10M - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/alertmanager - name: config - readOnly: true - - mountPath: /alertmanager - name: data - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - name: alertmanager - name: config - - emptyDir: {} - name: data \ No newline at end of file diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Service.yaml deleted file mode 100644 index 55d4425a9861..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/alertmanager/alertmanager.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: alertmanager - deploy: sourcegraph - name: alertmanager -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: alertmanager - type: ClusterIP \ No newline at end of file diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml deleted file mode 100644 index 6c0b87076ceb..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: prometheus - deploy: sourcegraph - name: prometheus-node-port -spec: - ports: - - name: http - nodePort: 30010 - port: 30010 - targetPort: http - selector: - app: prometheus - type: NodePort diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml deleted file mode 100644 index d46bfd3d0b2e..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml +++ /dev/null @@ -1,30 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: prometheus - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - nodes - - services - - endpoints - - pods - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get -- nonResourceURLs: - - /metrics - verbs: - - get diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml deleted file mode 100644 index 496481e91e3d..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: 'default-prometheus' - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: ClusterRole - name: prometheus -subjects: -- kind: ServiceAccount - name: prometheus - namespace: 'default' diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml deleted file mode 100644 index 34867acba641..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml +++ /dev/null @@ -1,480 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml -apiVersion: v1 -data: - alert.rules: | - ALERT PodsMissing - IF app:up:ratio{app!=""} < 0.9 - FOR 10m - LABELS { severity="page" } - ANNOTATIONS { - summary = "Pods missing from {{ $labels.app }}", - description = "Pods missing from {{ $labels.app }}: {{ $value }}", - help = "Alerts when pods are missing.", - } - - ALERT NoPodsRunning - IF app:up:ratio{app!=""} < 0.1 - FOR 2m - LABELS { severity="page" } - ANNOTATIONS { - summary = "No pods are running for {{ $labels.app }}", - description = "No pods are running for {{ $labels.app }}: {{ $value }}", - help = "Alerts when no pods are running for a service.", - } - - ALERT ProdPageLoadLatency - IF histogram_quantile(0.9, sum(rate(src_http_request_duration_seconds_bucket{job="sourcegraph-frontend",route!="xlang",route!="lsp"}[10m])) by (le)) > 20 - LABELS { severity="page" } - ANNOTATIONS { - summary = "High page load latency", - description = "Page load latency > 20s (90th percentile over all routes; current value: {{$value}}s)", - help = "Alerts when the page load latency is too high.", - } - - ALERT GoroutineLeak - IF go_goroutines >= 10000 - FOR 10m - ANNOTATIONS { - summary = "Excessive number of goroutines", - description = "{{ $labels.app }} has more than 10k goroutines. This is probably a regression causing a goroutine leak", - help = "Alerts when a service has excessive running goroutines.", - } - - ALERT FSINodesRemainingLow - IF sum by (instance) (container_fs_inodes_total{pod_name!=""}) > 3000000 - LABELS { severity = "page" } - ANNOTATIONS { - summary = "{{$labels.instance}} remaining fs inodes is low", - description = "{{$labels.instance}} is using {{humanize $value}} inodes", - help = "Alerts when a node's remaining FS inodes are low.", - } - - ALERT DiskSpaceLow - IF node:k8snode_filesystem_avail_bytes:ratio < 0.10 - ANNOTATIONS { - summary = "{{$labels.exported_name}} has less than 10% available disk space", - help = "Alerts when a node has less than 10% available disk space.", - } - - ALERT DiskSpaceLowCritical - IF node:k8snode_filesystem_avail_bytes:ratio{exported_name=~".*prod.*"} < 0.05 - LABELS { severity="page" } - ANNOTATIONS { - summary = "Critical! {{$labels.exported_name}} has less than 5% available disk space", - help = "Alerts when a node has less than 5% available disk space.", - } - - ALERT SearcherErrorRatioTooHigh - IF searcher_errors:ratio10m > 0.1 - FOR 20m - ANNOTATIONS { - summary = "Error ratio exceeds 10%", - help = "Alerts when the search service has more than 10% of requests failing.", - } - - # TODO(sqs): enable this after we have tested it in prod, to avoid needless alerts - # - # ALERT SymbolsErrorRatioTooHigh - # IF symbols_errors:ratio10m > 0.1 - # FOR 20m - # ANNOTATIONS { - # summary = "Error ratio exceeds 10%", - # help = "Alerts when the symbols service has more than 10% of requests failing.", - # } - - # NOTE(beyang): this should no longer be part of the default metrics, because not all DC instances have Go code intelligence - # - # ALERT XLangAbsent - # IF absent(prod:xlang_requests:rate5m{mode="go"}) - # FOR 1m - # LABELS { severity="page" } - # ANNOTATIONS { - # summary = "{{ $labels.mode }} is not running", - # help = "Alerts when the Go language server is not running.", - # readme = "enterprise", - # } - - # http_response_size_bytes is measured at the Prometheus clients, not at the server. - ALERT PrometheusMetricsBloat - IF http_response_size_bytes{handler="prometheus", quantile="0.5", job!="kubernetes-nodes", job!="kubernetes-apiservers"} > 20000 - ANNOTATIONS { - summary = "{{$labels.job}} in {{$labels.ns}} is probably leaking metrics (unbounded attribute)", - help = "Alerts when a service is probably leaking metrics (unbounded attribute).", - } - - - apdex.rules: |+ - # Generated with apdex.py - # Do not manually edit - - # Rate 15m - prod:src_xlang_request_duration_seconds:apdex_02_08_rate15m = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.2",success="true"}[15m])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.8",success="true"}[15m])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[15m])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_1_5_rate15m = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="1",success="true"}[15m])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="5",success="true"}[15m])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[15m])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_2_10_rate15m = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="2",success="true"}[15m])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[15m])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[15m])) by (mode, method) - - - # Rate 1h - prod:src_xlang_request_duration_seconds:apdex_02_08_rate1h = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.2",success="true"}[1h])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.8",success="true"}[1h])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1h])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_1_5_rate1h = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="1",success="true"}[1h])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="5",success="true"}[1h])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1h])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_2_10_rate1h = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="2",success="true"}[1h])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[1h])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1h])) by (mode, method) - - - # Rate 1d - prod:src_xlang_request_duration_seconds:apdex_02_08_rate1d = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.2",success="true"}[1d])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.8",success="true"}[1d])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_1_5_rate1d = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="1",success="true"}[1d])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="5",success="true"}[1d])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_2_10_rate1d = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="2",success="true"}[1d])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[1d])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) - extra.rules: "" - - node.rules: | - node:container_cpu_usage_seconds_total:ratio_rate5m = - sum by (instance) (rate(container_cpu_usage_seconds_total{kubernetes_pod_name=""}[5m])) - / - max by (instance) (machine_cpu_cores) - - task:container_memory_usage_bytes:max = max by (namespace, container_name)(container_memory_usage_bytes{container_name!=""}) - task:container_cpu_usage_seconds_total:sum = sum by (id, namespace, container_name) (irate(container_cpu_usage_seconds_total{container_name!=""}[1m])) - - node:k8snode_filesystem_avail_bytes:ratio = - min by (exported_name) (k8snode_filesystem_avail_bytes / k8snode_filesystem_size_bytes) - prometheus.yml: | - --- - - global: - scrape_interval: 30s - evaluation_interval: 30s - - rule_files: - - 'node.rules' - - 'sourcegraph.rules' - - 'xlang.rules' - - 'apdex.rules' - - 'searcher.rules' - - 'symbols.rules' - - 'alert.rules' - - 'extra.rules' - - # A scrape configuration for running Prometheus on a Kubernetes cluster. - # This uses separate scrape configs for cluster components (i.e. API server, node) - # and services to allow each to use different authentication configs. - # - # Kubernetes labels will be added as Prometheus labels on metrics via the - # `labelmap` relabeling action. - - # Scrape config for API servers. - # - # Kubernetes exposes API servers as endpoints to the default/kubernetes - # service so this uses `endpoints` role and uses relabelling to only keep - # the endpoints associated with the default/kubernetes service using the - # default named port `https`. This works for single API server deployments as - # well as HA API server deployments. - scrape_configs: - - job_name: 'kubernetes-apiservers' - - kubernetes_sd_configs: - - role: endpoints - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - # insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - # Keep only the default/kubernetes service endpoints for the https port. This - # will add targets for each API server which Kubernetes adds an endpoint to - # the default/kubernetes service. - relabel_configs: - - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: default;kubernetes;https - - - job_name: 'kubernetes-nodes' - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - kubernetes_sd_configs: - - role: node - - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/${1}/proxy/metrics - - # Scrape config for service endpoints. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/scrape`: Only scrape services that have a value of `true` - # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need - # to set this to `https` & most likely set the `tls_config` of the scrape config. - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: If the metrics are exposed on a different port to the - # service then set this appropriately. - - job_name: 'kubernetes-service-endpoints' - - kubernetes_sd_configs: - - role: endpoints - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - action: replace - target_label: __address__ - regex: (.+)(?::\d+);(\d+) - replacement: $1:$2 - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - # Sourcegraph specific customization. We want a more convenient to type label. - # target_label: kubernetes_namespace - target_label: ns - - source_labels: [__meta_kubernetes_service_name] - action: replace - target_label: kubernetes_name - # Sourcegraph specific customization. We want a nicer name for job - - source_labels: [app] - action: replace - target_label: job - # Sourcegraph specific customization. We want a nicer name for instance - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: instance - - # Example scrape config for probing services via the Blackbox Exporter. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/probe`: Only probe services that have a value of `true` - - job_name: 'kubernetes-services' - - metrics_path: /probe - params: - module: [http_2xx] - - kubernetes_sd_configs: - - role: service - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe] - action: keep - regex: true - - source_labels: [__address__] - target_label: __param_target - - target_label: __address__ - replacement: blackbox - - source_labels: [__param_target] - target_label: instance - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_service_namespace] - # Sourcegraph specific customization. We want a more convenient to type label. - # target_label: kubernetes_namespace - target_label: ns - - source_labels: [__meta_kubernetes_service_name] - target_label: kubernetes_name - - # Example scrape config for pods - # - # The relabeling allows the actual pod scrape endpoint to be configured via the - # following annotations: - # - # * `prometheus.io/scrape`: Only scrape pods that have a value of `true` - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`. - - job_name: 'kubernetes-pods' - - kubernetes_sd_configs: - - role: pod - - relabel_configs: - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: (.+):(?:\d+);(\d+) - replacement: ${1}:${2} - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - # Sourcegraph specific customization. We want a more convenient to type label. - # target_label: kubernetes_namespace - target_label: ns - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: kubernetes_pod_name - searcher.rules: | - ########## - # Errors # - ########## - - searcher_requests:rate10m = sum by (instance)(rate(searcher_service_request_total[10m])) - searcher_errors:rate10m = sum by (instance)(rate(searcher_service_request_total{code!="200",code!="canceled"}[10m])) - searcher_errors:ratio10m = sum(searcher_errors:rate10m) / sum(searcher_requests:rate10m) - sourcegraph.rules: | - # This files contains recording rules targeted at the sourcegraph-frontend app - - # Duration (5m) - task:src_http_request_duration_seconds_bucket:rate5m = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[5m]) - route:src_http_request_duration_seconds_bucket:rate5m = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - job:src_http_request_duration_seconds_bucket:rate5m = sum by (ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - prod:src_http_request_duration_seconds_bucket:rate5m = sum by (le)(task:src_http_request_duration_seconds_bucket:rate5m) - - # Counts (5m) - task:src_http_request_count:rate5m = rate(src_http_request_duration_seconds_count{job=~"sourcegraph-.*"}[5m]) - route:src_http_request_count:rate5m = sum by (route, code, ns)(task:src_http_request_count:rate5m) - job:src_http_request_count:rate5m = sum by (code, ns)(task:src_http_request_count:rate5m) - prod:src_http_request_count:rate5m = sum by (code)(task:src_http_request_count:rate5m) - - # Duration (30m) - task:src_http_request_duration_seconds_bucket:rate30m = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[30m]) - route:src_http_request_duration_seconds_bucket:rate30m = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate30m) - job:src_http_request_duration_seconds_bucket:rate30m = sum by (ns, le)(task:src_http_request_duration_seconds_bucket:rate30m) - prod:src_http_request_duration_seconds_bucket:rate30m = sum by (le)(task:src_http_request_duration_seconds_bucket:rate30m) - - # Counts (30m) - task:src_http_request_count:rate30m = rate(src_http_request_duration_seconds_count{job=~"sourcegraph-.*"}[30m]) - route:src_http_request_count:rate30m = sum by (route, code, ns)(task:src_http_request_count:rate30m) - job:src_http_request_count:rate30m = sum by (code, ns)(task:src_http_request_count:rate30m) - prod:src_http_request_count:rate30m = sum by (code)(task:src_http_request_count:rate30m) - - - # Perf targets are over a day - prod:src_http_request_duration_seconds_bucket:rate1d = sum by (route, le)(rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[1d])) - - - # Measure uptime of services - app:up:sum = sum by (app)(up) - app:up:count = count by (app)(up) - app:up:ratio = - app:up:sum - / on (app) - app:up:count - symbols.rules: | - ########## - # Errors # - ########## - - symbols_requests:rate10m = sum by (instance)(rate(symbols_service_request_total[10m])) - symbols_errors:rate10m = sum by (instance)(rate(symbols_service_request_total{code!="200",code!="canceled"}[10m])) - symbols_errors:ratio10m = sum(symbols_errors:rate10m) / sum(symbols_requests:rate10m) - xlang.rules: | - prod:xlang_requests:rate5m = sum by (mode)(rate(src_xlang_request_duration_seconds_count[5m])) - prod:xlang_errors:rate5m = sum by (mode)(rate(src_xlang_request_duration_seconds_count{success="false"}[5m])) - prod:xlang_errors:ratio5m = prod:xlang_errors:rate5m / prod:xlang_requests:rate5m - prod:src_xlang_request_duration_seconds_bucket:rate1d = - sum by (le, mode, method)(rate(src_xlang_request_duration_seconds_bucket{success="true"}[1d])) -kind: ConfigMap -metadata: - name: prometheus - labels: - deploy: sourcegraph diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.Deployment.yaml deleted file mode 100644 index 6eea535e6453..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.Deployment.yaml +++ /dev/null @@ -1,83 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Collects metrics and aggregates them into graphs. - labels: - deploy: sourcegraph - name: prometheus -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: prometheus - spec: - containers: - - args: - - -config.file=/etc/prometheus/prometheus.yml - - -storage.local.path=/prometheus/data - - -web.console.libraries=/etc/prometheus/console_libraries - - -web.console.templates=/etc/prometheus/consoles - - -web.external-url= - - -alertmanager.url=http://alertmanager - image: sourcegraph/prometheus:v1.4.1 - name: prometheus - ports: - - containerPort: 9090 - name: http - resources: - limits: - cpu: "4" - memory: 8Gi - requests: - cpu: 500m - memory: 2Gi - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /prometheus - name: data - - mountPath: /etc/prometheus - name: config - - args: - - --volume-dir=/etc/prometheus - - --webhook-url=http://localhost:9090/-/reload - image: sourcegraph/configmap-reload:v0.1 - name: configmap-reload - resources: - limits: - cpu: 10m - memory: 10Mi - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/prometheus - name: config - readOnly: true - securityContext: - runAsUser: 0 - serviceAccountName: prometheus - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - name: data - persistentVolumeClaim: - claimName: prometheus - - configMap: - defaultMode: 464 - name: prometheus - name: config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml deleted file mode 100644 index eb0f3426e9e6..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: prometheus -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.Service.yaml deleted file mode 100644 index a27e429c877c..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: prometheus - deploy: sourcegraph - name: prometheus -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: prometheus - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml deleted file mode 100644 index 6d6328ef133b..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: prometheus - labels: - deploy: sourcegraph diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index cc3db30293e4..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,63 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: DEPLOY_TYPE - value: datacenter - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - image: sourcegraph/query-runner:2.10.1 - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml deleted file mode 100644 index d2899ab68ade..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, discard unused keys when hitting limit - maxmemory 5gb - maxmemory-policy allkeys-lru - - # snapshots on disk every minute - dir /redis-data/ - save 60 1 -kind: ConfigMap -metadata: - name: redis-cache - labels: - deploy: sourcegraph diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml deleted file mode 100644 index e8e765bc7476..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml +++ /dev/null @@ -1,83 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing short-lived caches. - labels: - deploy: sourcegraph - name: redis-cache -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-cache - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - - mountPath: /etc/ssl - name: ssl - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - name: redis-data - persistentVolumeClaim: - claimName: redis-cache - - configMap: - name: redis-cache - name: config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml deleted file mode 100644 index c100d569a89a..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-cache -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml deleted file mode 100644 index 8664390e22de..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, return error when hitting limit - maxmemory 5gb - maxmemory-policy noeviction - - # live commit log to disk, additionally snapshots every 10 minutes - dir /redis-data/ - appendonly yes - save 600 1 -kind: ConfigMap -metadata: - name: redis-store - labels: - deploy: sourcegraph diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml deleted file mode 100644 index 6cb489ef5c14..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml +++ /dev/null @@ -1,83 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing semi-persistent data like user sessions. - labels: - deploy: sourcegraph - name: redis-store -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-store - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - - mountPath: /etc/ssl - name: ssl - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - name: redis-data - persistentVolumeClaim: - claimName: redis-store - - configMap: - name: redis-store - name: config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml deleted file mode 100644 index ae604b0d12f1..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-store -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.Service.yaml deleted file mode 100644 index 7fa5bd6e6a9e..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/redis/redis-store.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-store - deploy: sourcegraph - name: redis-store -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-store - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index c9947804c16b..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,62 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index 08013d551481..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,82 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: VAR - value: val - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index 0d15b40dd92c..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: SYMBOLS_CACHE_SIZE_MB - value: "100000" - - name: VAR - value: val - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index 3ed8432c776a..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: sourcegraph/syntect_server:624a1a2 - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - - mountPath: /etc/ssl - name: ssl - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/tls.Secret.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 65f658f3e77f..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: "" - key: "" -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml deleted file mode 100644 index 8418a1ab56a4..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml +++ /dev/null @@ -1,84 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Go (used for background indexing jobs). - labels: - deploy: sourcegraph - name: xlang-go-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-go-bg - spec: - containers: - - args: - - -mode=tcp - - -addr=:4389 - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: VAR - value: val - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/xlang-go:18575_2018-07-20_a470dcb - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-go-bg - ports: - - containerPort: 4389 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4389 - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml deleted file mode 100644 index 439483e62ad1..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: xlang-go-bg - deploy: sourcegraph - name: xlang-go-bg -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4389 - targetPort: lsp - selector: - app: xlang-go-bg - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml deleted file mode 100644 index 71550cbfc228..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml +++ /dev/null @@ -1,84 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Go (used for live requests). - labels: - deploy: sourcegraph - name: xlang-go -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 2 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-go - spec: - containers: - - args: - - -mode=tcp - - -addr=:4389 - env: - - name: CONFIG_FILE_HASH - value: 9544ecc0711a4760bcba46a59afea8cb5916017f667fe43b618ec4dae9a25687 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: VAR - value: val - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/xlang-go:18575_2018-07-20_a470dcb - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-go - ports: - - containerPort: 4389 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4389 - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go.Service.yaml deleted file mode 100644 index f4a65a2d4166..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/go/xlang-go.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: xlang-go - deploy: sourcegraph - name: xlang-go -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4389 - targetPort: lsp - selector: - app: xlang-go - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml deleted file mode 100644 index ecddfb791605..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Java (used for background indexing jobs). - labels: - deploy: sourcegraph - name: xlang-java-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-java-bg - spec: - containers: - - env: - - name: JVM_OPT - value: -Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y - - name: LS_OPT - value: -l INFO - - name: VAR - value: val - image: sourcegraph/xlang-java-skinny:2018-05-10-1621 - name: xlang-java-bg - ports: - - containerPort: 2088 - name: lsp - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /tmp - name: tmp - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - emptyDir: {} - name: tmp diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml deleted file mode 100644 index 4e40a94c141a..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-java-bg - deploy: sourcegraph - name: xlang-java-bg -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-java-bg - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml deleted file mode 100644 index 323ed03ecea3..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Java (used for live requests). - labels: - deploy: sourcegraph - name: xlang-java -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-java - spec: - containers: - - env: - - name: JVM_OPT - value: -Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y - - name: LS_OPT - value: -l INFO - - name: VAR - value: val - image: sourcegraph/xlang-java-skinny:2018-05-10-1621 - name: xlang-java - ports: - - containerPort: 2088 - name: lsp - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /tmp - name: tmp - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - emptyDir: {} - name: tmp diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml deleted file mode 100644 index 57e761a743c1..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml +++ /dev/null @@ -1,53 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for PHP. - labels: - deploy: sourcegraph - name: xlang-php -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-php - spec: - containers: - - env: - - name: COMPOSER_AUTH - value: '{"github-oauth": {"github.com": ""}}' - image: sourcegraph/xlang-php:00037_2018-07-11_faea319 - name: xlang-php - ports: - - containerPort: 2088 - name: lsp - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /tmp - name: tmp - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - emptyDir: {} - name: tmp diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/php/xlang-php.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/php/xlang-php.Service.yaml deleted file mode 100644 index e9880797c1bb..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/php/xlang-php.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/php/xlang-php.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-php - deploy: sourcegraph - name: xlang-php -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-php - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml deleted file mode 100644 index ea65a3a4bcab..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Python (used for background indexing jobs). - labels: - deploy: sourcegraph - app: xlang-java-bg - name: xlang-python-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-python-bg - spec: - containers: - - image: sourcegraph/xlang-python:18892_2018-07-27_ddc9943 - env: - - name: VAR - value: val - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-python-bg - ports: - - containerPort: 2087 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - resources: - limits: - cpu: "500m" - memory: "1G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - volumes: - - hostPath: - path: /etc/ssl - name: ssl diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml deleted file mode 100644 index 25076e3b67dd..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-python-bg - deploy: sourcegraph - name: xlang-python-bg -spec: - ports: - - name: lsp - port: 2087 - targetPort: lsp - selector: - app: xlang-python-bg - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml deleted file mode 100644 index 63616bb32794..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Python (used for live requests). - labels: - deploy: sourcegraph - name: xlang-python -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-python - spec: - containers: - - image: sourcegraph/xlang-python:18892_2018-07-27_ddc9943 - env: - - name: VAR - value: val - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-python - ports: - - containerPort: 2087 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - resources: - limits: - cpu: "500m" - memory: "1G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python.Service.yaml deleted file mode 100644 index a4339a7efa8a..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/python/xlang-python.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-python - deploy: sourcegraph - name: xlang-python -spec: - ports: - - name: lsp - port: 2087 - targetPort: lsp - selector: - app: xlang-python - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml deleted file mode 100644 index f0ffee9d9722..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml +++ /dev/null @@ -1,51 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Cache for NPM. - labels: - deploy: sourcegraph - name: npm-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: npm-proxy - spec: - containers: - - image: sourcegraph/npm-proxy:9d593e267b6f5e86caeb29da37f140c5f5f4c8b2 - name: npm-proxy - ports: - - containerPort: 8080 - name: http - resources: - limits: - cpu: "1" - memory: 1Gi - requests: - cpu: 500m - memory: 1Gi - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /cache - name: npm-proxy-cache - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - name: npm-proxy-cache - persistentVolumeClaim: - claimName: npm-proxy diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml deleted file mode 100644 index 3f76f298324e..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml +++ /dev/null @@ -1,73 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for JavaScript and TypeScript (used for background indexing - jobs). - labels: - deploy: sourcegraph - name: xlang-typescript-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-typescript-bg - spec: - containers: - - env: - - name: VAR - value: val - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/xlang-javascript-typescript:00081_2018-07-20_09dabb1 - livenessProbe: - initialDelaySeconds: 30 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-typescript-bg - ports: - - containerPort: 2088 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - resources: - limits: - cpu: "4" - memory: "5Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /yarn-config - name: yarn-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - emptyDir: {} - name: cache-ssd - - configMap: - name: yarn-config - name: yarn-config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml deleted file mode 100644 index 576d0c77b5ec..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-typescript-bg - deploy: sourcegraph - name: xlang-typescript-bg -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-typescript-bg - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml deleted file mode 100644 index c5eefcb45c2d..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml +++ /dev/null @@ -1,72 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for JavaScript and TypeScript (used for live requests). - labels: - deploy: sourcegraph - name: xlang-typescript -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-typescript - spec: - containers: - - env: - - name: VAR - value: val - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/xlang-javascript-typescript:00081_2018-07-20_09dabb1 - livenessProbe: - initialDelaySeconds: 30 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-typescript - ports: - - containerPort: 2088 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - resources: - limits: - cpu: "4" - memory: "5Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/ssl - name: ssl - - mountPath: /yarn-config - name: yarn-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - hostPath: - path: /etc/ssl - name: ssl - - emptyDir: {} - name: cache-ssd - - configMap: - name: yarn-config - name: yarn-config diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml deleted file mode 100644 index 02d0ea2c6192..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-typescript - deploy: sourcegraph - name: xlang-typescript -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-typescript - type: ClusterIP diff --git a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml b/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml deleted file mode 100644 index 884d2134dc79..000000000000 --- a/examples/custom-env-vars/generated/sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml -apiVersion: v1 -data: - .yarnrc: | - # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - # yarn lockfile v1 - - - https-proxy "http://npm-proxy:8080" - proxy "http://npm-proxy:8080" - strict-ssl false -kind: ConfigMap -metadata: - name: yarn-config - labels: - deploy: sourcegraph diff --git a/examples/custom-env-vars/values.yaml b/examples/custom-env-vars/values.yaml deleted file mode 100644 index 07ce0998a97a..000000000000 --- a/examples/custom-env-vars/values.yaml +++ /dev/null @@ -1,96 +0,0 @@ -cluster: - storageClass: - create: none - frontend: - containers: - frontend: - env: - VAR: val - searcher: - containers: - searcher: - env: - VAR: val - symbols: - containers: - symbols: - env: - VAR: val - gitserver: - containers: - gitserver: - env: - VAR: val - lspProxy: - containers: - lsp-proxy: - env: - VAR: val - xlangGo: - containers: - xlang-go: - env: - VAR: val - xlangJava: - containers: - xlang-java: - env: - VAR: val - xlangJavascriptTypescript: - containers: - xlang-javascript-typescript: - env: - VAR: val - xlangPython: - containers: - xlang-python: - env: - VAR: val - pgsql: - volumes: - - name: vol1 - emptyDir: {} - - name: vol2 - configMap: - defaultMode: 0600 - name: config - containers: - pgsql: - volumeMounts: - - mountPath: /etc/mount1 - name: vol1 - - mountPath: /etc/mount2 - name: vol2 - commonVolumes: - - name: ssl - hostPath: - path: /etc/ssl - commonVolumeMounts: - - mountPath: /etc/ssl - name: ssl -site: { - "langservers": [ - { - "language": "go", - }, - { - "language": "java", - }, - { - "language": "javascript", - }, - { - "language": "typescript", - }, - { - "language": "python", - }, - { - "language": "php", - }, - ], - "prometheus": {}, - "useAlertManager": true, - "authProxyIP": "0.0.0.0", - "authProxyPassword": "asdf", -} diff --git a/examples/gcp/README.md b/examples/gcp/README.md deleted file mode 100644 index 8c4154a61f57..000000000000 --- a/examples/gcp/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Basic GCP example - -An example of a simple Sourcegraph Data Center cluster configuration for Google Cloud. diff --git a/examples/gcp/generated/sourcegraph/templates/backend.Service.yaml b/examples/gcp/generated/sourcegraph/templates/backend.Service.yaml deleted file mode 100644 index 1a7206083b03..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/backend.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - group: backend - deploy: sourcegraph - name: backend -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - group: backend - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/examples/gcp/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index b11313134feb..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "appURL": "http://localhost:3080", - "httpNodePort": 30080, - "langservers": [ - ] - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index f5ccbf25c18a..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: DEPLOY_TYPE - value: datacenter - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: PUBLIC_REPO_REDIRECTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/frontend:2.10.1 - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - serviceAccountName: sourcegraph-frontend - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index d66e805fb728..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: - - name: http - nodePort: 30080 - port: 30080 - targetPort: http - selector: - app: sourcegraph-frontend - type: NodePort diff --git a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/examples/gcp/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/examples/gcp/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index 7f5b9482aa42..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: LOG_REQUESTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/gcp/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/examples/gcp/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/examples/gcp/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/examples/gcp/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/examples/gcp/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/examples/gcp/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/examples/gcp/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/examples/gcp/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/examples/gcp/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index e7d34a4b412c..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - resources: - limits: - cpu: "1" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/gcp/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/examples/gcp/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml b/examples/gcp/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml deleted file mode 100644 index 00c91f08b799..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Postgres database for various data. - labels: - deploy: sourcegraph - name: pgsql -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: pgsql - group: backend - spec: - containers: - - env: - - name: PGDATA - value: /data/pgdata - - name: POSTGRES_USER - value: sg - image: sourcegraph/postgres:9.4 - livenessProbe: - initialDelaySeconds: 15 - tcpSocket: - port: 5432 - name: pgsql - ports: - - containerPort: 5432 - name: pgsql - resources: - limits: - cpu: "4" - memory: 2Gi - requests: - cpu: 250m - memory: 1G - volumeMounts: - - mountPath: /data - name: disk - - env: - - name: DATA_SOURCE_NAME - value: postgres://sg:@localhost:5432/?sslmode=disable - image: sourcegraph/pgsql-exporter:a294a9b6d83c139d3e1217f02c8f80a54cbf73ac - name: pgsql-exporter - resources: - limits: - cpu: 10m - memory: 50Mi - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: pgsql diff --git a/examples/gcp/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/examples/gcp/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml deleted file mode 100644 index 095a470d4c17..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: pgsql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/gcp/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml b/examples/gcp/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml deleted file mode 100644 index bb9eac0e653e..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9113" - prometheus.io/scrape: "true" - labels: - app: pgsql - deploy: sourcegraph - name: pgsql -spec: - ports: - - name: pgsql - port: 5432 - targetPort: pgsql - selector: - app: pgsql - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/examples/gcp/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index 4e9a58c35004..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: DEPLOY_TYPE - value: datacenter - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - image: sourcegraph/query-runner:2.10.1 - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/gcp/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/examples/gcp/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml b/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml deleted file mode 100644 index d2899ab68ade..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, discard unused keys when hitting limit - maxmemory 5gb - maxmemory-policy allkeys-lru - - # snapshots on disk every minute - dir /redis-data/ - save 60 1 -kind: ConfigMap -metadata: - name: redis-cache - labels: - deploy: sourcegraph diff --git a/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml b/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml deleted file mode 100644 index 7db56c45089d..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing short-lived caches. - labels: - deploy: sourcegraph - name: redis-cache -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-cache - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-cache - - configMap: - name: redis-cache - name: config diff --git a/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml deleted file mode 100644 index c100d569a89a..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-cache -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.Service.yaml b/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.Service.yaml deleted file mode 100644 index 0634270075e8..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/redis/redis-cache.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-cache - deploy: sourcegraph - name: redis-cache -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-cache - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml b/examples/gcp/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml deleted file mode 100644 index 75cd48196f1d..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing semi-persistent data like user sessions. - labels: - deploy: sourcegraph - name: redis-store -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-store - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-store - - configMap: - name: redis-store - name: config diff --git a/examples/gcp/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/examples/gcp/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index 5f76e1c9f26b..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/gcp/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/examples/gcp/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/examples/gcp/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/storage-class.yaml b/examples/gcp/generated/sourcegraph/templates/storage-class.yaml deleted file mode 100644 index eb98c274ef8a..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/storage-class.yaml +++ /dev/null @@ -1,13 +0,0 @@ -##--- -# Source: sourcegraph/templates/storage-class.yaml -kind: StorageClass -apiVersion: storage.k8s.io/v1beta1 -metadata: - name: default - labels: - deploy: sourcegraph -provisioner: kubernetes.io/gce-pd -parameters: - type: pd-ssd - zone: us-west1-a - diff --git a/examples/gcp/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/examples/gcp/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/examples/gcp/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index bf1fcce0e603..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: sourcegraph/syntect_server:624a1a2 - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - securityContext: - runAsUser: 0 - volumes: diff --git a/examples/gcp/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/examples/gcp/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/examples/gcp/generated/sourcegraph/templates/tls.Secret.yaml b/examples/gcp/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 65f658f3e77f..000000000000 --- a/examples/gcp/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: "" - key: "" -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/examples/gcp/values.yaml b/examples/gcp/values.yaml deleted file mode 100644 index b2697f773a42..000000000000 --- a/examples/gcp/values.yaml +++ /dev/null @@ -1,4 +0,0 @@ -cluster: - storageClass: - create: gcp - zone: us-west1-a diff --git a/examples/generate.sh b/examples/generate.sh deleted file mode 100755 index 26bd2bef122b..000000000000 --- a/examples/generate.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Re-generates all the k8s config in each example directory - -cd "$(dirname "${BASH_SOURCE[0]}")" - -function generate() { - example="$1" - rm -rf "${example}/generated" - mkdir -p "${example}/generated" - helm template --namespace default -f "${example}/values.yaml" ../ --output-dir "${example}/generated" -} - -if [ -z "$EXAMPLE" ]; then - for example in $(ls | grep -v $(basename ${BASH_SOURCE[0]})); do - generate "$example" - done -else - generate "$EXAMPLE" -fi diff --git a/examples/manual-storage-class/README.md b/examples/manual-storage-class/README.md deleted file mode 100644 index eb857c18c125..000000000000 --- a/examples/manual-storage-class/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Basic example with no storage class - -This example sets `cluster.storageClass.create: "none"`, which means -the user must manually add a StorageClass with name "default" to the -cluster. - -The StorageClass configuration depends on the underlying -infrastructure provider, so this is a good catch-all example for -infrastructure providers for which this Helm chart does not yet supply -a StorageClass automatically. diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/backend.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/backend.Service.yaml deleted file mode 100644 index 1a7206083b03..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/backend.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - group: backend - deploy: sourcegraph - name: backend -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - group: backend - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index b11313134feb..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "appURL": "http://localhost:3080", - "httpNodePort": 30080, - "langservers": [ - ] - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index f5ccbf25c18a..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: DEPLOY_TYPE - value: datacenter - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: PUBLIC_REPO_REDIRECTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/frontend:2.10.1 - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - serviceAccountName: sourcegraph-frontend - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index d66e805fb728..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: - - name: http - nodePort: 30080 - port: 30080 - targetPort: http - selector: - app: sourcegraph-frontend - type: NodePort diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index 521205257892..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-1 - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_REPOS_DIR - value: /data/repos - image: sourcegraph/gitserver:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-1 - ports: - - containerPort: 3178 - name: rpc - resources: - limits: - cpu: "4" - memory: "8G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index f66a1cb62dbb..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http - resources: - limits: - cpu: "4" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index de07b9bd8199..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index 876e7df9ee22..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,66 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index e7d34a4b412c..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - resources: - limits: - cpu: "1" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml deleted file mode 100644 index 00c91f08b799..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Postgres database for various data. - labels: - deploy: sourcegraph - name: pgsql -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: pgsql - group: backend - spec: - containers: - - env: - - name: PGDATA - value: /data/pgdata - - name: POSTGRES_USER - value: sg - image: sourcegraph/postgres:9.4 - livenessProbe: - initialDelaySeconds: 15 - tcpSocket: - port: 5432 - name: pgsql - ports: - - containerPort: 5432 - name: pgsql - resources: - limits: - cpu: "4" - memory: 2Gi - requests: - cpu: 250m - memory: 1G - volumeMounts: - - mountPath: /data - name: disk - - env: - - name: DATA_SOURCE_NAME - value: postgres://sg:@localhost:5432/?sslmode=disable - image: sourcegraph/pgsql-exporter:a294a9b6d83c139d3e1217f02c8f80a54cbf73ac - name: pgsql-exporter - resources: - limits: - cpu: 10m - memory: 50Mi - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: pgsql diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml deleted file mode 100644 index bb9eac0e653e..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9113" - prometheus.io/scrape: "true" - labels: - app: pgsql - deploy: sourcegraph - name: pgsql -spec: - ports: - - name: pgsql - port: 5432 - targetPort: pgsql - selector: - app: pgsql - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index 4e9a58c35004..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: DEPLOY_TYPE - value: datacenter - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - image: sourcegraph/query-runner:2.10.1 - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml deleted file mode 100644 index d2899ab68ade..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, discard unused keys when hitting limit - maxmemory 5gb - maxmemory-policy allkeys-lru - - # snapshots on disk every minute - dir /redis-data/ - save 60 1 -kind: ConfigMap -metadata: - name: redis-cache - labels: - deploy: sourcegraph diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml deleted file mode 100644 index c100d569a89a..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-cache -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.Service.yaml deleted file mode 100644 index 0634270075e8..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-cache.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-cache - deploy: sourcegraph - name: redis-cache -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-cache - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml deleted file mode 100644 index 8664390e22de..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, return error when hitting limit - maxmemory 5gb - maxmemory-policy noeviction - - # live commit log to disk, additionally snapshots every 10 minutes - dir /redis-data/ - appendonly yes - save 600 1 -kind: ConfigMap -metadata: - name: redis-store - labels: - deploy: sourcegraph diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml deleted file mode 100644 index 75cd48196f1d..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing semi-persistent data like user sessions. - labels: - deploy: sourcegraph - name: redis-store -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-store - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-store - - configMap: - name: redis-store - name: config diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml deleted file mode 100644 index ae604b0d12f1..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-store -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.Service.yaml deleted file mode 100644 index 7fa5bd6e6a9e..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/redis/redis-store.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-store - deploy: sourcegraph - name: redis-store -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-store - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index 5f76e1c9f26b..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index c2bab34d0772..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index f14d244c27e4..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: c382e72e1a7278843803db4ea55ff0bdb2dafe8200247c120189c04ceb01d280 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: SYMBOLS_CACHE_SIZE_MB - value: "100000" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index bf1fcce0e603..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: sourcegraph/syntect_server:624a1a2 - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - securityContext: - runAsUser: 0 - volumes: diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/examples/manual-storage-class/generated/sourcegraph/templates/tls.Secret.yaml b/examples/manual-storage-class/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 65f658f3e77f..000000000000 --- a/examples/manual-storage-class/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: "" - key: "" -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/examples/manual-storage-class/values.yaml b/examples/manual-storage-class/values.yaml deleted file mode 100644 index 77ba8807fd83..000000000000 --- a/examples/manual-storage-class/values.yaml +++ /dev/null @@ -1,3 +0,0 @@ -cluster: - storageClass: - create: none diff --git a/examples/node-selector/README.md b/examples/node-selector/README.md deleted file mode 100644 index db26b2bd8f5c..000000000000 --- a/examples/node-selector/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Node selector example - -An example of a simple Sourcegraph Data Center cluster configuration that uses node selectors to -assign services to specific sets of nodes. This particular example uses node selectors for AWS -instance types. diff --git a/examples/node-selector/generated/sourcegraph/templates/backend.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/backend.Service.yaml deleted file mode 100644 index 1a7206083b03..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/backend.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - group: backend - deploy: sourcegraph - name: backend -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - group: backend - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/examples/node-selector/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index 2519cacadc40..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,34 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "appURL": "http://localhost:3080", - "httpNodePort": 30080, - "langservers": [ - { - "language": "go" - }, - { - "language": "java" - }, - { - "language": "javascript" - }, - { - "language": "typescript" - }, - { - "language": "python" - }, - { - "language": "php" - } - ] - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index 8d41b22b239c..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,88 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: DEPLOY_TYPE - value: datacenter - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: PUBLIC_REPO_REDIRECTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/frontend:2.10.1 - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - securityContext: - runAsUser: 0 - serviceAccountName: sourcegraph-frontend - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index d66e805fb728..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: - - name: http - nodePort: 30080 - port: 30080 - targetPort: http - selector: - app: sourcegraph-frontend - type: NodePort diff --git a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/examples/node-selector/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index a41f42f87e6e..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: LOG_REQUESTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/node-selector/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index 47a320ac190a..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,71 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-1 - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_REPOS_DIR - value: /data/repos - image: sourcegraph/gitserver:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-1 - ports: - - containerPort: 3178 - name: rpc - resources: - limits: - cpu: "4" - memory: "8G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - diff --git a/examples/node-selector/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/examples/node-selector/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/examples/node-selector/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/examples/node-selector/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index 6c0d3adc0fae..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,88 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http - resources: - limits: - cpu: "4" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - nodeSelector: - beta.kubernetes.io/instance-type: i3.4xlarge - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/examples/node-selector/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/examples/node-selector/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index de07b9bd8199..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/node-selector/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index 918a411a5154..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,66 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/node-selector/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index f8232f5af67f..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,102 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: LANGSERVER_GO - value: tcp://xlang-go:4389 - - name: LANGSERVER_GO_BG - value: tcp://xlang-go-bg:4389 - - name: LANGSERVER_JAVA - value: tcp://xlang-java:2088 - - name: LANGSERVER_JAVASCRIPT - value: tcp://xlang-typescript:2088 - - name: LANGSERVER_JAVASCRIPT_BG - value: tcp://xlang-typescript-bg:2088 - - name: LANGSERVER_JAVA_BG - value: tcp://xlang-java-bg:2088 - - name: LANGSERVER_PHP - value: tcp://xlang-php:2088 - - name: LANGSERVER_PHP_BG - value: tcp://xlang-php:2088 - - name: LANGSERVER_PYTHON - value: tcp://xlang-python:2087 - - name: LANGSERVER_PYTHON_BG - value: tcp://xlang-python-bg:2087 - - name: LANGSERVER_TYPESCRIPT - value: tcp://xlang-typescript:2088 - - name: LANGSERVER_TYPESCRIPT_BG - value: tcp://xlang-typescript-bg:2088 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - resources: - limits: - cpu: "1" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/node-selector/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml deleted file mode 100644 index 00c91f08b799..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Postgres database for various data. - labels: - deploy: sourcegraph - name: pgsql -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: pgsql - group: backend - spec: - containers: - - env: - - name: PGDATA - value: /data/pgdata - - name: POSTGRES_USER - value: sg - image: sourcegraph/postgres:9.4 - livenessProbe: - initialDelaySeconds: 15 - tcpSocket: - port: 5432 - name: pgsql - ports: - - containerPort: 5432 - name: pgsql - resources: - limits: - cpu: "4" - memory: 2Gi - requests: - cpu: 250m - memory: 1G - volumeMounts: - - mountPath: /data - name: disk - - env: - - name: DATA_SOURCE_NAME - value: postgres://sg:@localhost:5432/?sslmode=disable - image: sourcegraph/pgsql-exporter:a294a9b6d83c139d3e1217f02c8f80a54cbf73ac - name: pgsql-exporter - resources: - limits: - cpu: 10m - memory: 50Mi - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: pgsql diff --git a/examples/node-selector/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/examples/node-selector/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml deleted file mode 100644 index 095a470d4c17..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: pgsql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/node-selector/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml deleted file mode 100644 index bb9eac0e653e..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9113" - prometheus.io/scrape: "true" - labels: - app: pgsql - deploy: sourcegraph - name: pgsql -spec: - ports: - - name: pgsql - port: 5432 - targetPort: pgsql - selector: - app: pgsql - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index 65402aff9088..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: DEPLOY_TYPE - value: datacenter - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - image: sourcegraph/query-runner:2.10.1 - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/node-selector/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml b/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml deleted file mode 100644 index d2899ab68ade..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, discard unused keys when hitting limit - maxmemory 5gb - maxmemory-policy allkeys-lru - - # snapshots on disk every minute - dir /redis-data/ - save 60 1 -kind: ConfigMap -metadata: - name: redis-cache - labels: - deploy: sourcegraph diff --git a/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml deleted file mode 100644 index 7db56c45089d..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing short-lived caches. - labels: - deploy: sourcegraph - name: redis-cache -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-cache - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-cache - - configMap: - name: redis-cache - name: config diff --git a/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml deleted file mode 100644 index c100d569a89a..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-cache -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.Service.yaml deleted file mode 100644 index 0634270075e8..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/redis/redis-cache.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-cache - deploy: sourcegraph - name: redis-cache -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-cache - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml b/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml deleted file mode 100644 index 8664390e22de..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, return error when hitting limit - maxmemory 5gb - maxmemory-policy noeviction - - # live commit log to disk, additionally snapshots every 10 minutes - dir /redis-data/ - appendonly yes - save 600 1 -kind: ConfigMap -metadata: - name: redis-store - labels: - deploy: sourcegraph diff --git a/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml deleted file mode 100644 index 75cd48196f1d..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing semi-persistent data like user sessions. - labels: - deploy: sourcegraph - name: redis-store -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-store - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-store - - configMap: - name: redis-store - name: config diff --git a/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml b/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml deleted file mode 100644 index ae604b0d12f1..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-store -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.Service.yaml deleted file mode 100644 index 7fa5bd6e6a9e..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/redis/redis-store.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-store - deploy: sourcegraph - name: redis-store -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-store - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index 3420599d2c65..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/node-selector/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index 613217aa4afe..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,77 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/node-selector/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/storage-class.yaml b/examples/node-selector/generated/sourcegraph/templates/storage-class.yaml deleted file mode 100644 index 32c6847194a3..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/storage-class.yaml +++ /dev/null @@ -1,11 +0,0 @@ -##--- -# Source: sourcegraph/templates/storage-class.yaml -kind: StorageClass -apiVersion: storage.k8s.io/v1 -metadata: - name: default -provisioner: kubernetes.io/aws-ebs -parameters: - type: gp2 - zones: us-east-1d - diff --git a/examples/node-selector/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index d739c2597cf7..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,70 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: SYMBOLS_CACHE_SIZE_MB - value: "100000" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/node-selector/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/tls.Secret.yaml b/examples/node-selector/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 65f658f3e77f..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: "" - key: "" -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml deleted file mode 100644 index 7f2d27b012d6..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Go (used for live requests). - labels: - deploy: sourcegraph - name: xlang-go -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 2 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-go - spec: - containers: - - args: - - -mode=tcp - - -addr=:4389 - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/xlang-go:18575_2018-07-20_a470dcb - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-go - ports: - - containerPort: 4389 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4389 - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go.Service.yaml deleted file mode 100644 index f4a65a2d4166..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/go/xlang-go.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: xlang-go - deploy: sourcegraph - name: xlang-go -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4389 - targetPort: lsp - selector: - app: xlang-go - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml deleted file mode 100644 index 342b3078c8d6..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java-bg.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Java (used for background indexing jobs). - labels: - deploy: sourcegraph - name: xlang-java-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-java-bg - spec: - containers: - - env: - - name: JVM_OPT - value: -Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y - - name: LS_OPT - value: -l INFO - image: sourcegraph/xlang-java-skinny:2018-05-10-1621 - name: xlang-java-bg - ports: - - containerPort: 2088 - name: lsp - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /tmp - name: tmp - securityContext: - runAsUser: 0 - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - volumes: - - emptyDir: {} - name: tmp diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml deleted file mode 100644 index 4e40a94c141a..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java-bg.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-java-bg - deploy: sourcegraph - name: xlang-java-bg -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-java-bg - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml deleted file mode 100644 index dd85767c606e..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Java (used for live requests). - labels: - deploy: sourcegraph - name: xlang-java -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-java - spec: - containers: - - env: - - name: JVM_OPT - value: -Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y - - name: LS_OPT - value: -l INFO - image: sourcegraph/xlang-java-skinny:2018-05-10-1621 - name: xlang-java - ports: - - containerPort: 2088 - name: lsp - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /tmp - name: tmp - securityContext: - runAsUser: 0 - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - volumes: - - emptyDir: {} - name: tmp diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java.Service.yaml deleted file mode 100644 index de75751d080f..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/java/xlang-java.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-java - deploy: sourcegraph - name: xlang-java -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-java - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml deleted file mode 100644 index 564b064ef54c..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml +++ /dev/null @@ -1,50 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/php/xlang-php.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for PHP. - labels: - deploy: sourcegraph - name: xlang-php -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-php - spec: - containers: - - env: - - name: COMPOSER_AUTH - value: '{"github-oauth": {"github.com": ""}}' - image: sourcegraph/xlang-php:00037_2018-07-11_faea319 - name: xlang-php - ports: - - containerPort: 2088 - name: lsp - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /tmp - name: tmp - securityContext: - runAsUser: 0 - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - volumes: - - emptyDir: {} - name: tmp diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/php/xlang-php.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/php/xlang-php.Service.yaml deleted file mode 100644 index e9880797c1bb..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/php/xlang-php.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/php/xlang-php.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-php - deploy: sourcegraph - name: xlang-php -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-php - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml deleted file mode 100644 index d7b5c3f9606a..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml +++ /dev/null @@ -1,50 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python-bg.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Python (used for background indexing jobs). - labels: - deploy: sourcegraph - app: xlang-java-bg - name: xlang-python-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-python-bg - spec: - containers: - - image: sourcegraph/xlang-python:18892_2018-07-27_ddc9943 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-python-bg - ports: - - containerPort: 2087 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - resources: - limits: - cpu: "500m" - memory: "1G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - volumes: diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml deleted file mode 100644 index cf33445d0a3d..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml +++ /dev/null @@ -1,51 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Python (used for live requests). - labels: - deploy: sourcegraph - name: xlang-python -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-python - spec: - containers: - - image: sourcegraph/xlang-python:18892_2018-07-27_ddc9943 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-python - ports: - - containerPort: 2087 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - resources: - limits: - cpu: "500m" - memory: "1G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - securityContext: - runAsUser: 0 - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - volumes: diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python.Service.yaml deleted file mode 100644 index a4339a7efa8a..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/python/xlang-python.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-python - deploy: sourcegraph - name: xlang-python -spec: - ports: - - name: lsp - port: 2087 - targetPort: lsp - selector: - app: xlang-python - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml deleted file mode 100644 index ccca8a7f3452..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: npm-proxy -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml deleted file mode 100644 index 1aabc807d18b..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: npm-proxy - deploy: sourcegraph - name: npm-proxy -spec: - ports: - - name: http - port: 8080 - targetPort: http - selector: - app: npm-proxy - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml deleted file mode 100644 index 02b779ad1be4..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for JavaScript and TypeScript (used for background indexing - jobs). - labels: - deploy: sourcegraph - name: xlang-typescript-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-typescript-bg - spec: - containers: - - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/xlang-javascript-typescript:00081_2018-07-20_09dabb1 - livenessProbe: - initialDelaySeconds: 30 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-typescript-bg - ports: - - containerPort: 2088 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - resources: - limits: - cpu: "4" - memory: "5Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /yarn-config - name: yarn-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - volumes: - - emptyDir: {} - name: cache-ssd - - configMap: - name: yarn-config - name: yarn-config diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml deleted file mode 100644 index 576d0c77b5ec..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript-bg.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-typescript-bg - deploy: sourcegraph - name: xlang-typescript-bg -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-typescript-bg - type: ClusterIP diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml deleted file mode 100644 index 51553ebda154..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml +++ /dev/null @@ -1,67 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for JavaScript and TypeScript (used for live requests). - labels: - deploy: sourcegraph - name: xlang-typescript -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-typescript - spec: - containers: - - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/xlang-javascript-typescript:00081_2018-07-20_09dabb1 - livenessProbe: - initialDelaySeconds: 30 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-typescript - ports: - - containerPort: 2088 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - resources: - limits: - cpu: "4" - memory: "5Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /yarn-config - name: yarn-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - volumes: - - emptyDir: {} - name: cache-ssd - - configMap: - name: yarn-config - name: yarn-config diff --git a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml b/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml deleted file mode 100644 index 02d0ea2c6192..000000000000 --- a/examples/node-selector/generated/sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/xlang-typescript.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-typescript - deploy: sourcegraph - name: xlang-typescript -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-typescript - type: ClusterIP diff --git a/examples/node-selector/values.yaml b/examples/node-selector/values.yaml deleted file mode 100644 index 5112bd80bad6..000000000000 --- a/examples/node-selector/values.yaml +++ /dev/null @@ -1,58 +0,0 @@ -cluster: - frontend: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - searcher: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - symbols: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - gitserver: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - indexedSearch: - nodeSelector: - beta.kubernetes.io/instance-type: i3.4xlarge - lspProxy: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - xlangGo: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - xlangJava: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - xlangJavascriptTypescript: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - xlangPython: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - xlangPHP: - nodeSelector: - beta.kubernetes.io/instance-type: m4.4xlarge - storageClass: - create: aws - zone: us-east-1d -site: - "langservers": [ - { - "language": "go", - }, - { - "language": "java", - }, - { - "language": "javascript", - }, - { - "language": "typescript", - }, - { - "language": "python", - }, - { - "language": "php", - }, - ] diff --git a/examples/prometheus/README.md b/examples/prometheus/README.md deleted file mode 100644 index 81c1921412f2..000000000000 --- a/examples/prometheus/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Basic GCP example - -An example of Sourcegraph Data Center with Prometheus enabled diff --git a/examples/prometheus/generated/sourcegraph/templates/backend.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/backend.Service.yaml deleted file mode 100644 index 1a7206083b03..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/backend.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - group: backend - deploy: sourcegraph - name: backend -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - group: backend - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/examples/prometheus/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index e4d808e7f9a3..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "appURL": "http://localhost:3080", - "httpNodePort": 30080, - "langservers": [ - ], - "prometheus": { - } - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index 8e6e6ca35618..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - - name: CONFIG_FILE_HASH - value: ba3e71237fb5a564f99cfbec06bb58ce28f415901995d308fff5547a9b314f78 - - name: DEPLOY_TYPE - value: datacenter - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: PUBLIC_REPO_REDIRECTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/frontend:2.10.1 - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - serviceAccountName: sourcegraph-frontend - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index d66e805fb728..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: - - name: http - nodePort: 30080 - port: 30080 - targetPort: http - selector: - app: sourcegraph-frontend - type: NodePort diff --git a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/examples/prometheus/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index 9e2da043ec06..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ba3e71237fb5a564f99cfbec06bb58ce28f415901995d308fff5547a9b314f78 - - name: LOG_REQUESTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/prometheus/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index 165a1c730779..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-1 - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - - name: CONFIG_FILE_HASH - value: ba3e71237fb5a564f99cfbec06bb58ce28f415901995d308fff5547a9b314f78 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_REPOS_DIR - value: /data/repos - image: sourcegraph/gitserver:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-1 - ports: - - containerPort: 3178 - name: rpc - resources: - limits: - cpu: "4" - memory: "8G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - diff --git a/examples/prometheus/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/examples/prometheus/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/examples/prometheus/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/examples/prometheus/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index f66a1cb62dbb..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http - resources: - limits: - cpu: "4" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/examples/prometheus/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/examples/prometheus/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index de07b9bd8199..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/prometheus/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index 5292c45fc947..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,66 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ba3e71237fb5a564f99cfbec06bb58ce28f415901995d308fff5547a9b314f78 - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/prometheus/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index 6897602d005c..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - - name: CONFIG_FILE_HASH - value: ba3e71237fb5a564f99cfbec06bb58ce28f415901995d308fff5547a9b314f78 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - resources: - limits: - cpu: "1" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/prometheus/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml deleted file mode 100644 index 00c91f08b799..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Postgres database for various data. - labels: - deploy: sourcegraph - name: pgsql -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: pgsql - group: backend - spec: - containers: - - env: - - name: PGDATA - value: /data/pgdata - - name: POSTGRES_USER - value: sg - image: sourcegraph/postgres:9.4 - livenessProbe: - initialDelaySeconds: 15 - tcpSocket: - port: 5432 - name: pgsql - ports: - - containerPort: 5432 - name: pgsql - resources: - limits: - cpu: "4" - memory: 2Gi - requests: - cpu: 250m - memory: 1G - volumeMounts: - - mountPath: /data - name: disk - - env: - - name: DATA_SOURCE_NAME - value: postgres://sg:@localhost:5432/?sslmode=disable - image: sourcegraph/pgsql-exporter:a294a9b6d83c139d3e1217f02c8f80a54cbf73ac - name: pgsql-exporter - resources: - limits: - cpu: 10m - memory: 50Mi - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: pgsql diff --git a/examples/prometheus/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/examples/prometheus/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml deleted file mode 100644 index 095a470d4c17..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: pgsql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/prometheus/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml deleted file mode 100644 index bb9eac0e653e..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9113" - prometheus.io/scrape: "true" - labels: - app: pgsql - deploy: sourcegraph - name: pgsql -spec: - ports: - - name: pgsql - port: 5432 - targetPort: pgsql - selector: - app: pgsql - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml deleted file mode 100644 index 6c0b87076ceb..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: prometheus - deploy: sourcegraph - name: prometheus-node-port -spec: - ports: - - name: http - nodePort: 30010 - port: 30010 - targetPort: http - selector: - app: prometheus - type: NodePort diff --git a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml b/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml deleted file mode 100644 index 34867acba641..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml +++ /dev/null @@ -1,480 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml -apiVersion: v1 -data: - alert.rules: | - ALERT PodsMissing - IF app:up:ratio{app!=""} < 0.9 - FOR 10m - LABELS { severity="page" } - ANNOTATIONS { - summary = "Pods missing from {{ $labels.app }}", - description = "Pods missing from {{ $labels.app }}: {{ $value }}", - help = "Alerts when pods are missing.", - } - - ALERT NoPodsRunning - IF app:up:ratio{app!=""} < 0.1 - FOR 2m - LABELS { severity="page" } - ANNOTATIONS { - summary = "No pods are running for {{ $labels.app }}", - description = "No pods are running for {{ $labels.app }}: {{ $value }}", - help = "Alerts when no pods are running for a service.", - } - - ALERT ProdPageLoadLatency - IF histogram_quantile(0.9, sum(rate(src_http_request_duration_seconds_bucket{job="sourcegraph-frontend",route!="xlang",route!="lsp"}[10m])) by (le)) > 20 - LABELS { severity="page" } - ANNOTATIONS { - summary = "High page load latency", - description = "Page load latency > 20s (90th percentile over all routes; current value: {{$value}}s)", - help = "Alerts when the page load latency is too high.", - } - - ALERT GoroutineLeak - IF go_goroutines >= 10000 - FOR 10m - ANNOTATIONS { - summary = "Excessive number of goroutines", - description = "{{ $labels.app }} has more than 10k goroutines. This is probably a regression causing a goroutine leak", - help = "Alerts when a service has excessive running goroutines.", - } - - ALERT FSINodesRemainingLow - IF sum by (instance) (container_fs_inodes_total{pod_name!=""}) > 3000000 - LABELS { severity = "page" } - ANNOTATIONS { - summary = "{{$labels.instance}} remaining fs inodes is low", - description = "{{$labels.instance}} is using {{humanize $value}} inodes", - help = "Alerts when a node's remaining FS inodes are low.", - } - - ALERT DiskSpaceLow - IF node:k8snode_filesystem_avail_bytes:ratio < 0.10 - ANNOTATIONS { - summary = "{{$labels.exported_name}} has less than 10% available disk space", - help = "Alerts when a node has less than 10% available disk space.", - } - - ALERT DiskSpaceLowCritical - IF node:k8snode_filesystem_avail_bytes:ratio{exported_name=~".*prod.*"} < 0.05 - LABELS { severity="page" } - ANNOTATIONS { - summary = "Critical! {{$labels.exported_name}} has less than 5% available disk space", - help = "Alerts when a node has less than 5% available disk space.", - } - - ALERT SearcherErrorRatioTooHigh - IF searcher_errors:ratio10m > 0.1 - FOR 20m - ANNOTATIONS { - summary = "Error ratio exceeds 10%", - help = "Alerts when the search service has more than 10% of requests failing.", - } - - # TODO(sqs): enable this after we have tested it in prod, to avoid needless alerts - # - # ALERT SymbolsErrorRatioTooHigh - # IF symbols_errors:ratio10m > 0.1 - # FOR 20m - # ANNOTATIONS { - # summary = "Error ratio exceeds 10%", - # help = "Alerts when the symbols service has more than 10% of requests failing.", - # } - - # NOTE(beyang): this should no longer be part of the default metrics, because not all DC instances have Go code intelligence - # - # ALERT XLangAbsent - # IF absent(prod:xlang_requests:rate5m{mode="go"}) - # FOR 1m - # LABELS { severity="page" } - # ANNOTATIONS { - # summary = "{{ $labels.mode }} is not running", - # help = "Alerts when the Go language server is not running.", - # readme = "enterprise", - # } - - # http_response_size_bytes is measured at the Prometheus clients, not at the server. - ALERT PrometheusMetricsBloat - IF http_response_size_bytes{handler="prometheus", quantile="0.5", job!="kubernetes-nodes", job!="kubernetes-apiservers"} > 20000 - ANNOTATIONS { - summary = "{{$labels.job}} in {{$labels.ns}} is probably leaking metrics (unbounded attribute)", - help = "Alerts when a service is probably leaking metrics (unbounded attribute).", - } - - - apdex.rules: |+ - # Generated with apdex.py - # Do not manually edit - - # Rate 15m - prod:src_xlang_request_duration_seconds:apdex_02_08_rate15m = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.2",success="true"}[15m])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.8",success="true"}[15m])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[15m])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_1_5_rate15m = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="1",success="true"}[15m])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="5",success="true"}[15m])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[15m])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_2_10_rate15m = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="2",success="true"}[15m])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[15m])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[15m])) by (mode, method) - - - # Rate 1h - prod:src_xlang_request_duration_seconds:apdex_02_08_rate1h = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.2",success="true"}[1h])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.8",success="true"}[1h])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1h])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_1_5_rate1h = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="1",success="true"}[1h])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="5",success="true"}[1h])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1h])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_2_10_rate1h = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="2",success="true"}[1h])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[1h])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1h])) by (mode, method) - - - # Rate 1d - prod:src_xlang_request_duration_seconds:apdex_02_08_rate1d = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.2",success="true"}[1d])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.8",success="true"}[1d])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_1_5_rate1d = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="1",success="true"}[1d])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="5",success="true"}[1d])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_2_10_rate1d = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="2",success="true"}[1d])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[1d])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) - extra.rules: "" - - node.rules: | - node:container_cpu_usage_seconds_total:ratio_rate5m = - sum by (instance) (rate(container_cpu_usage_seconds_total{kubernetes_pod_name=""}[5m])) - / - max by (instance) (machine_cpu_cores) - - task:container_memory_usage_bytes:max = max by (namespace, container_name)(container_memory_usage_bytes{container_name!=""}) - task:container_cpu_usage_seconds_total:sum = sum by (id, namespace, container_name) (irate(container_cpu_usage_seconds_total{container_name!=""}[1m])) - - node:k8snode_filesystem_avail_bytes:ratio = - min by (exported_name) (k8snode_filesystem_avail_bytes / k8snode_filesystem_size_bytes) - prometheus.yml: | - --- - - global: - scrape_interval: 30s - evaluation_interval: 30s - - rule_files: - - 'node.rules' - - 'sourcegraph.rules' - - 'xlang.rules' - - 'apdex.rules' - - 'searcher.rules' - - 'symbols.rules' - - 'alert.rules' - - 'extra.rules' - - # A scrape configuration for running Prometheus on a Kubernetes cluster. - # This uses separate scrape configs for cluster components (i.e. API server, node) - # and services to allow each to use different authentication configs. - # - # Kubernetes labels will be added as Prometheus labels on metrics via the - # `labelmap` relabeling action. - - # Scrape config for API servers. - # - # Kubernetes exposes API servers as endpoints to the default/kubernetes - # service so this uses `endpoints` role and uses relabelling to only keep - # the endpoints associated with the default/kubernetes service using the - # default named port `https`. This works for single API server deployments as - # well as HA API server deployments. - scrape_configs: - - job_name: 'kubernetes-apiservers' - - kubernetes_sd_configs: - - role: endpoints - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - # insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - # Keep only the default/kubernetes service endpoints for the https port. This - # will add targets for each API server which Kubernetes adds an endpoint to - # the default/kubernetes service. - relabel_configs: - - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: default;kubernetes;https - - - job_name: 'kubernetes-nodes' - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - kubernetes_sd_configs: - - role: node - - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/${1}/proxy/metrics - - # Scrape config for service endpoints. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/scrape`: Only scrape services that have a value of `true` - # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need - # to set this to `https` & most likely set the `tls_config` of the scrape config. - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: If the metrics are exposed on a different port to the - # service then set this appropriately. - - job_name: 'kubernetes-service-endpoints' - - kubernetes_sd_configs: - - role: endpoints - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - action: replace - target_label: __address__ - regex: (.+)(?::\d+);(\d+) - replacement: $1:$2 - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - # Sourcegraph specific customization. We want a more convenient to type label. - # target_label: kubernetes_namespace - target_label: ns - - source_labels: [__meta_kubernetes_service_name] - action: replace - target_label: kubernetes_name - # Sourcegraph specific customization. We want a nicer name for job - - source_labels: [app] - action: replace - target_label: job - # Sourcegraph specific customization. We want a nicer name for instance - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: instance - - # Example scrape config for probing services via the Blackbox Exporter. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/probe`: Only probe services that have a value of `true` - - job_name: 'kubernetes-services' - - metrics_path: /probe - params: - module: [http_2xx] - - kubernetes_sd_configs: - - role: service - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe] - action: keep - regex: true - - source_labels: [__address__] - target_label: __param_target - - target_label: __address__ - replacement: blackbox - - source_labels: [__param_target] - target_label: instance - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_service_namespace] - # Sourcegraph specific customization. We want a more convenient to type label. - # target_label: kubernetes_namespace - target_label: ns - - source_labels: [__meta_kubernetes_service_name] - target_label: kubernetes_name - - # Example scrape config for pods - # - # The relabeling allows the actual pod scrape endpoint to be configured via the - # following annotations: - # - # * `prometheus.io/scrape`: Only scrape pods that have a value of `true` - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`. - - job_name: 'kubernetes-pods' - - kubernetes_sd_configs: - - role: pod - - relabel_configs: - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: (.+):(?:\d+);(\d+) - replacement: ${1}:${2} - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - # Sourcegraph specific customization. We want a more convenient to type label. - # target_label: kubernetes_namespace - target_label: ns - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: kubernetes_pod_name - searcher.rules: | - ########## - # Errors # - ########## - - searcher_requests:rate10m = sum by (instance)(rate(searcher_service_request_total[10m])) - searcher_errors:rate10m = sum by (instance)(rate(searcher_service_request_total{code!="200",code!="canceled"}[10m])) - searcher_errors:ratio10m = sum(searcher_errors:rate10m) / sum(searcher_requests:rate10m) - sourcegraph.rules: | - # This files contains recording rules targeted at the sourcegraph-frontend app - - # Duration (5m) - task:src_http_request_duration_seconds_bucket:rate5m = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[5m]) - route:src_http_request_duration_seconds_bucket:rate5m = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - job:src_http_request_duration_seconds_bucket:rate5m = sum by (ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - prod:src_http_request_duration_seconds_bucket:rate5m = sum by (le)(task:src_http_request_duration_seconds_bucket:rate5m) - - # Counts (5m) - task:src_http_request_count:rate5m = rate(src_http_request_duration_seconds_count{job=~"sourcegraph-.*"}[5m]) - route:src_http_request_count:rate5m = sum by (route, code, ns)(task:src_http_request_count:rate5m) - job:src_http_request_count:rate5m = sum by (code, ns)(task:src_http_request_count:rate5m) - prod:src_http_request_count:rate5m = sum by (code)(task:src_http_request_count:rate5m) - - # Duration (30m) - task:src_http_request_duration_seconds_bucket:rate30m = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[30m]) - route:src_http_request_duration_seconds_bucket:rate30m = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate30m) - job:src_http_request_duration_seconds_bucket:rate30m = sum by (ns, le)(task:src_http_request_duration_seconds_bucket:rate30m) - prod:src_http_request_duration_seconds_bucket:rate30m = sum by (le)(task:src_http_request_duration_seconds_bucket:rate30m) - - # Counts (30m) - task:src_http_request_count:rate30m = rate(src_http_request_duration_seconds_count{job=~"sourcegraph-.*"}[30m]) - route:src_http_request_count:rate30m = sum by (route, code, ns)(task:src_http_request_count:rate30m) - job:src_http_request_count:rate30m = sum by (code, ns)(task:src_http_request_count:rate30m) - prod:src_http_request_count:rate30m = sum by (code)(task:src_http_request_count:rate30m) - - - # Perf targets are over a day - prod:src_http_request_duration_seconds_bucket:rate1d = sum by (route, le)(rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[1d])) - - - # Measure uptime of services - app:up:sum = sum by (app)(up) - app:up:count = count by (app)(up) - app:up:ratio = - app:up:sum - / on (app) - app:up:count - symbols.rules: | - ########## - # Errors # - ########## - - symbols_requests:rate10m = sum by (instance)(rate(symbols_service_request_total[10m])) - symbols_errors:rate10m = sum by (instance)(rate(symbols_service_request_total{code!="200",code!="canceled"}[10m])) - symbols_errors:ratio10m = sum(symbols_errors:rate10m) / sum(symbols_requests:rate10m) - xlang.rules: | - prod:xlang_requests:rate5m = sum by (mode)(rate(src_xlang_request_duration_seconds_count[5m])) - prod:xlang_errors:rate5m = sum by (mode)(rate(src_xlang_request_duration_seconds_count{success="false"}[5m])) - prod:xlang_errors:ratio5m = prod:xlang_errors:rate5m / prod:xlang_requests:rate5m - prod:src_xlang_request_duration_seconds_bucket:rate1d = - sum by (le, mode, method)(rate(src_xlang_request_duration_seconds_bucket{success="true"}[1d])) -kind: ConfigMap -metadata: - name: prometheus - labels: - deploy: sourcegraph diff --git a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml b/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml deleted file mode 100644 index eb0f3426e9e6..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: prometheus -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.Service.yaml deleted file mode 100644 index a27e429c877c..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: prometheus - deploy: sourcegraph - name: prometheus -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: prometheus - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml b/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml deleted file mode 100644 index 6d6328ef133b..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: prometheus - labels: - deploy: sourcegraph diff --git a/examples/prometheus/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index 64cae7079a99..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ba3e71237fb5a564f99cfbec06bb58ce28f415901995d308fff5547a9b314f78 - - name: DEPLOY_TYPE - value: datacenter - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - image: sourcegraph/query-runner:2.10.1 - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/prometheus/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml b/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml deleted file mode 100644 index d2899ab68ade..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, discard unused keys when hitting limit - maxmemory 5gb - maxmemory-policy allkeys-lru - - # snapshots on disk every minute - dir /redis-data/ - save 60 1 -kind: ConfigMap -metadata: - name: redis-cache - labels: - deploy: sourcegraph diff --git a/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml deleted file mode 100644 index 7db56c45089d..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing short-lived caches. - labels: - deploy: sourcegraph - name: redis-cache -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-cache - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-cache - - configMap: - name: redis-cache - name: config diff --git a/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml deleted file mode 100644 index c100d569a89a..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-cache -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.Service.yaml deleted file mode 100644 index 0634270075e8..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/redis/redis-cache.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-cache - deploy: sourcegraph - name: redis-cache -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-cache - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml b/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml deleted file mode 100644 index 8664390e22de..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, return error when hitting limit - maxmemory 5gb - maxmemory-policy noeviction - - # live commit log to disk, additionally snapshots every 10 minutes - dir /redis-data/ - appendonly yes - save 600 1 -kind: ConfigMap -metadata: - name: redis-store - labels: - deploy: sourcegraph diff --git a/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml deleted file mode 100644 index 75cd48196f1d..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing semi-persistent data like user sessions. - labels: - deploy: sourcegraph - name: redis-store -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-store - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-store - - configMap: - name: redis-store - name: config diff --git a/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml b/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml deleted file mode 100644 index ae604b0d12f1..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-store -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.Service.yaml deleted file mode 100644 index 7fa5bd6e6a9e..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/redis/redis-store.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-store - deploy: sourcegraph - name: redis-store -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-store - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index 0f22a428fa35..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ba3e71237fb5a564f99cfbec06bb58ce28f415901995d308fff5547a9b314f78 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/prometheus/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index c734c84b0868..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ba3e71237fb5a564f99cfbec06bb58ce28f415901995d308fff5547a9b314f78 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/prometheus/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/storage-class.yaml b/examples/prometheus/generated/sourcegraph/templates/storage-class.yaml deleted file mode 100644 index eb98c274ef8a..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/storage-class.yaml +++ /dev/null @@ -1,13 +0,0 @@ -##--- -# Source: sourcegraph/templates/storage-class.yaml -kind: StorageClass -apiVersion: storage.k8s.io/v1beta1 -metadata: - name: default - labels: - deploy: sourcegraph -provisioner: kubernetes.io/gce-pd -parameters: - type: pd-ssd - zone: us-west1-a - diff --git a/examples/prometheus/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index 558b0b328788..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ba3e71237fb5a564f99cfbec06bb58ce28f415901995d308fff5547a9b314f78 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: SYMBOLS_CACHE_SIZE_MB - value: "100000" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/prometheus/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/examples/prometheus/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index bf1fcce0e603..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: sourcegraph/syntect_server:624a1a2 - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - securityContext: - runAsUser: 0 - volumes: diff --git a/examples/prometheus/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/examples/prometheus/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/examples/prometheus/generated/sourcegraph/templates/tls.Secret.yaml b/examples/prometheus/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 65f658f3e77f..000000000000 --- a/examples/prometheus/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: "" - key: "" -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/examples/prometheus/values.yaml b/examples/prometheus/values.yaml deleted file mode 100644 index 5c4612a3944b..000000000000 --- a/examples/prometheus/values.yaml +++ /dev/null @@ -1,6 +0,0 @@ -cluster: - storageClass: - create: gcp - zone: us-west1-a -site: - prometheus: {} diff --git a/examples/with-exp-langs/README.md b/examples/with-exp-langs/README.md deleted file mode 100644 index 55e115a3122e..000000000000 --- a/examples/with-exp-langs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Basic Experimental Language Server Example - -An example configuration with all of the experimental language servers enabled \ No newline at end of file diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/backend.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/backend.Service.yaml deleted file mode 100644 index 1a7206083b03..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/backend.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - group: backend - deploy: sourcegraph - name: backend -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - group: backend - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index 26096d3468eb..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,55 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "appURL": "http://localhost:3080", - "httpNodePort": 30080, - "langservers": [ - { - "language": "bash" - }, - { - "language": "clojure" - }, - { - "language": "cpp" - }, - { - "language": "cs" - }, - { - "language": "css" - }, - { - "language": "dockerfile" - }, - { - "language": "elixir" - }, - { - "language": "html" - }, - { - "language": "lua" - }, - { - "language": "ocaml" - }, - { - "language": "r" - }, - { - "language": "ruby" - }, - { - "language": "rust" - } - ] - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index eda36f83c45b..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - - name: CONFIG_FILE_HASH - value: 30b2283b452d5fb50293f1dc0c2993e1bec0497663b10667df336bfad5ba4757 - - name: DEPLOY_TYPE - value: datacenter - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: PUBLIC_REPO_REDIRECTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/frontend:2.10.1 - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - serviceAccountName: sourcegraph-frontend - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index d66e805fb728..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: - - name: http - nodePort: 30080 - port: 30080 - targetPort: http - selector: - app: sourcegraph-frontend - type: NodePort diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index 10753ba529e1..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 30b2283b452d5fb50293f1dc0c2993e1bec0497663b10667df336bfad5ba4757 - - name: LOG_REQUESTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index afb3b82a7153..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-1 - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - - name: CONFIG_FILE_HASH - value: 30b2283b452d5fb50293f1dc0c2993e1bec0497663b10667df336bfad5ba4757 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_REPOS_DIR - value: /data/repos - image: sourcegraph/gitserver:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-1 - ports: - - containerPort: 3178 - name: rpc - resources: - limits: - cpu: "4" - memory: "8G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index f66a1cb62dbb..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http - resources: - limits: - cpu: "4" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index de07b9bd8199..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index b0cddd88f95c..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,66 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 30b2283b452d5fb50293f1dc0c2993e1bec0497663b10667df336bfad5ba4757 - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index de8f33fd3595..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,102 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - - name: CONFIG_FILE_HASH - value: 30b2283b452d5fb50293f1dc0c2993e1bec0497663b10667df336bfad5ba4757 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: LANGSERVER_BASH - value: tcp://xlang-bash:8080 - - name: LANGSERVER_CLOJURE - value: tcp://xlang-clojure:8080 - - name: LANGSERVER_CPP - value: tcp://xlang-cpp:8080 - - name: LANGSERVER_CS - value: tcp://xlang-cs:8080 - - name: LANGSERVER_CSS - value: tcp://xlang-css:8080 - - name: LANGSERVER_DOCKERFILE - value: tcp://xlang-dockerfile:8080 - - name: LANGSERVER_ELIXIR - value: tcp://xlang-elixir:8080 - - name: LANGSERVER_HTML - value: tcp://xlang-html:8080 - - name: LANGSERVER_LUA - value: tcp://xlang-lua:8080 - - name: LANGSERVER_OCAML - value: tcp://xlang-ocaml:8080 - - name: LANGSERVER_R - value: tcp://xlang-r:8080 - - name: LANGSERVER_RUBY - value: tcp://xlang-ruby:8080 - - name: LANGSERVER_RUST - value: tcp://xlang-rust:8080 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - resources: - limits: - cpu: "1" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml deleted file mode 100644 index 00c91f08b799..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Postgres database for various data. - labels: - deploy: sourcegraph - name: pgsql -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: pgsql - group: backend - spec: - containers: - - env: - - name: PGDATA - value: /data/pgdata - - name: POSTGRES_USER - value: sg - image: sourcegraph/postgres:9.4 - livenessProbe: - initialDelaySeconds: 15 - tcpSocket: - port: 5432 - name: pgsql - ports: - - containerPort: 5432 - name: pgsql - resources: - limits: - cpu: "4" - memory: 2Gi - requests: - cpu: 250m - memory: 1G - volumeMounts: - - mountPath: /data - name: disk - - env: - - name: DATA_SOURCE_NAME - value: postgres://sg:@localhost:5432/?sslmode=disable - image: sourcegraph/pgsql-exporter:a294a9b6d83c139d3e1217f02c8f80a54cbf73ac - name: pgsql-exporter - resources: - limits: - cpu: 10m - memory: 50Mi - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: pgsql diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml deleted file mode 100644 index 095a470d4c17..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: pgsql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml deleted file mode 100644 index bb9eac0e653e..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9113" - prometheus.io/scrape: "true" - labels: - app: pgsql - deploy: sourcegraph - name: pgsql -spec: - ports: - - name: pgsql - port: 5432 - targetPort: pgsql - selector: - app: pgsql - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index 13b8a8755e8c..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 30b2283b452d5fb50293f1dc0c2993e1bec0497663b10667df336bfad5ba4757 - - name: DEPLOY_TYPE - value: datacenter - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - image: sourcegraph/query-runner:2.10.1 - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml deleted file mode 100644 index d2899ab68ade..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, discard unused keys when hitting limit - maxmemory 5gb - maxmemory-policy allkeys-lru - - # snapshots on disk every minute - dir /redis-data/ - save 60 1 -kind: ConfigMap -metadata: - name: redis-cache - labels: - deploy: sourcegraph diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml deleted file mode 100644 index 7db56c45089d..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing short-lived caches. - labels: - deploy: sourcegraph - name: redis-cache -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-cache - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-cache - - configMap: - name: redis-cache - name: config diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml deleted file mode 100644 index c100d569a89a..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-cache -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.Service.yaml deleted file mode 100644 index 0634270075e8..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-cache.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-cache - deploy: sourcegraph - name: redis-cache -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-cache - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml deleted file mode 100644 index 8664390e22de..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, return error when hitting limit - maxmemory 5gb - maxmemory-policy noeviction - - # live commit log to disk, additionally snapshots every 10 minutes - dir /redis-data/ - appendonly yes - save 600 1 -kind: ConfigMap -metadata: - name: redis-store - labels: - deploy: sourcegraph diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml deleted file mode 100644 index 75cd48196f1d..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing semi-persistent data like user sessions. - labels: - deploy: sourcegraph - name: redis-store -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-store - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-store - - configMap: - name: redis-store - name: config diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml deleted file mode 100644 index ae604b0d12f1..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-store -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.Service.yaml deleted file mode 100644 index 7fa5bd6e6a9e..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/redis/redis-store.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-store - deploy: sourcegraph - name: redis-store -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-store - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index c833318132bb..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 30b2283b452d5fb50293f1dc0c2993e1bec0497663b10667df336bfad5ba4757 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index 6877f7c36740..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 30b2283b452d5fb50293f1dc0c2993e1bec0497663b10667df336bfad5ba4757 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index f0a679bc0557..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 30b2283b452d5fb50293f1dc0c2993e1bec0497663b10667df336bfad5ba4757 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: SYMBOLS_CACHE_SIZE_MB - value: "100000" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index bf1fcce0e603..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: sourcegraph/syntect_server:624a1a2 - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - securityContext: - runAsUser: 0 - volumes: diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/tls.Secret.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 65f658f3e77f..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: "" - key: "" -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/examples/with-exp-langs/generated/sourcegraph/templates/xlang/experimental.yaml b/examples/with-exp-langs/generated/sourcegraph/templates/xlang/experimental.yaml deleted file mode 100644 index 0c11eaf87642..000000000000 --- a/examples/with-exp-langs/generated/sourcegraph/templates/xlang/experimental.yaml +++ /dev/null @@ -1,742 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/experimental.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-bash - deploy: sourcegraph - name: xlang-bash -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-bash - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for bash (used for live requests). - labels: - deploy: sourcegraph - name: xlang-bash -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-bash - spec: - containers: - - image: sourcegraph/codeintel-bash:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-bash - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-clojure - deploy: sourcegraph - name: xlang-clojure -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-clojure - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for clojure (used for live requests). - labels: - deploy: sourcegraph - name: xlang-clojure -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-clojure - spec: - containers: - - image: sourcegraph/codeintel-clojure:00231_2018-05-31_eef495b - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-clojure - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-cpp - deploy: sourcegraph - name: xlang-cpp -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-cpp - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for cpp (used for live requests). - labels: - deploy: sourcegraph - name: xlang-cpp -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-cpp - spec: - containers: - - image: sourcegraph/codeintel-cpp:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-cpp - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-cs - deploy: sourcegraph - name: xlang-cs -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-cs - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for cs (used for live requests). - labels: - deploy: sourcegraph - name: xlang-cs -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-cs - spec: - containers: - - image: sourcegraph/codeintel-csharp:00225_2018-05-26_26f55a3 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-cs - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-css - deploy: sourcegraph - name: xlang-css -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-css - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for css (used for live requests). - labels: - deploy: sourcegraph - name: xlang-css -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-css - spec: - containers: - - image: sourcegraph/codeintel-css:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-css - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-dockerfile - deploy: sourcegraph - name: xlang-dockerfile -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-dockerfile - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for dockerfile (used for live requests). - labels: - deploy: sourcegraph - name: xlang-dockerfile -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-dockerfile - spec: - containers: - - image: sourcegraph/codeintel-docker:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-dockerfile - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-elixir - deploy: sourcegraph - name: xlang-elixir -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-elixir - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for elixir (used for live requests). - labels: - deploy: sourcegraph - name: xlang-elixir -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-elixir - spec: - containers: - - image: sourcegraph/codeintel-elixir:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-elixir - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-html - deploy: sourcegraph - name: xlang-html -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-html - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for html (used for live requests). - labels: - deploy: sourcegraph - name: xlang-html -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-html - spec: - containers: - - image: sourcegraph/codeintel-html:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-html - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-lua - deploy: sourcegraph - name: xlang-lua -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-lua - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for lua (used for live requests). - labels: - deploy: sourcegraph - name: xlang-lua -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-lua - spec: - containers: - - image: sourcegraph/codeintel-lua:00225_2018-05-26_26f55a3 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-lua - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-ocaml - deploy: sourcegraph - name: xlang-ocaml -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-ocaml - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for ocaml (used for live requests). - labels: - deploy: sourcegraph - name: xlang-ocaml -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-ocaml - spec: - containers: - - image: sourcegraph/codeintel-ocaml:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-ocaml - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-r - deploy: sourcegraph - name: xlang-r -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-r - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for r (used for live requests). - labels: - deploy: sourcegraph - name: xlang-r -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-r - spec: - containers: - - image: sourcegraph/codeintel-r:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-r - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-ruby - deploy: sourcegraph - name: xlang-ruby -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-ruby - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for ruby (used for live requests). - labels: - deploy: sourcegraph - name: xlang-ruby -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-ruby - spec: - containers: - - image: sourcegraph/codeintel-ruby:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-ruby - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-rust - deploy: sourcegraph - name: xlang-rust -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-rust - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for rust (used for live requests). - labels: - deploy: sourcegraph - name: xlang-rust -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-rust - spec: - containers: - - image: sourcegraph/codeintel-rust:00239_2018-05-31_6b6cac4 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-rust - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - securityContext: - runAsUser: 0 \ No newline at end of file diff --git a/examples/with-exp-langs/values.yaml b/examples/with-exp-langs/values.yaml deleted file mode 100644 index 41c20f14e17f..000000000000 --- a/examples/with-exp-langs/values.yaml +++ /dev/null @@ -1,49 +0,0 @@ -cluster: - storageClass: - create: none -site: { - "langservers": [ - # WARNING experimental language servers follow - read about the caveats - # before enabling them: - # https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers#caveats-of-experimental-language-servers - { - "language": "bash", - }, - { - "language": "clojure", - }, - { - "language": "cpp", - }, - { - "language": "cs", - }, - { - "language": "css", - }, - { - "language": "dockerfile", - }, - { - "language": "elixir", - }, - { - "language": "html", - }, - { - "language": "lua", - }, - { - "language": "ocaml", - }, - { - "language": "r", - }, - { - "language": "ruby", - }, - { - "language": "rust", - }, - ], -} \ No newline at end of file diff --git a/examples/with-langs/README.md b/examples/with-langs/README.md deleted file mode 100644 index 8c4154a61f57..000000000000 --- a/examples/with-langs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Basic GCP example - -An example of a simple Sourcegraph Data Center cluster configuration for Google Cloud. diff --git a/examples/with-langs/generated/sourcegraph/templates/backend.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/backend.Service.yaml deleted file mode 100644 index 1a7206083b03..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/backend.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - group: backend - deploy: sourcegraph - name: backend -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - group: backend - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/examples/with-langs/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index 2519cacadc40..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,34 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "appURL": "http://localhost:3080", - "httpNodePort": 30080, - "langservers": [ - { - "language": "go" - }, - { - "language": "java" - }, - { - "language": "javascript" - }, - { - "language": "typescript" - }, - { - "language": "python" - }, - { - "language": "php" - } - ] - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index e8c7918c8983..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: DEPLOY_TYPE - value: datacenter - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: PUBLIC_REPO_REDIRECTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/frontend:2.10.1 - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - serviceAccountName: sourcegraph-frontend - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index d66e805fb728..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: - - name: http - nodePort: 30080 - port: 30080 - targetPort: http - selector: - app: sourcegraph-frontend - type: NodePort diff --git a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/examples/with-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index a41f42f87e6e..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: LOG_REQUESTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index ab903de01204..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-1 - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_REPOS_DIR - value: /data/repos - image: sourcegraph/gitserver:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-1 - ports: - - containerPort: 3178 - name: rpc - resources: - limits: - cpu: "4" - memory: "8G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - diff --git a/examples/with-langs/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/examples/with-langs/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/examples/with-langs/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/examples/with-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index f66a1cb62dbb..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http - resources: - limits: - cpu: "4" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/examples/with-langs/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/examples/with-langs/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index de07b9bd8199..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/with-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index 918a411a5154..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,66 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-langs/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index 56e9e6702e6e..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,100 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: LANGSERVER_GO - value: tcp://xlang-go:4389 - - name: LANGSERVER_GO_BG - value: tcp://xlang-go-bg:4389 - - name: LANGSERVER_JAVA - value: tcp://xlang-java:2088 - - name: LANGSERVER_JAVASCRIPT - value: tcp://xlang-typescript:2088 - - name: LANGSERVER_JAVASCRIPT_BG - value: tcp://xlang-typescript-bg:2088 - - name: LANGSERVER_JAVA_BG - value: tcp://xlang-java-bg:2088 - - name: LANGSERVER_PHP - value: tcp://xlang-php:2088 - - name: LANGSERVER_PHP_BG - value: tcp://xlang-php:2088 - - name: LANGSERVER_PYTHON - value: tcp://xlang-python:2087 - - name: LANGSERVER_PYTHON_BG - value: tcp://xlang-python-bg:2087 - - name: LANGSERVER_TYPESCRIPT - value: tcp://xlang-typescript:2088 - - name: LANGSERVER_TYPESCRIPT_BG - value: tcp://xlang-typescript-bg:2088 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - resources: - limits: - cpu: "1" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/with-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml deleted file mode 100644 index 00c91f08b799..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Postgres database for various data. - labels: - deploy: sourcegraph - name: pgsql -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: pgsql - group: backend - spec: - containers: - - env: - - name: PGDATA - value: /data/pgdata - - name: POSTGRES_USER - value: sg - image: sourcegraph/postgres:9.4 - livenessProbe: - initialDelaySeconds: 15 - tcpSocket: - port: 5432 - name: pgsql - ports: - - containerPort: 5432 - name: pgsql - resources: - limits: - cpu: "4" - memory: 2Gi - requests: - cpu: 250m - memory: 1G - volumeMounts: - - mountPath: /data - name: disk - - env: - - name: DATA_SOURCE_NAME - value: postgres://sg:@localhost:5432/?sslmode=disable - image: sourcegraph/pgsql-exporter:a294a9b6d83c139d3e1217f02c8f80a54cbf73ac - name: pgsql-exporter - resources: - limits: - cpu: 10m - memory: 50Mi - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: pgsql diff --git a/examples/with-langs/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/examples/with-langs/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml deleted file mode 100644 index 095a470d4c17..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: pgsql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/examples/with-langs/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml deleted file mode 100644 index bb9eac0e653e..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9113" - prometheus.io/scrape: "true" - labels: - app: pgsql - deploy: sourcegraph - name: pgsql -spec: - ports: - - name: pgsql - port: 5432 - targetPort: pgsql - selector: - app: pgsql - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index 65402aff9088..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: DEPLOY_TYPE - value: datacenter - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - image: sourcegraph/query-runner:2.10.1 - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-langs/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml b/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml deleted file mode 100644 index d2899ab68ade..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, discard unused keys when hitting limit - maxmemory 5gb - maxmemory-policy allkeys-lru - - # snapshots on disk every minute - dir /redis-data/ - save 60 1 -kind: ConfigMap -metadata: - name: redis-cache - labels: - deploy: sourcegraph diff --git a/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml deleted file mode 100644 index 7db56c45089d..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing short-lived caches. - labels: - deploy: sourcegraph - name: redis-cache -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-cache - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-cache - - configMap: - name: redis-cache - name: config diff --git a/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml deleted file mode 100644 index c100d569a89a..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-cache -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.Service.yaml deleted file mode 100644 index 0634270075e8..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/redis/redis-cache.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-cache - deploy: sourcegraph - name: redis-cache -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-cache - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml b/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml deleted file mode 100644 index 8664390e22de..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, return error when hitting limit - maxmemory 5gb - maxmemory-policy noeviction - - # live commit log to disk, additionally snapshots every 10 minutes - dir /redis-data/ - appendonly yes - save 600 1 -kind: ConfigMap -metadata: - name: redis-store - labels: - deploy: sourcegraph diff --git a/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml deleted file mode 100644 index 75cd48196f1d..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing semi-persistent data like user sessions. - labels: - deploy: sourcegraph - name: redis-store -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-store - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-store - - configMap: - name: redis-store - name: config diff --git a/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml b/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml deleted file mode 100644 index ae604b0d12f1..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-store -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.Service.yaml deleted file mode 100644 index 7fa5bd6e6a9e..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/redis/redis-store.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-store - deploy: sourcegraph - name: redis-store -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-store - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index 3420599d2c65..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/examples/with-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index b7ac6db8f9cd..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/with-langs/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index 47d8515ab88d..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: SYMBOLS_CACHE_SIZE_MB - value: "100000" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/with-langs/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index bf1fcce0e603..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: sourcegraph/syntect_server:624a1a2 - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - securityContext: - runAsUser: 0 - volumes: diff --git a/examples/with-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/tls.Secret.yaml b/examples/with-langs/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 65f658f3e77f..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: "" - key: "" -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml deleted file mode 100644 index d7780c67c421..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml +++ /dev/null @@ -1,77 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go-bg.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Go (used for background indexing jobs). - labels: - deploy: sourcegraph - name: xlang-go-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-go-bg - spec: - containers: - - args: - - -mode=tcp - - -addr=:4389 - env: - - name: CONFIG_FILE_HASH - value: ad622f4e70f7edc1056a270559e8ca07bba00abd81c1bea1e8940c7156532081 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/xlang-go:18575_2018-07-20_a470dcb - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-go-bg - ports: - - containerPort: 4389 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4389 - resources: - limits: - cpu: "4" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml deleted file mode 100644 index 439483e62ad1..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/go/xlang-go-bg.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: xlang-go-bg - deploy: sourcegraph - name: xlang-go-bg -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4389 - targetPort: lsp - selector: - app: xlang-go-bg - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java.Service.yaml deleted file mode 100644 index de75751d080f..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/java/xlang-java.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/java/xlang-java.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-java - deploy: sourcegraph - name: xlang-java -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-java - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml deleted file mode 100644 index 25076e3b67dd..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/python/xlang-python-bg.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-python-bg - deploy: sourcegraph - name: xlang-python-bg -spec: - ports: - - name: lsp - port: 2087 - targetPort: lsp - selector: - app: xlang-python-bg - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml b/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml deleted file mode 100644 index b19ff460da56..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml +++ /dev/null @@ -1,46 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/npm-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Cache for NPM. - labels: - deploy: sourcegraph - name: npm-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: npm-proxy - spec: - containers: - - image: sourcegraph/npm-proxy:9d593e267b6f5e86caeb29da37f140c5f5f4c8b2 - name: npm-proxy - ports: - - containerPort: 8080 - name: http - resources: - limits: - cpu: "1" - memory: 1Gi - requests: - cpu: 500m - memory: 1Gi - volumeMounts: - - mountPath: /cache - name: npm-proxy-cache - securityContext: - runAsUser: 0 - volumes: - - name: npm-proxy-cache - persistentVolumeClaim: - claimName: npm-proxy diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml b/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml deleted file mode 100644 index ccca8a7f3452..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: npm-proxy -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml b/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml deleted file mode 100644 index 1aabc807d18b..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/npm-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: npm-proxy - deploy: sourcegraph - name: npm-proxy -spec: - ports: - - name: http - port: 8080 - targetPort: http - selector: - app: npm-proxy - type: ClusterIP diff --git a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml b/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml deleted file mode 100644 index 884d2134dc79..000000000000 --- a/examples/with-langs/generated/sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/xlang/typescript/yarn-config.ConfigMap.yaml -apiVersion: v1 -data: - .yarnrc: | - # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - # yarn lockfile v1 - - - https-proxy "http://npm-proxy:8080" - proxy "http://npm-proxy:8080" - strict-ssl false -kind: ConfigMap -metadata: - name: yarn-config - labels: - deploy: sourcegraph diff --git a/examples/with-langs/values.yaml b/examples/with-langs/values.yaml deleted file mode 100644 index 3030ff854a3d..000000000000 --- a/examples/with-langs/values.yaml +++ /dev/null @@ -1,25 +0,0 @@ -cluster: - storageClass: - create: none -site: { - "langservers": [ - { - "language": "go", - }, - { - "language": "java", - }, - { - "language": "javascript", - }, - { - "language": "typescript", - }, - { - "language": "python", - }, - { - "language": "php", - }, - ], -} diff --git a/generate.sh b/generate.sh deleted file mode 100755 index 6b0f0ea41229..000000000000 --- a/generate.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -cd "$(dirname "${BASH_SOURCE[0]}")" - -./examples/generate.sh -./test-cases/generate.sh diff --git a/kubectl-apply-all.sh b/kubectl-apply-all.sh new file mode 100755 index 000000000000..bab3276c3581 --- /dev/null +++ b/kubectl-apply-all.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# This file should contain `kubectl apply` commands for all of your configured resources. +# +# This file should be run: +# * When the cluster is first created +# * Whenever the configuration for any resource has been updated + +# Apply the base Soucegraph deployment +kubectl apply --prune -l deploy=sourcegraph -f base --recursive diff --git a/release.sh b/release.sh deleted file mode 100755 index 0fc891ee6a6c..000000000000 --- a/release.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -cd "$(dirname "${BASH_SOURCE[0]}")" - -VERSION="$1" -LATEST="${LATEST:-true}" - -if [ -z "$VERSION" ] || [ "$VERSION" = "-h" ] || [ "$VERSION" = "--help" ]; then - cat <<'EOF' -Usage: LATEST={true(default)|false} ./release.sh X.Y.Z - - This script cuts a new release of Sourcegraph Data Center (optionally tagging it as the latest version). - It performs the following actions: - - * Check out a temporary branch `release-tmp-branch` - * Writes= the version to the Chart.yaml and commit this change. - * `git tag` the revision as "vX.Y.Z" and push it upstream. - * Check out the previously checked-out revision and delete `release-tmp-branch`. - * Unless LATEST=false, `git tag` and push upstream the new version as the `latest` tag. -EOF - exit 1 -fi - -if [ "$LATEST" = "true" ]; then - echo -n "Is the commit you wish to release as version $VERSION (and LATEST) currently checked out? [y/N] " -else - echo -n "Is the commit you wish to release as version $VERSION (NOT latest) currently checked out? [y/N] " -fi -read shouldProceed -if [ "$shouldProceed" != "y" ] && [ "$shouldProceed" != "Y" ]; then - echo "Aborting." - exit 1 -fi - -if [ ! -z "$(git status --porcelain)" ]; then - echo "You have a dirty working directory. Aborting." - exit 1 -fi - -set -ex - -# Write $VERSION to Chart.yaml and tag that revision as $VERSION -CURRENT_REV="$(git symbolic-ref HEAD 2> /dev/null || git rev-parse HEAD)" -CURRENT_REV="${CURRENT_REV#refs/heads/}" -git branch -D release-tmp-branch &> /dev/null || true -git checkout HEAD -b release-tmp-branch -cat < Chart.yaml -name: sourcegraph -version: ${VERSION} -home: https://sourcegraph.com -EOF -git commit -a -m "Release ${VERSION}" -git tag "v${VERSION}" -git checkout "$CURRENT_REV" -git branch -D release-tmp-branch &> /dev/null || true - -# Push up the tag $VERSION -git push origin "v${VERSION}" - -set +ex -echo "Sourcegraph Data Center ${VERSION} published." - -set -ex -if [ "$LATEST" = "true" ]; then - git tag -d latest > /dev/null || true - git tag latest "v${VERSION}" - git push -f origin latest - set +ex - echo "Sourcegraph Data Center ${VERSION} tagged as latest." -fi diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl deleted file mode 100644 index 5262fd9adc8e..000000000000 --- a/templates/_helpers.tpl +++ /dev/null @@ -1,402 +0,0 @@ -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{/* Emits environment variables */}} -{{- define "envVars" -}} -{{- range $k, $v := . -}} - -{{- if $v }} -- name: {{ $k }} - {{- if (typeIsLike "float64" $v) }} - value: {{ printf "%g" $v | printf "%q" }} - {{- else if (typeIsLike "bool" $v) }} - value: {{ printf "%t" $v | printf "%q" }} - {{- else }} - value: {{ $v }} - {{- end -}} -{{- end -}} - -{{- end -}} -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{/* Collects config-related environment variables into the `.envVars` field of the argument. */}} -{{- define "collectEnv" -}} - -{{- $envVars := (index . 0) -}} -{{- $toAdd := (index . 1) -}} - -{{- range $k, $v := $toAdd -}} -{{- $_ := set $envVars $k $v -}} -{{- end -}} - -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - - -{{/* Collects config-related environment variables into the `.envVars` field of the argument. */}} -{{- define "collectConfigEnv" -}} -{{- $_ := set .envVars "SOURCEGRAPH_CONFIG_FILE" "/etc/sourcegraph/config.json" -}} -{{- $_ := set .envVars "CONFIG_FILE_HASH" (include "expandedJSON" (dict "val" .Values.site "Files" .Files) | sha256sum) -}} -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{/* Collects tracing-related environment variables into the `.envVars` field of the argument. */}} -{{- define "collectTracingEnv" -}} -{{- $_ := set .envVars "LIGHTSTEP_PROJECT" .Values.site.lightstepProject -}} -{{- $_ := set .envVars "LIGHTSTEP_ACCESS_TOKEN" .Values.site.lightstepAccessToken -}} -{{- if .Values.site.lightstepAccessToken -}} - {{- $_ := set .envVars "LIGHTSTEP_INCLUDE_SENSITIVE" "t" -}} -{{- end -}} -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "collectCustomFrontendEnv" -}} -{{- $_ := set .envVars "DEPLOY_TYPE" "datacenter" -}} -{{- $_ := set .envVars "CORS_ORIGIN" .Values.site.corsOrigin -}} -{{- $_ := set .envVars "NO_GO_GET_DOMAINS" .Values.site.noGoGetDomains -}} -{{- $_ := set .envVars "SRC_APP_URL" .Values.site.appURL -}} -{{- if .Values.site.siteID -}} - {{- $_ := set .envVars "TRACKING_APP_ID" (quote .Values.site.siteID) -}} -{{- end -}} -{{- $_ := set .envVars "SSO_USER_HEADER" .Values.site.ssoUserHeader -}} -{{- $_ := set .envVars "OIDC_OP" .Values.site.oidcProvider -}} -{{- $_ := set .envVars "OIDC_CLIENT_ID" .Values.site.oidcClientID -}} -{{- $_ := set .envVars "OIDC_CLIENT_SECRET" .Values.site.oidcClientSecret -}} -{{- $_ := set .envVars "OIDC_EMAIL_DOMAIN" .Values.site.oidcEmailDomain -}} -{{- $_ := set .envVars "OIDC_OVERRIDE_TOKEN" .Values.site.oidcOverrideToken -}} -{{- $_ := set .envVars "MAX_REPOS_TO_SEARCH" .Values.site.maxReposToSearch -}} -{{- if .Values.site.experimentIndexedSearch -}} - {{- $_ := set .envVars "SEARCH_UNINDEXED_NOMISSING" "t" -}} - {{- $_ := set .envVars "SEARCH10_INDEX_DEFAULT" "only" -}} -{{- end -}} -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "collectPostgresEnv" -}} - -{{- if .Values.cluster.postgreSQL -}} - {{- $_ := set .envVars "PGDATABASE" .Values.cluster.postgreSQL.database -}} - {{- $_ := set .envVars "PGHOST" .Values.cluster.postgreSQL.host -}} - {{- $_ := set .envVars "PGPASSWORD" .Values.cluster.postgreSQL.password -}} - {{- $_ := set .envVars "PGPORT" .Values.cluster.postgreSQL.port -}} - {{- $_ := set .envVars "PGSSLMODE" .Values.cluster.postgreSQL.sslMode -}} - {{- $_ := set .envVars "PGUSER" .Values.cluster.postgreSQL.user -}} -{{- else -}} - {{- $_ := set .envVars "PGDATABASE" "sg" -}} - {{- $_ := set .envVars "PGHOST" "pgsql" -}} - {{- $_ := set .envVars "PGPASSWORD" "" -}} - {{- $_ := set .envVars "PGPORT" "\"5432\"" -}} - {{- $_ := set .envVars "PGSSLMODE" "disable" -}} - {{- $_ := set .envVars "PGUSER" "sg" -}} -{{- end -}} - -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "collectRedisEnv" -}} - -{{- if .Values.cluster.redis -}} - {{- if .Values.cluster.redis.cache -}} - {{- $_ := set .envVars "REDIS_CACHE_ENDPOINT" .Values.cluster.redis.cache -}} - {{- end -}} - {{- if .Values.cluster.redis.store -}} - {{- $_ := set .envVars "REDIS_STORE_ENDPOINT" .Values.cluster.redis.store -}} - {{- end -}} -{{- end -}} - -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "collectFrontendCommonEnv" -}} - -{{- if .Values.site.htmlBodyBottom -}} - {{- $_ := set .envVars "HTML_BODY_BOTTOM" .Values.site.htmlBodyBottom -}} -{{- end -}} - -{{- if .Values.site.htmlBodyTop -}} - {{- $_ := set .envVars "HTML_BODY_TOP" .Values.site.htmlBodyTop -}} -{{ end -}} - -{{- if .Values.site.htmlHeadBottom -}} - {{- $_ := set .envVars "HTML_HEAD_BOTTOM" .Values.site.htmlHeadBottom -}} -{{ end -}} - -{{- if .Values.site.htmlHeadTop -}} - {{- $_ := set .envVars "HTML_HEAD_TOP" .Values.site.htmlHeadTop -}} -{{ end -}} - -{{- $_ := set .envVars "LSP_PROXY" "lsp-proxy:4388" -}} - -{{- $_ := set .envVars "PUBLIC_REPO_REDIRECTS" "\"true\"" -}} -{{- $_ := set .envVars "SRC_GIT_SERVERS" (include "gitservers" .) -}} -{{- $_ := set .envVars "SRC_SESSION_COOKIE_KEY" .Values.site.sessionCookieKey -}} - -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "gitservers" -}} -{{- include "joinFmt" (dict "count" (int (default 1 .Values.cluster.gitserver.shards)) "fmt" "gitserver-%d:3178" "sep" " ") -}} -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - - -{{/* joinFmt accepts a dictionary specifying "count", "fmt", and "sep" to prints out the joined formatted list string */}} -{{- define "joinFmt" -}} -{{- range $i, $v := (until (int (sub .count 1))) -}}{{- printf $.fmt (add $i 1) }}{{$.sep}}{{ end -}} -{{- printf .fmt .count -}} -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{/* expands an object into pretty-printed JSON */}} -{{- define "expandedJSON" -}} - -{{- if (typeIsLike "map[string]interface {}" .val) -}} - -{ -{{- range $i, $k := (keys .val | sortAlpha) -}}{{ $v := (pluck $k $.val | first) }} - {{ printf "%q" $k }}: {{ include "expandedJSON" (dict "val" $v "Files" $.Files) | indent 2 | trim }}{{ if (ne (add1 $i) (len $.val)) }},{{ end }} -{{- end }} -} -{{- else if (typeIsLike "[]interface {}" .val) -}} - -[ -{{- range $i, $e := .val }} - {{ include "expandedJSON" (dict "val" $e "Files" $.Files) | indent 2 | trim }}{{ if (ne (add1 $i) (len $.val)) }},{{ end }} -{{- end }} -] - -{{- else if (typeIsLike "string" .val) -}} - {{ if not .val }}""{{ else }}{{ printf "%q" .val }}{{ end }} -{{- else if (typeIsLike "float64" .val) -}} - {{ printf "%g" .val }} -{{- else if (typeIsLike "bool" .val) -}} - {{ printf "%t" .val }} -{{- else if (typeIsLike "" .val) -}} - null -{{- else -}} - {{ call "error: unsupported JSON type" }} -{{- end -}} - -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{/* Sets the `.ret` field of the argument to true if the language specified by `.lang` is enabled */}} -{{- define "hasLanguage" -}} - -{{ $args := . }} -{{- $langservers := $args.langservers -}} -{{- $lang := $args.lang -}} - -{{- $_ := set $args "ret" false -}} -{{- range $langserver := $langservers -}} - {{- if (eq $langserver.language $lang) -}} - {{- $_ := set $args "ret" "true" -}} - {{- end -}} -{{- end -}} - -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "indexOrEmpty" -}} -{{- $keys := .keys -}} -{{- $obj := .obj -}} - -{{- if (eq (len $keys) 0) -}} - {{ $obj }} -{{- else if typeIsLike "map[string]interface {}" $obj -}} - {{- if hasKey $obj (first $keys) -}} - {{- include "indexOrEmpty" (dict "obj" (index $obj (first $keys)) "keys" (rest $keys)) -}} - {{- else -}} - {{- "" -}} - {{- end -}} -{{- else -}} - {{- "" -}} -{{- end -}} - -{{- end -}} - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "resourceRequirements" -}} -{{- $Values := index . 0 -}} -{{- $deploy := index . 1 -}} -{{- $container := index . 2 -}} - -resources: - limits: - cpu: {{ include "indexOrEmpty" (dict "obj" $Values.cluster "keys" (list $deploy "containers" $container "limits" "cpu")) | quote }} - memory: {{ include "indexOrEmpty" (dict "obj" $Values.cluster "keys" (list $deploy "containers" $container "limits" "memory")) | quote }} - requests: - cpu: {{ include "indexOrEmpty" (dict "obj" $Values.cluster "keys" (list $deploy "containers" $container "requests" "cpu")) | quote }} - memory: {{ include "indexOrEmpty" (dict "obj" $Values.cluster "keys" (list $deploy "containers" $container "requests" "memory")) | quote }} -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - - -{{- define "mountCacheVolume" -}} -{{- $nodeSSDPath := index . 0 -}} - -{{- if $nodeSSDPath -}} -- hostPath: - path: {{ $nodeSSDPath }}/pod-tmp - name: cache-ssd -{{- else -}} -- emptyDir: {} - name: cache-ssd -{{- end -}} - -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "nodeSelector" -}} -{{- $Values := index . 0 -}} -{{- $deploy := index . 1 -}} - -{{- if and (hasKey $Values.cluster $deploy) (hasKey (index $Values.cluster $deploy) "nodeSelector") -}} -nodeSelector: -{{- range $k, $v := (index $Values.cluster $deploy).nodeSelector }} - {{ $k }}: {{ $v }} -{{- end -}} -{{- end -}} - -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "securityContext" -}} - -{{- if .Values.cluster.securityContext -}} -securityContext: -{{- if .Values.cluster.securityContext.runAsUser }} - runAsUser: {{ .Values.cluster.securityContext.runAsUser }} -{{- end -}} -{{- if .Values.cluster.securityContext.fsGroup }} - fsGroup: {{ .Values.cluster.securityContext.fsGroup }} -{{- end -}} -{{- else -}} -securityContext: - runAsUser: 0 -{{- end -}} - -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "jaeger" -}} - -{{- if .Values.site.useJaeger -}} -- command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: {{ .Values.const.jaeger.agent.image }} - name: jaeger-agent - resources: - limits: - cpu: {{ .Values.cluster.jaeger.containers.agent.limits.cpu }} - memory: {{ .Values.cluster.jaeger.containers.agent.limits.memory }} - requests: - cpu: {{ .Values.cluster.jaeger.containers.agent.requests.cpu }} - memory: {{ .Values.cluster.jaeger.containers.agent.requests.memory }} -{{- end -}} - -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "volumeMounts" -}} - -{{- $Values := (index . 0) -}} -{{- $deployment := (index . 1) -}} -{{- $container := (index . 2) -}} - -{{- include "expandedYAML" (index (index $Values.cluster $deployment).containers $container).volumeMounts -}} - -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "commonVolumeMounts" -}} -{{- include "expandedYAML" .Values.cluster.commonVolumeMounts -}} -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{- define "commonVolumes" -}} -{{- include "expandedYAML" .Values.cluster.commonVolumes -}} -{{- end -}} - - -{{/* --------------- START OF TEMPLATE ------------- */}} - -{{/* expands an object into pretty-printed YAML */}} -{{- define "expandedYAML" -}} -{{- if . }}{{ "\n" }}{{- include "_expandedYAML" . | trimSuffix "\n" -}}{{ end -}} -{{- end -}} - - -{{- define "_expandedYAML" -}} - -{{- if (typeIsLike "map[string]interface {}" .) -}} - -{{- if len . | eq 0 -}}{}{{- else -}} - -{{- range $k, $v := . }} -{{- if (and $v (or (typeIsLike "[]interface {}" $v) (typeIsLike "map[string]interface {}" $v))) -}} - {{ $k }}:{{ include "_expandedYAML" $v | trimSuffix "\n" | nindent 2 }}{{ "\n" }} -{{- else -}} - {{ $k }}: {{ include "_expandedYAML" $v }}{{ "\n" }} -{{- end -}} -{{- end -}} - -{{- end -}} - -{{- else if (typeIsLike "[]interface {}" .) -}} - -{{- if len . | eq 0 -}}[]{{- else -}} - -{{- range $e := . -}} -{{- if (and $e (or (typeIsLike "[]interface {}" $e) (typeIsLike "map[string]interface {}" $e))) -}} -- {{ include "_expandedYAML" $e | trimSuffix "\n" | indent 2 | trimPrefix " " }} -{{ else -}} -- {{ include "_expandedYAML" $e }} -{{ end -}} -{{- end -}} - -{{- end -}} - -{{- else if (typeIsLike "string" .) -}} - {{- if not . }}{{ "" }}{{ else }}{{ . }}{{ end -}} -{{- else if (typeIsLike "float64" .) -}} - {{ printf "%g" . }} -{{- else if (typeIsLike "bool" .) -}} - {{ printf "%t" . }} -{{- else if (typeIsLike "" .) -}} - null -{{- else -}} - {{ call "error: unsupported JSON type" }} -{{- end -}} - -{{- end -}} diff --git a/templates/auth-proxy/auth-proxy.Deployment.yaml b/templates/auth-proxy/auth-proxy.Deployment.yaml deleted file mode 100644 index 0d55f838e684..000000000000 --- a/templates/auth-proxy/auth-proxy.Deployment.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{{- if (and .Values.site.authProxyIP .Values.site.authProxyPassword ) -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: HTTP basic auth proxy for sourcegraph-frontend - labels: - deploy: sourcegraph - name: auth-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: auth-proxy - spec: - containers: - - image: {{ .Values.const.authProxy.image }} - name: auth-proxy - ports: - - containerPort: 8080 - name: http - - containerPort: 8081 - name: https - resources: - limits: - cpu: "1" - memory: 1Gi - requests: - cpu: 500m - memory: 1Gi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /tls - name: tls - readOnly: true - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "authProxy") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - name: tls - secret: - secretName: tls -{{ end -}} diff --git a/templates/auth-proxy/auth-proxy.Service.yaml b/templates/auth-proxy/auth-proxy.Service.yaml deleted file mode 100644 index 0cea1b41f675..000000000000 --- a/templates/auth-proxy/auth-proxy.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if (and .Values.site.authProxyIP .Values.site.authProxyPassword ) -}} -apiVersion: v1 -kind: Service -metadata: - labels: - app: auth-proxy - deploy: sourcegraph - name: auth-proxy -spec: - loadBalancerIP: {{ .Values.site.authProxyIP }} - ports: - - name: http - port: 80 - targetPort: http - - name: https - port: 443 - targetPort: https - selector: - app: auth-proxy - type: LoadBalancer -{{ end -}} diff --git a/templates/backend.Service.yaml b/templates/backend.Service.yaml deleted file mode 100644 index 84e452714ffe..000000000000 --- a/templates/backend.Service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - group: backend - deploy: sourcegraph - name: backend -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - group: backend - type: ClusterIP diff --git a/templates/config-file.ConfigMap.yaml b/templates/config-file.ConfigMap.yaml deleted file mode 100644 index 52d7fae18192..000000000000 --- a/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -data: - config.json: |- -{{ include "expandedJSON" (dict "val" .Values.site "Files" .Files) | indent 4 }} -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/templates/frontend/sourcegraph-frontend.Deployment.yaml b/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index 1494c61acea6..000000000000 --- a/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,78 +0,0 @@ -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- include "collectCustomFrontendEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- include "collectFrontendCommonEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectPostgresEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- include "collectRedisEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- include "collectEnv" (list $envVars .Values.cluster.frontend.containers.frontend.env) -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: {{ required ".Values.cluster.frontend.replicas is required" .Values.cluster.frontend.replicas }} - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - {{- if (or .Values.site.tlsCert .Values.site.tlsKey) }} - - name: TLS_CERT - valueFrom: - secretKeyRef: - key: cert - name: tls - - name: TLS_KEY - valueFrom: - secretKeyRef: - key: key - name: tls - {{- end }} - image: {{ .Values.const.frontend.image }} - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - {{- include "resourceRequirements" (list .Values "frontend" "frontend") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "nodeSelector" (list .Values "frontend") | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - serviceAccountName: sourcegraph-frontend - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config diff --git a/templates/frontend/sourcegraph-frontend.Service.yaml b/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index 2c4318957951..000000000000 --- a/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: -{{- if .Values.site.httpNodePort }} - - name: http - nodePort: {{ .Values.site.httpNodePort }} - port: {{ .Values.site.httpNodePort }} - targetPort: http -{{- end -}} -{{- if .Values.site.httpsNodePort }} - - name: https - nodePort: {{ .Values.site.httpsNodePort }} - port: {{ .Values.site.httpsNodePort }} - targetPort: https -{{- end -}} -{{- if not (or .Values.site.httpNodePort .Values.site.httpsNodePort) }} - - port: 3080 - targetPort: "" -{{- end }} - selector: - app: sourcegraph-frontend -{{- if not (or .Values.site.httpNodePort .Values.site.httpsNodePort) }} - type: ClusterIP -{{- else }} - type: NodePort -{{- end }} diff --git a/templates/github-proxy/github-proxy.Deployment.yaml b/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index e6453dd576d8..000000000000 --- a/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- $_ := set $envVars "GITHUB_CLIENT_ID" .Values.site.githubClientID -}} -{{- $_ := set $envVars "GITHUB_CLIENT_SECRET" .Values.site.githubClientSecret -}} -{{- $_ := set $envVars "GITHUB_PERSONAL_ACCESS_TOKEN" .Values.site.githubPersonalAccessToken -}} -{{- $_ := set $envVars "LOG_REQUESTS" "\"true\"" -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - image: {{ .Values.const.githubProxy.image }} - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "githubProxy") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config diff --git a/templates/gitserver/gitserver-ssh.Secret.yaml b/templates/gitserver/gitserver-ssh.Secret.yaml deleted file mode 100644 index a01b53ab9c79..000000000000 --- a/templates/gitserver/gitserver-ssh.Secret.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{if .Values.cluster.gitserver.ssh }} -apiVersion: v1 -data: -{{- range $k, $v := .Values.cluster.gitserver.ssh }} - {{ $k }}: {{ b64enc $v }} -{{- end }} -kind: Secret -metadata: - name: gitserver-ssh - labels: - deploy: sourcegraph -type: Opaque -{{end}} diff --git a/templates/gitserver/gitserver.Deployment.yaml b/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index 6fa639839d18..000000000000 --- a/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- $global := . -}} -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" $global.Values "Files" $global.Files) }} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" $global.Values) }} -{{- $_ := set $envVars "SRC_REPOS_DIR" "/data/repos" -}} -{{- $_ := set $envVars "ORIGIN_MAP" $global.Values.site.gitOriginMap -}} -{{- include "collectEnv" (list $envVars .Values.cluster.gitserver.containers.gitserver.env) -}} - -{{- range $index, $gitserverIndex := until (required ".Values.cluster.gitserver.shards required" .Values.cluster.gitserver.shards | int) }} -{{- if eq $index 0 | not }} ---- -{{ end -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-{{ add1 $gitserverIndex }} -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-{{ add1 $gitserverIndex }} - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - image: {{ $global.Values.const.gitserver.image }} - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-{{ add1 $gitserverIndex }} - ports: - - containerPort: 3178 - name: rpc - {{- include "resourceRequirements" (list $global.Values "gitserver" "gitserver") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" $global | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - {{- if $global.Values.cluster.gitserver.ssh }} - - mountPath: /root/.ssh - name: ssh - {{ end }} - {{- include "jaeger" $global | nindent 6 | trimSuffix "\n " }} - {{- include "nodeSelector" (list $global.Values "gitserver") | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" $global | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" $global | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ $global.Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-{{ add1 $gitserverIndex }} - {{- if $global.Values.cluster.gitserver.ssh }} - - name: ssh - secret: - defaultMode: 384 - secretName: gitserver-ssh - {{ end }} -{{ end }} diff --git a/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index 2e9798212ea0..000000000000 --- a/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- $global := . -}} -{{- range $index, $gitserverIndex := until (required ".Values.cluster.gitserver.shards required" .Values.cluster.gitserver.shards | int) }} -{{- if eq $index 0 | not }} ---- -{{ end -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: {{ $global.Values.cluster.storageClass.name }} - labels: - deploy: sourcegraph - name: gitserver-{{ add1 $gitserverIndex }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ required ".Values.cluster.gitserver.diskSize is required" $global.Values.cluster.gitserver.diskSize }} -{{ end }} diff --git a/templates/gitserver/gitserver.Service.yaml b/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index dde7f1b4b1c6..000000000000 --- a/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP - -{{- $global := . -}} -{{- range $index, $gitserverIndex := until (required ".Values.cluster.gitserver.shards required" .Values.cluster.gitserver.shards | int) }} ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-{{ add1 $gitserverIndex }} - name: gitserver-{{ add1 $gitserverIndex }} -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-{{ add1 $gitserverIndex }} - type: ClusterIP -{{ end }} diff --git a/templates/indexed-search/indexed-search.Deployment.yaml b/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index d2b0231bf7fb..000000000000 --- a/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: {{ .Values.const.indexedSearch.image }} - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 -{{- include "resourceRequirements" (list .Values "indexedSearch" "zoekt-webserver") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: {{ .Values.const.indexedSearch.image }} - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http -{{- include "resourceRequirements" (list .Values "indexedSearch" "zoekt-indexserver") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /data - name: disk -{{- include "nodeSelector" (list .Values "indexedSearch") | nindent 6 | trimSuffix "\n " }} -{{- include "securityContext" . | nindent 6 }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index 0275b2a34b7a..000000000000 --- a/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: {{ .Values.cluster.storageClass.name }} - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ required ".Values.cluster.indexedSearch.diskSize required" .Values.cluster.indexedSearch.diskSize }} diff --git a/templates/indexer/indexer.Deployment.yaml b/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index bff32a85dfbe..000000000000 --- a/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectPostgresEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- include "collectRedisEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- $_ := set $envVars "LSP_PROXY" "lsp-proxy:4388" -}} -{{- $_ := set $envVars "SRC_GIT_SERVERS" (include "gitservers" .) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - image: {{ .Values.const.indexer.image }} - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "nodeSelector" (list .Values "indexer") | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config diff --git a/templates/jaeger/jaeger-cassandra.Deployment.yaml b/templates/jaeger/jaeger-cassandra.Deployment.yaml deleted file mode 100644 index af9d3befde11..000000000000 --- a/templates/jaeger/jaeger-cassandra.Deployment.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.site.useJaeger -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Database for Jaeger. - labels: - deploy: sourcegraph - name: jaeger-cassandra -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: jaeger-cassandra - spec: - containers: - - env: - - name: HEAP_NEWSIZE - value: 1G - - name: MAX_HEAP_SIZE - value: 6G - image: {{ .Values.const.jaeger.cassandra.image }} - name: cassandra - ports: - - containerPort: 9042 - name: cql - resources: - limits: - cpu: "4" - memory: 8Gi - requests: - cpu: 500m - memory: 2Gi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /var/lib/cassandra - name: data - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "jaeger") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - name: data - persistentVolumeClaim: - claimName: jaeger -{{ end -}} diff --git a/templates/jaeger/jaeger-collector.Deployment.yaml b/templates/jaeger/jaeger-collector.Deployment.yaml deleted file mode 100644 index 724dc02b39a9..000000000000 --- a/templates/jaeger/jaeger-collector.Deployment.yaml +++ /dev/null @@ -1,47 +0,0 @@ -{{- if .Values.site.useJaeger -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Receives traces from Jaeger agents. - labels: - deploy: sourcegraph - name: jaeger-collector -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: jaeger-collector - spec: - containers: - - command: - - /go/bin/collector-linux - - --cassandra.servers=jaeger-cassandra - - --cassandra.keyspace=jaeger_v1_test - image: {{ .Values.const.jaeger.collector.image }} - name: jaeger-collector - ports: - - containerPort: 14267 - name: jaeger-thrift - resources: - limits: - cpu: "1" - memory: 1Gi - requests: - cpu: 500m - memory: 1Gi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "jaeger") | nindent 6 | trimSuffix "\n " }} -{{ end -}} diff --git a/templates/jaeger/jaeger-query.Deployment.yaml b/templates/jaeger/jaeger-query.Deployment.yaml deleted file mode 100644 index 3ed115f24bc9..000000000000 --- a/templates/jaeger/jaeger-query.Deployment.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if .Values.site.useJaeger -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Frontend for querying traces. - labels: - deploy: sourcegraph - name: jaeger-query -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: jaeger-query - spec: - containers: - - command: - - /go/bin/query-linux - - --query.static-files=/go/jaeger-ui/ - - --cassandra.servers=jaeger-cassandra - - --cassandra.keyspace=jaeger_v1_test - image: {{ .Values.const.jaeger.query.image }} - name: jaeger-query - ports: - - containerPort: 16686 - name: http - resources: - limits: - cpu: "1" - memory: 1Gi - requests: - cpu: 500m - memory: 1Gi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "jaeger") | nindent 6 | trimSuffix "\n " }} -{{ end -}} diff --git a/templates/jaeger/jaeger.PersistentVolumeClaim.yaml b/templates/jaeger/jaeger.PersistentVolumeClaim.yaml deleted file mode 100644 index 21afd10cd89b..000000000000 --- a/templates/jaeger/jaeger.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.site.useJaeger -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: {{ .Values.cluster.storageClass.name }} - labels: - deploy: sourcegraph - name: jaeger -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi -{{ end -}} diff --git a/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index d3b1731bcd4f..000000000000 --- a/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,87 +0,0 @@ -{{- $langserverMapping := (dict "go" (dict "LANGSERVER_GO" "tcp://xlang-go:4389" "LANGSERVER_GO_BG" "tcp://xlang-go-bg:4389") "java" (dict "LANGSERVER_JAVA" "tcp://xlang-java:2088" "LANGSERVER_JAVA_BG" "tcp://xlang-java-bg:2088") "javascript" (dict "LANGSERVER_JAVASCRIPT" "tcp://xlang-typescript:2088" "LANGSERVER_JAVASCRIPT_BG" "tcp://xlang-typescript-bg:2088") "typescript" (dict "LANGSERVER_TYPESCRIPT" "tcp://xlang-typescript:2088" "LANGSERVER_TYPESCRIPT_BG" "tcp://xlang-typescript-bg:2088") "php" (dict "LANGSERVER_PHP" "tcp://xlang-php:2088" "LANGSERVER_PHP_BG" "tcp://xlang-php:2088") "python" (dict "LANGSERVER_PYTHON" "tcp://xlang-python:2087" "LANGSERVER_PYTHON_BG" "tcp://xlang-python-bg:2087")) -}} -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- include "collectRedisEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- range $ls := .Values.site.langservers -}} - {{- if (hasKey $langserverMapping $ls.language) -}} - {{- $langVars := (index $langserverMapping $ls.language) -}} - {{- range $k, $v := $langVars -}} - {{- $_ := set $envVars $k $v -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- $_ := set $envVars "SRC_GIT_SERVERS" (include "gitservers" .) -}} -{{- include "collectEnv" (list $envVars (index .Values.cluster.lspProxy.containers "lsp-proxy" ).env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - {{- range $langserver := .Values.site.langservers }} - {{- if not (has $langserver.language (list "go" "java" "php" "python" "javascript" "typescript")) }} - - name: LANGSERVER_{{ $langserver.language | upper }} - value: {{ $langserver.address | default (join "" (list "tcp://xlang-" $langserver.language ":8080")) }} - {{- end }} - {{- end }} - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: {{ .Values.const.lspProxy.image }} - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - {{- include "resourceRequirements" (list .Values "lspProxy" "lsp-proxy") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "nodeSelector" (list .Values "lspProxy") | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config - {{- include "mountCacheVolume" (list .Values.site.nodeSSDPath) | nindent 6 }} diff --git a/templates/pgsql/pgsql.Deployment.yaml b/templates/pgsql/pgsql.Deployment.yaml deleted file mode 100644 index 9accbd3d3076..000000000000 --- a/templates/pgsql/pgsql.Deployment.yaml +++ /dev/null @@ -1,74 +0,0 @@ -{{- if not (hasKey .Values.cluster "postgreSQL") -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Postgres database for various data. - labels: - deploy: sourcegraph - name: pgsql -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: pgsql - group: backend - spec: - containers: - - env: - - name: PGDATA - value: /data/pgdata - - name: POSTGRES_USER - value: sg - image: {{ .Values.const.pgsql.image }} - livenessProbe: - initialDelaySeconds: 15 - tcpSocket: - port: 5432 - name: pgsql - ports: - - containerPort: 5432 - name: pgsql - resources: - limits: - cpu: "4" - memory: 2Gi - requests: - cpu: 250m - memory: 1G - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - {{- include "volumeMounts" (list .Values "pgsql" "pgsql") | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /data - name: disk - - env: - - name: DATA_SOURCE_NAME - value: postgres://sg:@localhost:5432/?sslmode=disable - image: {{ .Values.const.pgsql.exporterImage }} - name: pgsql-exporter - resources: - limits: - cpu: 10m - memory: 50Mi - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "pgsql") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - {{- include "expandedYAML" .Values.cluster.pgsql.volumes | indent 6 | trimPrefix (repeat 6 " ") }} - - name: disk - persistentVolumeClaim: - claimName: pgsql -{{end}} \ No newline at end of file diff --git a/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/templates/pgsql/pgsql.PersistentVolumeClaim.yaml deleted file mode 100644 index b399587d4d18..000000000000 --- a/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if not (hasKey .Values.cluster "postgreSQL") -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: {{ .Values.cluster.storageClass.name }} - labels: - deploy: sourcegraph - name: pgsql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi -{{end}} \ No newline at end of file diff --git a/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml b/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml deleted file mode 100644 index 52d653646faa..000000000000 --- a/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.site.useAlertManager -}} -apiVersion: v1 -data: -{{- if .Values.site.alertmanagerConfig }} - config.yml: | - {{- .Values.site.alertmanagerConfig | nindent 4 }} -{{- else }} - config.yml: "" -{{- end }} -kind: ConfigMap -metadata: - name: alertmanager - labels: - deploy: sourcegraph -{{- end -}} diff --git a/templates/prometheus/alertmanager/alertmanager.Deployment.yaml b/templates/prometheus/alertmanager/alertmanager.Deployment.yaml deleted file mode 100644 index f78b678d58f7..000000000000 --- a/templates/prometheus/alertmanager/alertmanager.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- if .Values.site.useAlertManager -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Receives alerts from Prometheus and pushes them to OpsGenie. - labels: - deploy: sourcegraph - name: alertmanager -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: alertmanager - spec: - containers: - - args: - - --config.file=/etc/alertmanager/config.yml - - --storage.path=/alertmanager - - --web.external-url={{ .Values.site.alertmanagerURL }} - image: {{ .Values.const.alertManager.image }} - name: alertmanager - ports: - - containerPort: 9093 - name: http - resources: - limits: - cpu: 100m - memory: 20M - requests: - cpu: 50m - memory: 10M - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/alertmanager - name: config - readOnly: true - - mountPath: /alertmanager - name: data - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "alertManager") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - name: alertmanager - name: config - - emptyDir: {} - name: data -{{- end -}} diff --git a/templates/prometheus/prometheus.ClusterRole.yaml b/templates/prometheus/prometheus.ClusterRole.yaml deleted file mode 100644 index 4f941cc02e72..000000000000 --- a/templates/prometheus/prometheus.ClusterRole.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if and (hasKey .Values.site "prometheus") (ne .Values.cluster.rbac "disabled") -}} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: prometheus - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - nodes - - services - - endpoints - - pods - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get -- nonResourceURLs: - - /metrics - verbs: - - get -{{ end -}} diff --git a/templates/prometheus/prometheus.ClusterRoleBinding.yaml b/templates/prometheus/prometheus.ClusterRoleBinding.yaml deleted file mode 100644 index d66da1ddcd01..000000000000 --- a/templates/prometheus/prometheus.ClusterRoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and (hasKey .Values.site "prometheus") (ne .Values.cluster.rbac "disabled") -}} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: '{{.Release.Namespace}}-prometheus' - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: ClusterRole - name: prometheus -subjects: -- kind: ServiceAccount - name: prometheus - namespace: '{{.Release.Namespace}}' -{{ end -}} diff --git a/templates/prometheus/prometheus.Deployment.yaml b/templates/prometheus/prometheus.Deployment.yaml deleted file mode 100644 index 0e71e4a4e442..000000000000 --- a/templates/prometheus/prometheus.Deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -{{- if hasKey .Values.site "prometheus" -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Collects metrics and aggregates them into graphs. - labels: - deploy: sourcegraph - name: prometheus -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: prometheus - spec: - containers: - - args: - - -config.file=/etc/prometheus/prometheus.yml - - -storage.local.path=/prometheus/data - - -web.console.libraries=/etc/prometheus/console_libraries - - -web.console.templates=/etc/prometheus/consoles - - -web.external-url={{ .Values.site.alertmanagerURL }} - - -alertmanager.url=http://alertmanager - image: {{ .Values.const.prometheus.image }} - name: prometheus - ports: - - containerPort: 9090 - name: http - resources: - limits: - cpu: "4" - memory: 8Gi - requests: - cpu: 500m - memory: 2Gi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /prometheus - name: data - - mountPath: /etc/prometheus - name: config - - args: - - --volume-dir=/etc/prometheus - - --webhook-url=http://localhost:9090/-/reload - image: {{ .Values.const.configMapReload.image }} - name: configmap-reload - resources: - limits: - cpu: 10m - memory: 10Mi - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/prometheus - name: config - readOnly: true -{{- include "securityContext" . | nindent 6 }} -{{- include "nodeSelector" (list .Values "prometheus") | nindent 6 | trimSuffix "\n " }} - serviceAccountName: prometheus - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - name: data - persistentVolumeClaim: - claimName: prometheus - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: prometheus - name: config -{{ end -}} diff --git a/templates/prometheus/prometheus.PersistentVolumeClaim.yaml b/templates/prometheus/prometheus.PersistentVolumeClaim.yaml deleted file mode 100644 index 1b39b15ef8c0..000000000000 --- a/templates/prometheus/prometheus.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if hasKey .Values.site "prometheus" -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: {{ .Values.cluster.storageClass.name }} - labels: - deploy: sourcegraph - name: prometheus -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi -{{ end -}} diff --git a/templates/query-runner/query-runner.Deployment.yaml b/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index 1ceb0fe8cf7b..000000000000 --- a/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectCustomFrontendEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) }} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - image: {{ .Values.const.queryRunner.image }} - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "queryRunner") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config diff --git a/templates/redis/redis-cache.ConfigMap.yaml b/templates/redis/redis-cache.ConfigMap.yaml deleted file mode 100644 index 70e6de659fc9..000000000000 --- a/templates/redis/redis-cache.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if not ( and (hasKey .Values.cluster "redis") (hasKey (index .Values.cluster "redis") "cache") ) -}} -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, discard unused keys when hitting limit - maxmemory 5gb - maxmemory-policy allkeys-lru - - # snapshots on disk every minute - dir /redis-data/ - save 60 1 -kind: ConfigMap -metadata: - name: redis-cache - labels: - deploy: sourcegraph -{{end -}} diff --git a/templates/redis/redis-cache.Deployment.yaml b/templates/redis/redis-cache.Deployment.yaml deleted file mode 100644 index afa415773628..000000000000 --- a/templates/redis/redis-cache.Deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -{{- if not ( and (hasKey .Values.cluster "redis") (hasKey (index .Values.cluster "redis") "cache") ) -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing short-lived caches. - labels: - deploy: sourcegraph - name: redis-cache -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-cache - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: {{ .Values.const.redis.image }} - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: {{ .Values.const.redis.exporterImage }} - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "redis") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - name: redis-data - persistentVolumeClaim: - claimName: redis-cache - - configMap: - name: redis-cache - name: config -{{end -}} diff --git a/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/templates/redis/redis-cache.PersistentVolumeClaim.yaml deleted file mode 100644 index bfec09580b92..000000000000 --- a/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if not ( and (hasKey .Values.cluster "redis") (hasKey (index .Values.cluster "redis") "cache") ) -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: {{ .Values.cluster.storageClass.name }} - labels: - deploy: sourcegraph - name: redis-cache -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi -{{end -}} diff --git a/templates/redis/redis-cache.Service.yaml b/templates/redis/redis-cache.Service.yaml deleted file mode 100644 index 5174130ee363..000000000000 --- a/templates/redis/redis-cache.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if not ( and (hasKey .Values.cluster "redis") (hasKey (index .Values.cluster "redis") "cache") ) -}} -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-cache - deploy: sourcegraph - name: redis-cache -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-cache - type: ClusterIP -{{end -}} diff --git a/templates/redis/redis-store.ConfigMap.yaml b/templates/redis/redis-store.ConfigMap.yaml deleted file mode 100644 index b4f5f28f3ea7..000000000000 --- a/templates/redis/redis-store.ConfigMap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if not ( and (hasKey .Values.cluster "redis") (hasKey (index .Values.cluster "redis") "store") ) -}} -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, return error when hitting limit - maxmemory 5gb - maxmemory-policy noeviction - - # live commit log to disk, additionally snapshots every 10 minutes - dir /redis-data/ - appendonly yes - save 600 1 -kind: ConfigMap -metadata: - name: redis-store - labels: - deploy: sourcegraph -{{end -}} diff --git a/templates/redis/redis-store.Deployment.yaml b/templates/redis/redis-store.Deployment.yaml deleted file mode 100644 index d6371186cdd1..000000000000 --- a/templates/redis/redis-store.Deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -{{- if not ( and (hasKey .Values.cluster "redis") (hasKey (index .Values.cluster "redis") "store") ) -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing semi-persistent data like user sessions. - labels: - deploy: sourcegraph - name: redis-store -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-store - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: {{ .Values.const.redis.image }} - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: {{ .Values.const.redis.exporterImage }} - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "redis") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - name: redis-data - persistentVolumeClaim: - claimName: redis-store - - configMap: - name: redis-store - name: config -{{end -}} diff --git a/templates/redis/redis-store.PersistentVolumeClaim.yaml b/templates/redis/redis-store.PersistentVolumeClaim.yaml deleted file mode 100644 index 22991c17082c..000000000000 --- a/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if not ( and (hasKey .Values.cluster "redis") (hasKey (index .Values.cluster "redis") "store") ) -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: {{ .Values.cluster.storageClass.name }} - labels: - deploy: sourcegraph - name: redis-store -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi -{{end -}} diff --git a/templates/redis/redis-store.Service.yaml b/templates/redis/redis-store.Service.yaml deleted file mode 100644 index f4cd28906a27..000000000000 --- a/templates/redis/redis-store.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if not ( and (hasKey .Values.cluster "redis") (hasKey (index .Values.cluster "redis") "store") ) -}} -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-store - deploy: sourcegraph - name: redis-store -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-store - type: ClusterIP -{{end -}} diff --git a/templates/repo-updater/repo-updater.Deployment.yaml b/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index 3fc679925b0b..000000000000 --- a/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,59 +0,0 @@ -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- include "collectRedisEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- $_ := set $envVars "SRC_GIT_SERVERS" (include "gitservers" .) -}} -{{- $_ := set $envVars "REPO_LIST_UPDATE_INTERVAL" .Values.site.repoListUpdateInterval -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - image: {{ .Values.const.repoUpdater.image }} - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "repoUpdater") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config diff --git a/templates/searcher/searcher.Deployment.yaml b/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index a990a3964f51..000000000000 --- a/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- $_ := set $envVars "SRC_GIT_SERVERS" (include "gitservers" .) -}} -{{- $_ := set $envVars "SEARCHER_CACHE_SIZE_MB" "\"100000\"" -}} -{{- include "collectEnv" (list $envVars .Values.cluster.searcher.containers.searcher.env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: {{ required ".Values.cluster.searcher.replicas is required" .Values.cluster.searcher.replicas }} - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: {{ .Values.const.searcher.image }} - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - {{- include "resourceRequirements" (list .Values "searcher" "searcher") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "nodeSelector" (list .Values "searcher") | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config - {{- include "mountCacheVolume" (list .Values.site.nodeSSDPath) | nindent 6 }} diff --git a/templates/storage-class.yaml b/templates/storage-class.yaml deleted file mode 100644 index d237b7c54309..000000000000 --- a/templates/storage-class.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- $storageClassName := required ".Values.cluster.storageClass.name is required" .Values.cluster.storageClass.name -}} -{{- $storageClassCreate := required ".Values.cluster.storageClass.create is required" .Values.cluster.storageClass.create -}} -{{- $storageClassName := required ".Values.cluster.storageClass.name is required" .Values.cluster.storageClass.name -}} -{{- if eq $storageClassCreate "gcp" }} -{{- $storageClassZone := required ".Values.cluster.storageClass.zone is required" .Values.cluster.storageClass.zone -}} -kind: StorageClass -apiVersion: storage.k8s.io/v1beta1 -metadata: - name: {{ $storageClassName }} - labels: - deploy: sourcegraph -provisioner: kubernetes.io/gce-pd -parameters: - type: pd-ssd - zone: {{ $storageClassZone }} -{{ else if eq $storageClassCreate "aws" }} -{{- $storageClassZone := required ".Values.cluster.storageClass.zone is required" .Values.cluster.storageClass.zone -}} -kind: StorageClass -apiVersion: storage.k8s.io/v1 -metadata: - name: {{ $storageClassName }} -provisioner: kubernetes.io/aws-ebs -parameters: - type: gp2 - zones: {{ $storageClassZone }} -{{ else }} -{{- /* Do not emit a storage class if "create" is "none" */ -}} -{{ end }} diff --git a/templates/symbols/symbols.Deployment.yaml b/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index 7c27a67c860e..000000000000 --- a/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,62 +0,0 @@ -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- $_ := set $envVars "SRC_GIT_SERVERS" (include "gitservers" .) -}} -{{- $_ := set $envVars "SYMBOLS_CACHE_SIZE_MB" "\"100000\"" -}} -{{- include "collectEnv" (list $envVars .Values.cluster.symbols.containers.symbols.env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: {{ .Values.cluster.symbols.replicas | default 4 }} - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: {{ .Values.const.symbols.image }} - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - {{- include "resourceRequirements" (list .Values "symbols" "symbols") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "nodeSelector" (list .Values "symbols") | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config - {{- include "mountCacheVolume" (list .Values.site.nodeSSDPath) | nindent 6 }} diff --git a/templates/syntect-server/syntect-server.Deployment.yaml b/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index 04f60f12592f..000000000000 --- a/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: {{ .Values.const.syntectServer.image }} - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "syntectServer") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} diff --git a/templates/tls.Secret.yaml b/templates/tls.Secret.yaml deleted file mode 100644 index eac6c978115c..000000000000 --- a/templates/tls.Secret.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -data: - cert: {{ if .Values.site.tlsCert }}{{ .Values.site.tlsCert | b64enc }}{{ else }}""{{end}} - key: {{if .Values.site.tlsKey }}{{ .Values.site.tlsKey | b64enc}}{{ else }}""{{end}} -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/templates/xlang/experimental.yaml b/templates/xlang/experimental.yaml deleted file mode 100644 index 3260ed2f129e..000000000000 --- a/templates/xlang/experimental.yaml +++ /dev/null @@ -1,69 +0,0 @@ - -{{- $experimentalLangServers := .Values.const.experimentalLangServers -}} -{{- range $index, $langserver := .Values.site.langservers -}} - -{{- if (hasKey $experimentalLangServers $langserver.language) }} - -{{- if eq $index 0 | not }} ---- -{{ end -}} - -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-{{ $langserver.language }} - deploy: sourcegraph - name: xlang-{{ $langserver.language }} -spec: - ports: - - name: lsp - port: 8080 - targetPort: lsp - selector: - app: xlang-{{ $langserver.language }} - type: ClusterIP - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for {{ $langserver.language }} (used for live requests). - labels: - deploy: sourcegraph - name: xlang-{{ $langserver.language }} -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-{{ $langserver.language }} - spec: - containers: - {{ $imageName := index $experimentalLangServers $langserver.language "image" -}} - - image: {{ $imageName }} - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-{{ $langserver.language }} - ports: - - containerPort: 8080 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - {{- include "securityContext" .Values | nindent 6 }} -{{- end }} - -{{- end -}} diff --git a/templates/xlang/go/xlang-go-bg.Deployment.yaml b/templates/xlang/go/xlang-go-bg.Deployment.yaml deleted file mode 100644 index e19e7941f262..000000000000 --- a/templates/xlang/go/xlang-go-bg.Deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "go") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} - -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- include "collectRedisEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- $_ := set $envVars "NO_GO_GET_DOMAINS" .Values.site.noGoGetDomains -}} -{{- $_ := set $envVars "SRC_GIT_SERVERS" (include "gitservers" .) -}} -{{- include "collectEnv" (list $envVars (index .Values.cluster.xlangGo.containers "xlang-go" ).env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Go (used for background indexing jobs). - labels: - deploy: sourcegraph - name: xlang-go-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-go-bg - spec: - containers: - - args: - - -mode=tcp - - -addr=:4389 - env: -{{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: {{ .Values.const.xlangGo.image }} - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-go-bg - ports: - - containerPort: 4389 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4389 - {{- include "resourceRequirements" (list .Values "xlangGo" "xlang-go") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "xlangGo") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config - {{- include "mountCacheVolume" (list .Values.site.nodeSSDPath) | nindent 6 }} -{{ end -}} diff --git a/templates/xlang/go/xlang-go-bg.Service.yaml b/templates/xlang/go/xlang-go-bg.Service.yaml deleted file mode 100644 index a763058246e8..000000000000 --- a/templates/xlang/go/xlang-go-bg.Service.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "go") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: xlang-go-bg - deploy: sourcegraph - name: xlang-go-bg -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4389 - targetPort: lsp - selector: - app: xlang-go-bg - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/go/xlang-go.Deployment.yaml b/templates/xlang/go/xlang-go.Deployment.yaml deleted file mode 100644 index 9941bd26c174..000000000000 --- a/templates/xlang/go/xlang-go.Deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "go") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} - -{{- $envVars := dict -}} -{{- include "collectConfigEnv" (dict "envVars" $envVars "Values" .Values "Files" .Files) }} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) }} -{{- include "collectRedisEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- $_ := set $envVars "NO_GO_GET_DOMAINS" .Values.site.noGoGetDomains -}} -{{- $_ := set $envVars "SRC_GIT_SERVERS" (include "gitservers" .) -}} -{{- include "collectEnv" (list $envVars (index .Values.cluster.xlangGo.containers "xlang-go" ).env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Go (used for live requests). - labels: - deploy: sourcegraph - name: xlang-go -spec: - minReadySeconds: 10 - replicas: {{ required ".Values.cluster.xlangGo.replicas is required" .Values.cluster.xlangGo.replicas }} - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 2 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-go - spec: - containers: - - args: - - -mode=tcp - - -addr=:4389 - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: {{ .Values.const.xlangGo.image }} - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-go - ports: - - containerPort: 4389 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4389 - {{- include "resourceRequirements" (list .Values "xlangGo" "xlang-go") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - {{- include "jaeger" . | nindent 6 | trimSuffix "\n " }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "xlangGo") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - configMap: - defaultMode: {{ .Values.cluster.configVolume.defaultMode }} - name: config-file - name: sg-config - {{- include "mountCacheVolume" (list .Values.site.nodeSSDPath) | nindent 6 }} -{{ end -}} diff --git a/templates/xlang/go/xlang-go.Service.yaml b/templates/xlang/go/xlang-go.Service.yaml deleted file mode 100644 index 135dbb69c514..000000000000 --- a/templates/xlang/go/xlang-go.Service.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "go") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: xlang-go - deploy: sourcegraph - name: xlang-go -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4389 - targetPort: lsp - selector: - app: xlang-go - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/java/xlang-java-bg.Deployment.yaml b/templates/xlang/java/xlang-java-bg.Deployment.yaml deleted file mode 100644 index 6a66e568112d..000000000000 --- a/templates/xlang/java/xlang-java-bg.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "java") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} - -{{- $envVars := dict -}} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- $_ := set $envVars "JVM_OPT" "-Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y" -}} -{{- $_ := set $envVars "LS_OPT" "-l INFO" -}} -{{- $_ := set $envVars "EXECUTE_GRADLE_ORIGINAL_ROOT_PATHS" .Values.site.executeGradleOriginalRootPaths -}} -{{- $_ := set $envVars "PRIVATE_ARTIFACT_REPO_ID" .Values.site.privateArtifactRepoID -}} -{{- $_ := set $envVars "PRIVATE_ARTIFACT_REPO_URL" .Values.site.privateArtifactRepoURL -}} -{{- $_ := set $envVars "PRIVATE_ARTIFACT_REPO_USERNAME" .Values.site.privateArtifactRepoUsername -}} -{{- $_ := set $envVars "PRIVATE_ARTIFACT_REPO_PASSWORD" .Values.site.privateArtifactRepoPassword -}} -{{- include "collectEnv" (list $envVars (index .Values.cluster.xlangJava.containers "xlang-java" ).env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Java (used for background indexing jobs). - labels: - deploy: sourcegraph - name: xlang-java-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-java-bg - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - image: {{ .Values.const.xlangJava.image }} - name: xlang-java-bg - ports: - - containerPort: 2088 - name: lsp - {{- include "resourceRequirements" (list .Values "xlangJava" "xlang-java") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /tmp - name: tmp - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "xlangJava") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - emptyDir: {} - name: tmp -{{ end -}} diff --git a/templates/xlang/java/xlang-java-bg.Service.yaml b/templates/xlang/java/xlang-java-bg.Service.yaml deleted file mode 100644 index e06fcacc8d58..000000000000 --- a/templates/xlang/java/xlang-java-bg.Service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "java") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-java-bg - deploy: sourcegraph - name: xlang-java-bg -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-java-bg - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/java/xlang-java.Deployment.yaml b/templates/xlang/java/xlang-java.Deployment.yaml deleted file mode 100644 index c43d2c8e2dbe..000000000000 --- a/templates/xlang/java/xlang-java.Deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "java") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} - -{{- $envVars := dict -}} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- $_ := set $envVars "JVM_OPT" "-Xms8000m -Xmx8000m -XX:+PrintFlagsFinal -Dsun.zip.disableMemoryMapping=true -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:8001,suspend=n,server=y" -}} -{{- $_ := set $envVars "LS_OPT" "-l INFO" -}} -{{- $_ := set $envVars "EXECUTE_GRADLE_ORIGINAL_ROOT_PATHS" .Values.site.executeGradleOriginalRootPaths -}} -{{- $_ := set $envVars "PRIVATE_ARTIFACT_REPO_ID" .Values.site.privateArtifactRepoID -}} -{{- $_ := set $envVars "PRIVATE_ARTIFACT_REPO_URL" .Values.site.privateArtifactRepoURL -}} -{{- $_ := set $envVars "PRIVATE_ARTIFACT_REPO_USERNAME" .Values.site.privateArtifactRepoUsername -}} -{{- $_ := set $envVars "PRIVATE_ARTIFACT_REPO_PASSWORD" .Values.site.privateArtifactRepoPassword -}} -{{- include "collectEnv" (list $envVars (index .Values.cluster.xlangJava.containers "xlang-java" ).env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Java (used for live requests). - labels: - deploy: sourcegraph - name: xlang-java -spec: - minReadySeconds: 10 - replicas: {{ required ".Values.cluster.xlangJava.replicas is required" .Values.cluster.xlangJava.replicas }} - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-java - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - image: {{ .Values.const.xlangJava.image }} - name: xlang-java - ports: - - containerPort: 2088 - name: lsp - {{- include "resourceRequirements" (list .Values "xlangJava" "xlang-java") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /tmp - name: tmp - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "xlangJava") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - emptyDir: {} - name: tmp -{{ end -}} diff --git a/templates/xlang/java/xlang-java.Service.yaml b/templates/xlang/java/xlang-java.Service.yaml deleted file mode 100644 index 0bb053f71850..000000000000 --- a/templates/xlang/java/xlang-java.Service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "java") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-java - deploy: sourcegraph - name: xlang-java -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-java - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/php/xlang-php.Deployment.yaml b/templates/xlang/php/xlang-php.Deployment.yaml deleted file mode 100644 index 6481553a7287..000000000000 --- a/templates/xlang/php/xlang-php.Deployment.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "php") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for PHP. - labels: - deploy: sourcegraph - name: xlang-php -spec: - minReadySeconds: 10 - replicas: {{ required ".Values.cluster.xlangPHP.replicas is required" .Values.cluster.xlangPHP.replicas }} - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-php - spec: - containers: - - env: - - name: COMPOSER_AUTH - value: '{"github-oauth": {"github.com": ""}}' - image: {{ .Values.const.xlangPHP.image }} - name: xlang-php - ports: - - containerPort: 2088 - name: lsp - {{- include "resourceRequirements" (list .Values "xlangPHP" "xlang-php") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /tmp - name: tmp - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "xlangPHP") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - emptyDir: {} - name: tmp -{{ end -}} diff --git a/templates/xlang/php/xlang-php.Service.yaml b/templates/xlang/php/xlang-php.Service.yaml deleted file mode 100644 index 17e379182840..000000000000 --- a/templates/xlang/php/xlang-php.Service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "php") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-php - deploy: sourcegraph - name: xlang-php -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-php - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/python/xlang-python-bg.Deployment.yaml b/templates/xlang/python/xlang-python-bg.Deployment.yaml deleted file mode 100644 index 23b35a84d39c..000000000000 --- a/templates/xlang/python/xlang-python-bg.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "python") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} - -{{- $envVars := dict -}} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- include "collectEnv" (list $envVars (index .Values.cluster.xlangPython.containers "xlang-python" ).env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Python (used for background indexing jobs). - labels: - deploy: sourcegraph - app: xlang-java-bg - name: xlang-python-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-python-bg - spec: - containers: - - image: {{ .Values.const.xlangPython.image }} - {{- if include "envVars" $envVars | trim | empty | not }} - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - {{- end }} - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-python-bg - ports: - - containerPort: 2087 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - {{- include "resourceRequirements" (list .Values "xlangPython" "xlang-python") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - {{- include "nodeSelector" (list .Values "xlangPython") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} -{{ end -}} diff --git a/templates/xlang/python/xlang-python-bg.Service.yaml b/templates/xlang/python/xlang-python-bg.Service.yaml deleted file mode 100644 index ad060a4ceced..000000000000 --- a/templates/xlang/python/xlang-python-bg.Service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "python") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-python-bg - deploy: sourcegraph - name: xlang-python-bg -spec: - ports: - - name: lsp - port: 2087 - targetPort: lsp - selector: - app: xlang-python-bg - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/python/xlang-python.Deployment.yaml b/templates/xlang/python/xlang-python.Deployment.yaml deleted file mode 100644 index 1e024ed8a6b0..000000000000 --- a/templates/xlang/python/xlang-python.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "python") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} - -{{- $envVars := dict -}} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- include "collectEnv" (list $envVars (index .Values.cluster.xlangPython.containers "xlang-python" ).env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for Python (used for live requests). - labels: - deploy: sourcegraph - name: xlang-python -spec: - minReadySeconds: 10 - replicas: {{ .Values.cluster.xlangPython.replicas | default 1 }} - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-python - spec: - containers: - - image: {{ .Values.const.xlangPython.image }} - {{- if include "envVars" $envVars | trim | empty | not }} - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - {{- end }} - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-python - ports: - - containerPort: 2087 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - {{- include "resourceRequirements" (list .Values "xlangPython" "xlang-python") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "xlangPython") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} -{{ end -}} diff --git a/templates/xlang/python/xlang-python.Service.yaml b/templates/xlang/python/xlang-python.Service.yaml deleted file mode 100644 index f9b0ce2f3a73..000000000000 --- a/templates/xlang/python/xlang-python.Service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- $args := (dict "langservers" .Values.site.langservers "lang" "python") -}} -{{- include "hasLanguage" $args -}} -{{- if $args.ret -}} -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-python - deploy: sourcegraph - name: xlang-python -spec: - ports: - - name: lsp - port: 2087 - targetPort: lsp - selector: - app: xlang-python - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/typescript/npm-proxy.Deployment.yaml b/templates/xlang/typescript/npm-proxy.Deployment.yaml deleted file mode 100644 index f66be428eab8..000000000000 --- a/templates/xlang/typescript/npm-proxy.Deployment.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- $tsArgs := (dict "langservers" .Values.site.langservers "lang" "typescript") -}} -{{- include "hasLanguage" $tsArgs -}} -{{- $jsArgs := (dict "langservers" .Values.site.langservers "lang" "javascript") -}} -{{- include "hasLanguage" $jsArgs -}} -{{- if (or $jsArgs.ret $tsArgs.ret) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Cache for NPM. - labels: - deploy: sourcegraph - name: npm-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: npm-proxy - spec: - containers: - - image: {{ .Values.const.npmProxy.image }} - name: npm-proxy - ports: - - containerPort: 8080 - name: http - resources: - limits: - cpu: "1" - memory: 1Gi - requests: - cpu: 500m - memory: 1Gi - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /cache - name: npm-proxy-cache - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "npmProxy") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - - name: npm-proxy-cache - persistentVolumeClaim: - claimName: npm-proxy -{{ end -}} diff --git a/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml b/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml deleted file mode 100644 index 665402b77d63..000000000000 --- a/templates/xlang/typescript/npm-proxy.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- $tsArgs := (dict "langservers" .Values.site.langservers "lang" "typescript") -}} -{{- include "hasLanguage" $tsArgs -}} -{{- $jsArgs := (dict "langservers" .Values.site.langservers "lang" "javascript") -}} -{{- include "hasLanguage" $jsArgs -}} -{{- if (or $jsArgs.ret $tsArgs.ret) -}} - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: {{ .Values.cluster.storageClass.name }} - labels: - deploy: sourcegraph - name: npm-proxy -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi -{{ end -}} diff --git a/templates/xlang/typescript/npm-proxy.Service.yaml b/templates/xlang/typescript/npm-proxy.Service.yaml deleted file mode 100644 index 0d8d8f2364be..000000000000 --- a/templates/xlang/typescript/npm-proxy.Service.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- $tsArgs := (dict "langservers" .Values.site.langservers "lang" "typescript") -}} -{{- include "hasLanguage" $tsArgs -}} -{{- $jsArgs := (dict "langservers" .Values.site.langservers "lang" "javascript") -}} -{{- include "hasLanguage" $jsArgs -}} -{{- if (or $jsArgs.ret $tsArgs.ret) -}} - -apiVersion: v1 -kind: Service -metadata: - labels: - app: npm-proxy - deploy: sourcegraph - name: npm-proxy -spec: - ports: - - name: http - port: 8080 - targetPort: http - selector: - app: npm-proxy - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml b/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml deleted file mode 100644 index ef68bedc4cb8..000000000000 --- a/templates/xlang/typescript/xlang-typescript-bg.Deployment.yaml +++ /dev/null @@ -1,71 +0,0 @@ -{{- $tsArgs := (dict "langservers" .Values.site.langservers "lang" "typescript") -}} -{{- include "hasLanguage" $tsArgs -}} -{{- $jsArgs := (dict "langservers" .Values.site.langservers "lang" "javascript") -}} -{{- include "hasLanguage" $jsArgs -}} -{{- if (or $jsArgs.ret $tsArgs.ret) -}} - -{{- $envVars := dict -}} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- include "collectEnv" (list $envVars (index .Values.cluster.xlangJavascriptTypescript.containers "xlang-javascript-typescript" ).env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for JavaScript and TypeScript (used for background indexing - jobs). - labels: - deploy: sourcegraph - name: xlang-typescript-bg -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-typescript-bg - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: {{ .Values.const.xlangJavascriptTypescript.image }} - livenessProbe: - initialDelaySeconds: 30 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-typescript-bg - ports: - - containerPort: 2088 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - {{- include "resourceRequirements" (list .Values "xlangJavascriptTypescript" "xlang-javascript-typescript") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /yarn-config - name: yarn-config - - mountPath: /mnt/cache - name: cache-ssd - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "xlangJavascriptTypescript") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - {{- include "mountCacheVolume" (list .Values.site.nodeSSDPath) | nindent 6 }} - - configMap: - name: yarn-config - name: yarn-config -{{ end -}} diff --git a/templates/xlang/typescript/xlang-typescript-bg.Service.yaml b/templates/xlang/typescript/xlang-typescript-bg.Service.yaml deleted file mode 100644 index 06365d37b015..000000000000 --- a/templates/xlang/typescript/xlang-typescript-bg.Service.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- $tsArgs := (dict "langservers" .Values.site.langservers "lang" "typescript") -}} -{{- include "hasLanguage" $tsArgs -}} -{{- $jsArgs := (dict "langservers" .Values.site.langservers "lang" "javascript") -}} -{{- include "hasLanguage" $jsArgs -}} -{{- if (or $jsArgs.ret $tsArgs.ret) -}} - -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-typescript-bg - deploy: sourcegraph - name: xlang-typescript-bg -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-typescript-bg - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/typescript/xlang-typescript.Deployment.yaml b/templates/xlang/typescript/xlang-typescript.Deployment.yaml deleted file mode 100644 index 62da8eed9bdd..000000000000 --- a/templates/xlang/typescript/xlang-typescript.Deployment.yaml +++ /dev/null @@ -1,70 +0,0 @@ -{{- $tsArgs := (dict "langservers" .Values.site.langservers "lang" "typescript") -}} -{{- include "hasLanguage" $tsArgs -}} -{{- $jsArgs := (dict "langservers" .Values.site.langservers "lang" "javascript") -}} -{{- include "hasLanguage" $jsArgs -}} -{{- if (or $jsArgs.ret $tsArgs.ret) -}} - -{{- $envVars := dict -}} -{{- include "collectTracingEnv" (dict "envVars" $envVars "Values" .Values) -}} -{{- include "collectEnv" (list $envVars (index .Values.cluster.xlangJavascriptTypescript.containers "xlang-javascript-typescript" ).env) -}} - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: LSP server for JavaScript and TypeScript (used for live requests). - labels: - deploy: sourcegraph - name: xlang-typescript -spec: - minReadySeconds: 10 - replicas: {{ required ".Values.cluster.xlang-javascript-typescript.replicas is required" .Values.cluster.xlangJavascriptTypescript.replicas }} - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: xlang-typescript - spec: - containers: - - env: - {{- include "envVars" $envVars | indent 8 | trimPrefix (repeat 8 " ") }} - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: {{ .Values.const.xlangJavascriptTypescript.image }} - livenessProbe: - initialDelaySeconds: 30 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: xlang-typescript - ports: - - containerPort: 2088 - name: lsp - readinessProbe: - tcpSocket: - port: lsp - {{- include "resourceRequirements" (list .Values "xlangJavascriptTypescript" "xlang-javascript-typescript") | nindent 8 }} - volumeMounts: - {{- include "commonVolumeMounts" . | indent 8 | trimPrefix (repeat 8 " ") }} - - mountPath: /yarn-config - name: yarn-config - - mountPath: /mnt/cache - name: cache-ssd - {{- include "securityContext" . | nindent 6 }} - {{- include "nodeSelector" (list .Values "xlangJavascriptTypescript") | nindent 6 | trimSuffix "\n " }} - volumes: - {{- include "commonVolumes" . | indent 6 | trimPrefix (repeat 6 " ") }} - {{- include "mountCacheVolume" (list .Values.site.nodeSSDPath) | nindent 6 }} - - configMap: - name: yarn-config - name: yarn-config -{{ end -}} diff --git a/templates/xlang/typescript/xlang-typescript.Service.yaml b/templates/xlang/typescript/xlang-typescript.Service.yaml deleted file mode 100644 index 739d1e2d86cf..000000000000 --- a/templates/xlang/typescript/xlang-typescript.Service.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- $tsArgs := (dict "langservers" .Values.site.langservers "lang" "typescript") -}} -{{- include "hasLanguage" $tsArgs -}} -{{- $jsArgs := (dict "langservers" .Values.site.langservers "lang" "javascript") -}} -{{- include "hasLanguage" $jsArgs -}} -{{- if (or $jsArgs.ret $tsArgs.ret) -}} - -apiVersion: v1 -kind: Service -metadata: - labels: - app: xlang-typescript - deploy: sourcegraph - name: xlang-typescript -spec: - ports: - - name: lsp - port: 2088 - targetPort: lsp - selector: - app: xlang-typescript - type: ClusterIP -{{ end -}} diff --git a/templates/xlang/typescript/yarn-config.ConfigMap.yaml b/templates/xlang/typescript/yarn-config.ConfigMap.yaml deleted file mode 100644 index ae4cb0e4d0b3..000000000000 --- a/templates/xlang/typescript/yarn-config.ConfigMap.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- $tsArgs := (dict "langservers" .Values.site.langservers "lang" "typescript") -}} -{{- include "hasLanguage" $tsArgs -}} -{{- $jsArgs := (dict "langservers" .Values.site.langservers "lang" "javascript") -}} -{{- include "hasLanguage" $jsArgs -}} -{{- if (or $jsArgs.ret $tsArgs.ret) -}} - -apiVersion: v1 -data: - .yarnrc: | - # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - # yarn lockfile v1 - - - https-proxy "http://npm-proxy:8080" - proxy "http://npm-proxy:8080" - strict-ssl false -kind: ConfigMap -metadata: - name: yarn-config - labels: - deploy: sourcegraph -{{ end -}} diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/backend.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/backend.Service.yaml deleted file mode 100644 index 1a7206083b03..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/backend.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - group: backend - deploy: sourcegraph - name: backend -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - group: backend - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index 592dbdac05b9..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "appURL": "http://localhost:3080", - "httpNodePort": 30080, - "langservers": [ - { - "address": "tcp://1.2.3.4:1234", - "language": "html" - } - ] - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index 1fdacaf5fa00..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,92 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - - name: CONFIG_FILE_HASH - value: 718c4d051e11d962879e2ae21662749b816d897dc692f1bc593557616e61cc21 - - name: DEPLOY_TYPE - value: datacenter - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg2 - - name: PGHOST - value: postgres.mycompany.org - - name: PGPASSWORD - value: mysecret - - name: PGPORT - value: "5433" - - name: PGSSLMODE - value: enable - - name: PGUSER - value: sg2 - - name: PUBLIC_REPO_REDIRECTS - value: "true" - - name: REDIS_CACHE_ENDPOINT - value: redis.mycompany.org:6379 - - name: REDIS_STORE_ENDPOINT - value: redis.mycompany.org:6379 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/frontend:2.10.1 - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - serviceAccountName: sourcegraph-frontend - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index d66e805fb728..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: - - name: http - nodePort: 30080 - port: 30080 - targetPort: http - selector: - app: sourcegraph-frontend - type: NodePort diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index 81dc922b3fe1..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 718c4d051e11d962879e2ae21662749b816d897dc692f1bc593557616e61cc21 - - name: LOG_REQUESTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index cad9fd328394..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-1 - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - - name: CONFIG_FILE_HASH - value: 718c4d051e11d962879e2ae21662749b816d897dc692f1bc593557616e61cc21 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_REPOS_DIR - value: /data/repos - image: sourcegraph/gitserver:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-1 - ports: - - containerPort: 3178 - name: rpc - resources: - limits: - cpu: "4" - memory: "8G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index f66a1cb62dbb..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http - resources: - limits: - cpu: "4" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index de07b9bd8199..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index e2aeaf8700be..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,72 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 718c4d051e11d962879e2ae21662749b816d897dc692f1bc593557616e61cc21 - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg2 - - name: PGHOST - value: postgres.mycompany.org - - name: PGPASSWORD - value: mysecret - - name: PGPORT - value: "5433" - - name: PGSSLMODE - value: enable - - name: PGUSER - value: sg2 - - name: REDIS_CACHE_ENDPOINT - value: redis.mycompany.org:6379 - - name: REDIS_STORE_ENDPOINT - value: redis.mycompany.org:6379 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index 807f61cd2d44..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,82 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - - name: CONFIG_FILE_HASH - value: 718c4d051e11d962879e2ae21662749b816d897dc692f1bc593557616e61cc21 - - name: REDIS_CACHE_ENDPOINT - value: redis.mycompany.org:6379 - - name: REDIS_STORE_ENDPOINT - value: redis.mycompany.org:6379 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: LANGSERVER_HTML - value: tcp://1.2.3.4:1234 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - resources: - limits: - cpu: "1" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index 1f1b2f93661c..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 718c4d051e11d962879e2ae21662749b816d897dc692f1bc593557616e61cc21 - - name: DEPLOY_TYPE - value: datacenter - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - image: sourcegraph/query-runner:2.10.1 - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index fa0b74e48932..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 718c4d051e11d962879e2ae21662749b816d897dc692f1bc593557616e61cc21 - - name: REDIS_CACHE_ENDPOINT - value: redis.mycompany.org:6379 - - name: REDIS_STORE_ENDPOINT - value: redis.mycompany.org:6379 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index fb0d59743786..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 718c4d051e11d962879e2ae21662749b816d897dc692f1bc593557616e61cc21 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index cc0eb8e930db..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 718c4d051e11d962879e2ae21662749b816d897dc692f1bc593557616e61cc21 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: SYMBOLS_CACHE_SIZE_MB - value: "100000" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 464 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index bf1fcce0e603..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: sourcegraph/syntect_server:624a1a2 - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - securityContext: - runAsUser: 0 - volumes: diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/test-cases/custom-ls-address/generated/sourcegraph/templates/tls.Secret.yaml b/test-cases/custom-ls-address/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 65f658f3e77f..000000000000 --- a/test-cases/custom-ls-address/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: "" - key: "" -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/test-cases/custom-ls-address/values.yaml b/test-cases/custom-ls-address/values.yaml deleted file mode 100644 index d80e1c73ef5b..000000000000 --- a/test-cases/custom-ls-address/values.yaml +++ /dev/null @@ -1,17 +0,0 @@ -cluster: - storageClass: - create: none - postgreSQL: - user: sg2 - password: mysecret - database: sg2 - host: postgres.mycompany.org - port: 5433 - sslMode: enable - redis: - cache: redis.mycompany.org:6379 - store: redis.mycompany.org:6379 -site: - langservers: - - language: html - address: tcp://1.2.3.4:1234 diff --git a/test-cases/generate.sh b/test-cases/generate.sh deleted file mode 120000 index 408d20d8b93f..000000000000 --- a/test-cases/generate.sh +++ /dev/null @@ -1 +0,0 @@ -../examples/generate.sh \ No newline at end of file diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/backend.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/backend.Service.yaml deleted file mode 100644 index 1a7206083b03..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/backend.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/backend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - group: backend - deploy: sourcegraph - name: backend -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - group: backend - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/config-file.ConfigMap.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/config-file.ConfigMap.yaml deleted file mode 100644 index 9a5e794c1cab..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/config-file.ConfigMap.yaml +++ /dev/null @@ -1,25 +0,0 @@ -##--- -# Source: sourcegraph/templates/config-file.ConfigMap.yaml -apiVersion: v1 -data: - config.json: |- - { - "alertmanagerConfig": "# example\n# nothing\n", - "appURL": "http://localhost:3080", - "httpNodePort": 30080, - "langservers": [ - ], - "prometheus": { - "customRules": "src_xlang_request_duration_seconds_bucket:rate1d = sum by (le, mode, method)(rate(src_xlang_request_duration_seconds_bucket{success=\"true\"}[1d]))\n\n# Duration (5m)\ntask:src_http_request_duration_seconds_bucket:rate5m = rate(src_http_request_duration_seconds_bucket{job=~\"sourcegraph-.*\"}[5m])\nroute:src_http_request_duration_seconds_bucket:rate5m = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate5m)\njob:src_http_request_duration_seconds_bucket:rate5m = sum by (ns, le)(task:src_http_request_duration_seconds_bucket:rate5m)\nprod:src_http_request_duration_seconds_bucket:rate5m = sum by (le)(task:src_http_request_duration_seconds_bucket:rate5m)\n" - }, - "siteID": "123123123123", - "tlsCert": "-----BEGIN CERTIFICATE-----\nDUMMY\n-----END CERTIFICATE-----\n", - "tlsKey": "-----BEGIN PRIVATE KEY-----\nDUMMY\n-----END PRIVATE KEY-----\n", - "useAlertManager": true, - "useJaeger": true - } -kind: ConfigMap -metadata: - name: config-file - labels: - deploy: sourcegraph diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml deleted file mode 100644 index 82bf0d83ec67..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend-internal.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend-internal -spec: - ports: - - name: http-internal - port: 80 - targetPort: http-internal - selector: - app: sourcegraph-frontend - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml deleted file mode 100644 index d2ddc99eddfe..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml +++ /dev/null @@ -1,110 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Serves the frontend of Sourcegraph via HTTP(S). - labels: - deploy: sourcegraph - name: sourcegraph-frontend -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 2 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: sourcegraph-frontend - spec: - containers: - - args: - - serve - env: - - name: CONFIG_FILE_HASH - value: 2528a0893ab486460532ebc49de296b3ffc523807eca4a53c6735ac99d0857a0 - - name: DEPLOY_TYPE - value: datacenter - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: PUBLIC_REPO_REDIRECTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: TRACKING_APP_ID - value: "123123123123" - - name: TLS_CERT - valueFrom: - secretKeyRef: - key: cert - name: tls - - name: TLS_KEY - valueFrom: - secretKeyRef: - key: key - name: tls - image: sourcegraph/frontend:2.10.1 - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: frontend - ports: - - containerPort: 3080 - name: http - - containerPort: 3090 - name: http-internal - - containerPort: 3443 - name: https - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "2" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: sourcegraph/jaeger-agent - name: jaeger-agent - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - securityContext: - runAsUser: 0 - serviceAccountName: sourcegraph-frontend - volumes: - - configMap: - defaultMode: 384 - name: config-file - name: sg-config diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml deleted file mode 100644 index 888c9ca408cf..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Role.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - endpoints - verbs: - - get - - list - - watch diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml deleted file mode 100644 index 373b0187061a..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: Role - name: sourcegraph-frontend -subjects: -- kind: ServiceAccount - name: sourcegraph-frontend diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml deleted file mode 100644 index d66e805fb728..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: sourcegraph-frontend - deploy: sourcegraph - name: sourcegraph-frontend -spec: - ports: - - name: http - nodePort: 30080 - port: 30080 - targetPort: http - selector: - app: sourcegraph-frontend - type: NodePort diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml deleted file mode 100644 index 0d0f545309fa..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/frontend/sourcegraph-frontend.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: sourcegraph-frontend - labels: - deploy: sourcegraph diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml deleted file mode 100644 index 8617fbc2ed20..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml +++ /dev/null @@ -1,66 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Rate-limiting proxy for the GitHub API. - labels: - deploy: sourcegraph - name: github-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: github-proxy - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 2528a0893ab486460532ebc49de296b3ffc523807eca4a53c6735ac99d0857a0 - - name: LOG_REQUESTS - value: "true" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - image: sourcegraph/github-proxy:2.10.1 - name: github-proxy - ports: - - containerPort: 3180 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: sourcegraph/jaeger-agent - name: jaeger-agent - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 384 - name: config-file - name: sg-config diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml deleted file mode 100644 index 3d879f8a641e..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/github-proxy/github-proxy.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/github-proxy/github-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: github-proxy - deploy: sourcegraph - name: github-proxy -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: github-proxy - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver-ssh.Secret.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver-ssh.Secret.yaml deleted file mode 100644 index 19a4de311844..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver-ssh.Secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver-ssh.Secret.yaml - -apiVersion: v1 -data: - config: SG9zdCBteS5naXRyZXBvLmludGVybmFsCkZvcndhcmRBZ2VudCBubwpIb3N0TmFtZSBteS5naXRyZXBvLmludGVybmFsCiAgICBQb3J0IDIzMjMK - id_rsa: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlDV3dJQkFBS0JnR1hnYk9PRm83TTVGVFpya0pxV0hsRVE4Q1NoQkptK1pBVUhIMG5PT1lpRkZnY0dBYWRmCmF1OEtvR2ZpdTJqMlRDTko3ZVJSUkhpL3FHb08wdGphY01vN0R3VHZOcURFa3lMTzkxeDc4aGRHNWJVeFVLTjMKeTVPRVBXVGNYRlNiUDhyRFBMckI5SUNxQkNEbHZGTnVyMmQwT3pCR0IzNGFOWFFPUUVSdHJyZ3hBZ01CQUFFQwpnWUFvQ3k3QnY2VzRySmRKN0wzS0JYZWxKYU0rd291c1lzbXRzRDc4STdNNWxoWXliSW41MytlSVRnVCswSUFaCm9iWUxxT040K3ZpTy9jYVU2WDYyL2lXVzJNb2JVbXdDY1pMUG9EbWVjemw2VTJGMXM3ZXIybDJORzlncDQ3SUYKLzhneWp2VXBBUVkvS3JHeWNUdHdKZ1JnMlJGT3BwZ1kwVEZZMVo5QU84K09nUUpCQUtqeW5FV3FIVCtPTitGQQoxUElTbTRuMWtpMk1nam4yUmpwWEpua2c2bmtnUkVpc2RKSVRhcFZvV0hTRHFQcUl6NEdwTkxFWFl3OTZTY1FxCkkrSG9haThDUVFDYVhxeHU5alJieU0wcUN5SkljVkQvSUdKb0lBb3FWMHR5UEF6Um4zMzl1b2g1aUdkYm5RZWEKQVpOT0doOTN3MDR4cko1OEVOM2tKbzNDRGtjVEYwdWZBa0VBcEdDSWsyOVVUY1g5c0hmM3VCOUtuZ3dFVWJUbgo3NlVoNXhsc0lXWlpPOGlkSjJoRGN1elpRc3puWTFYR1R4eFZhUDVNZWhFYkhMQUtuWVd5cTlZSm1RSkFjRU43CnFYSzUzeW9vTW5SSWFXQ25ZL0w4UGZkWERUWFE4M0hDYk14Tnh6Rlp3UEMzSWdRUUhDc2JJb2lTNi9rSUs4MzYKc0FWZ0tXVDBZUFViTVVJV3h3SkFCcUR1bnlMc1BiMmdHU0lWaFgrM2loVG1rbEVJd1IxWjJPb1k1NzBwNm5PZQpOdW8wNFV0elZGRVpvQS9Sbkk3Z2FPVmNjM2ZmL2V6WUo5QXFnclpvbVE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= - id_rsa.pub: c3NoLXJzYSBNSUdlTUEwR0NTcUdTSWIzRFFFQkFRVUFBNEdNQURDQmlBS0JnR1hnYk9PRm83TTVGVFpya0pxV0hsRVE4Q1No - known_hosts: ZHVtbXlfdmFsdWUK -kind: Secret -metadata: - name: gitserver-ssh - labels: - deploy: sourcegraph -type: Opaque - diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml deleted file mode 100644 index c29edd81af4a..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver.Deployment.yaml +++ /dev/null @@ -1,89 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Stores clones of repositories to perform Git operations. - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: gitserver-1 - group: backend - type: gitserver - spec: - containers: - - args: - - run - env: - - name: CONFIG_FILE_HASH - value: 2528a0893ab486460532ebc49de296b3ffc523807eca4a53c6735ac99d0857a0 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_REPOS_DIR - value: /data/repos - image: sourcegraph/gitserver:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: rpc - timeoutSeconds: 5 - name: gitserver-1 - ports: - - containerPort: 3178 - name: rpc - resources: - limits: - cpu: "4" - memory: "8G" - requests: - cpu: "500m" - memory: "1G" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /data/repos - name: repos - - mountPath: /root/.ssh - name: ssh - - - command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: sourcegraph/jaeger-agent - name: jaeger-agent - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 384 - name: config-file - name: sg-config - - name: repos - persistentVolumeClaim: - claimName: gitserver-1 - - name: ssh - secret: - defaultMode: 384 - secretName: gitserver-ssh - - diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml deleted file mode 100644 index e517ac1915e3..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: gitserver-1 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi - diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml deleted file mode 100644 index 419b98782556..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/gitserver/gitserver.Service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -##--- -# Source: sourcegraph/templates/gitserver/gitserver.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - type: gitserver - deploy: sourcegraph - name: gitserver -spec: - clusterIP: None - ports: - - name: unused - port: 10811 - targetPort: 10811 - selector: - type: gitserver - type: ClusterIP ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - deploy: sourcegraph - app: gitserver-1 - name: gitserver-1 -spec: - ports: - - name: rpc - port: 3178 - targetPort: rpc - selector: - app: gitserver-1 - type: ClusterIP - diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml deleted file mode 100644 index f66a1cb62dbb..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml +++ /dev/null @@ -1,86 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for indexed text search operations. - labels: - deploy: sourcegraph - name: indexed-search -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: indexed-search - spec: - containers: - - args: - - zoekt-webserver - - -index - - /data/index - - -pprof - - -rpc - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-webserver - ports: - - containerPort: 6070 - name: http - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - - args: - - zoekt-sourcegraph-indexserver - - -index - - /data/index - - -sourcegraph_url - - http://sourcegraph-frontend-internal - - -listen - - :6072 - - -interval - - 1m - - -cpu_fraction - - "1.0" - image: sourcegraph/zoekt:18-05-30_3d2275e - name: zoekt-indexserver - ports: - - containerPort: 6072 - name: index-http - resources: - limits: - cpu: "4" - memory: "4G" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /data - name: disk - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: indexed-search diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml deleted file mode 100644 index de07b9bd8199..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: indexed-search -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml deleted file mode 100644 index cf83c04e42a3..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/indexed-search/indexed-search.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexed-search/indexed-search.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: indexed-search - deploy: sourcegraph - name: indexed-search -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: indexed-search - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml deleted file mode 100644 index 640f54455ae0..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/indexer/indexer.Deployment.yaml +++ /dev/null @@ -1,78 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Asynchronous indexing for global references. - labels: - deploy: sourcegraph - name: indexer -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: indexer - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 2528a0893ab486460532ebc49de296b3ffc523807eca4a53c6735ac99d0857a0 - - name: LSP_PROXY - value: lsp-proxy:4388 - - name: PGDATABASE - value: sg - - name: PGHOST - value: pgsql - - name: PGPORT - value: "5432" - - name: PGSSLMODE - value: disable - - name: PGUSER - value: sg - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/indexer:2.10.1 - name: indexer - ports: - - containerPort: 3179 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 100m - memory: 250M - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: sourcegraph/jaeger-agent - name: jaeger-agent - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 384 - name: config-file - name: sg-config diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/indexer/indexer.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/indexer/indexer.Service.yaml deleted file mode 100644 index b9525edff90d..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/indexer/indexer.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/indexer/indexer.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: indexer - deploy: sourcegraph - name: indexer -spec: - ports: - - name: http - port: 3179 - targetPort: http - selector: - app: indexer - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/jaeger/jaeger-cassandra.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/jaeger/jaeger-cassandra.Service.yaml deleted file mode 100644 index 387d78c6e8b9..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/jaeger/jaeger-cassandra.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/jaeger/jaeger-cassandra.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: jaeger-cassandra - deploy: sourcegraph - name: jaeger-cassandra -spec: - ports: - - name: cql - port: 9042 - targetPort: cql - selector: - app: jaeger-cassandra - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/jaeger/jaeger-collector.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/jaeger/jaeger-collector.Service.yaml deleted file mode 100644 index 11f8cc1111b9..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/jaeger/jaeger-collector.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/jaeger/jaeger-collector.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: jaeger-collector - deploy: sourcegraph - name: jaeger-collector -spec: - ports: - - name: jaeger-thrift - port: 14267 - targetPort: jaeger-thrift - selector: - app: jaeger-collector - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/jaeger/jaeger-query.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/jaeger/jaeger-query.Service.yaml deleted file mode 100644 index 54db5a7a5afa..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/jaeger/jaeger-query.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/jaeger/jaeger-query.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: jaeger-query - deploy: sourcegraph - name: jaeger-query -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: jaeger-query - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml deleted file mode 100644 index 3a47efc8d6c8..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml +++ /dev/null @@ -1,88 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Multiplexer between frontend and LSP servers. - labels: - deploy: sourcegraph - name: lsp-proxy -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: lsp-proxy - spec: - containers: - - args: - - -addr=:4388 - env: - - name: CONFIG_FILE_HASH - value: 2528a0893ab486460532ebc49de296b3ffc523807eca4a53c6735ac99d0857a0 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/lsp-proxy:2.10.1 - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: lsp - timeoutSeconds: 5 - name: lsp-proxy - ports: - - containerPort: 4388 - name: lsp - - containerPort: 6060 - name: debug - readinessProbe: - tcpSocket: - port: 4388 - resources: - limits: - cpu: "1" - memory: "8Gi" - requests: - cpu: "500m" - memory: "2Gi" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - - command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: sourcegraph/jaeger-agent - name: jaeger-agent - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 384 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml deleted file mode 100644 index c9d3985852ea..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/lsp-proxy/lsp-proxy.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: lsp-proxy - deploy: sourcegraph - name: lsp-proxy -spec: - ports: - - name: debug - port: 6060 - targetPort: debug - - name: lsp - port: 4388 - targetPort: lsp - selector: - app: lsp-proxy - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml deleted file mode 100644 index 00c91f08b799..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/pgsql/pgsql.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Postgres database for various data. - labels: - deploy: sourcegraph - name: pgsql -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: pgsql - group: backend - spec: - containers: - - env: - - name: PGDATA - value: /data/pgdata - - name: POSTGRES_USER - value: sg - image: sourcegraph/postgres:9.4 - livenessProbe: - initialDelaySeconds: 15 - tcpSocket: - port: 5432 - name: pgsql - ports: - - containerPort: 5432 - name: pgsql - resources: - limits: - cpu: "4" - memory: 2Gi - requests: - cpu: 250m - memory: 1G - volumeMounts: - - mountPath: /data - name: disk - - env: - - name: DATA_SOURCE_NAME - value: postgres://sg:@localhost:5432/?sslmode=disable - image: sourcegraph/pgsql-exporter:a294a9b6d83c139d3e1217f02c8f80a54cbf73ac - name: pgsql-exporter - resources: - limits: - cpu: 10m - memory: 50Mi - requests: - cpu: 10m - memory: 50Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: disk - persistentVolumeClaim: - claimName: pgsql diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml deleted file mode 100644 index 095a470d4c17..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: pgsql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml deleted file mode 100644 index bb9eac0e653e..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/pgsql/pgsql.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/pgsql/pgsql.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9113" - prometheus.io/scrape: "true" - labels: - app: pgsql - deploy: sourcegraph - name: pgsql -spec: - ports: - - name: pgsql - port: 5432 - targetPort: pgsql - selector: - app: pgsql - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml deleted file mode 100644 index 15cfcf066ad4..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml +++ /dev/null @@ -1,13 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/alertmanager/alertmanager.ConfigMap.yaml -apiVersion: v1 -data: - config.yml: | - # example - # nothing - -kind: ConfigMap -metadata: - name: alertmanager - labels: - deploy: sourcegraph \ No newline at end of file diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Service.yaml deleted file mode 100644 index 55d4425a9861..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/alertmanager/alertmanager.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/alertmanager/alertmanager.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: alertmanager - deploy: sourcegraph - name: alertmanager -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: alertmanager - type: ClusterIP \ No newline at end of file diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml deleted file mode 100644 index 6c0b87076ceb..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml +++ /dev/null @@ -1,18 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus-node-port.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: prometheus - deploy: sourcegraph - name: prometheus-node-port -spec: - ports: - - name: http - nodePort: 30010 - port: 30010 - targetPort: http - selector: - app: prometheus - type: NodePort diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml deleted file mode 100644 index d46bfd3d0b2e..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml +++ /dev/null @@ -1,30 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ClusterRole.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: prometheus - labels: - deploy: sourcegraph -rules: -- apiGroups: - - "" - resources: - - nodes - - services - - endpoints - - pods - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get -- nonResourceURLs: - - /metrics - verbs: - - get diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml deleted file mode 100644 index 496481e91e3d..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ClusterRoleBinding.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: 'default-prometheus' - labels: - deploy: sourcegraph -roleRef: - apiGroup: "" - kind: ClusterRole - name: prometheus -subjects: -- kind: ServiceAccount - name: prometheus - namespace: 'default' diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml deleted file mode 100644 index 6894969b2751..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml +++ /dev/null @@ -1,488 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ConfigMap.yaml -apiVersion: v1 -data: - alert.rules: | - ALERT PodsMissing - IF app:up:ratio{app!=""} < 0.9 - FOR 10m - LABELS { severity="page" } - ANNOTATIONS { - summary = "Pods missing from {{ $labels.app }}", - description = "Pods missing from {{ $labels.app }}: {{ $value }}", - help = "Alerts when pods are missing.", - } - - ALERT NoPodsRunning - IF app:up:ratio{app!=""} < 0.1 - FOR 2m - LABELS { severity="page" } - ANNOTATIONS { - summary = "No pods are running for {{ $labels.app }}", - description = "No pods are running for {{ $labels.app }}: {{ $value }}", - help = "Alerts when no pods are running for a service.", - } - - ALERT ProdPageLoadLatency - IF histogram_quantile(0.9, sum(rate(src_http_request_duration_seconds_bucket{job="sourcegraph-frontend",route!="xlang",route!="lsp"}[10m])) by (le)) > 20 - LABELS { severity="page" } - ANNOTATIONS { - summary = "High page load latency", - description = "Page load latency > 20s (90th percentile over all routes; current value: {{$value}}s)", - help = "Alerts when the page load latency is too high.", - } - - ALERT GoroutineLeak - IF go_goroutines >= 10000 - FOR 10m - ANNOTATIONS { - summary = "Excessive number of goroutines", - description = "{{ $labels.app }} has more than 10k goroutines. This is probably a regression causing a goroutine leak", - help = "Alerts when a service has excessive running goroutines.", - } - - ALERT FSINodesRemainingLow - IF sum by (instance) (container_fs_inodes_total{pod_name!=""}) > 3000000 - LABELS { severity = "page" } - ANNOTATIONS { - summary = "{{$labels.instance}} remaining fs inodes is low", - description = "{{$labels.instance}} is using {{humanize $value}} inodes", - help = "Alerts when a node's remaining FS inodes are low.", - } - - ALERT DiskSpaceLow - IF node:k8snode_filesystem_avail_bytes:ratio < 0.10 - ANNOTATIONS { - summary = "{{$labels.exported_name}} has less than 10% available disk space", - help = "Alerts when a node has less than 10% available disk space.", - } - - ALERT DiskSpaceLowCritical - IF node:k8snode_filesystem_avail_bytes:ratio{exported_name=~".*prod.*"} < 0.05 - LABELS { severity="page" } - ANNOTATIONS { - summary = "Critical! {{$labels.exported_name}} has less than 5% available disk space", - help = "Alerts when a node has less than 5% available disk space.", - } - - ALERT SearcherErrorRatioTooHigh - IF searcher_errors:ratio10m > 0.1 - FOR 20m - ANNOTATIONS { - summary = "Error ratio exceeds 10%", - help = "Alerts when the search service has more than 10% of requests failing.", - } - - # TODO(sqs): enable this after we have tested it in prod, to avoid needless alerts - # - # ALERT SymbolsErrorRatioTooHigh - # IF symbols_errors:ratio10m > 0.1 - # FOR 20m - # ANNOTATIONS { - # summary = "Error ratio exceeds 10%", - # help = "Alerts when the symbols service has more than 10% of requests failing.", - # } - - # NOTE(beyang): this should no longer be part of the default metrics, because not all DC instances have Go code intelligence - # - # ALERT XLangAbsent - # IF absent(prod:xlang_requests:rate5m{mode="go"}) - # FOR 1m - # LABELS { severity="page" } - # ANNOTATIONS { - # summary = "{{ $labels.mode }} is not running", - # help = "Alerts when the Go language server is not running.", - # readme = "enterprise", - # } - - # http_response_size_bytes is measured at the Prometheus clients, not at the server. - ALERT PrometheusMetricsBloat - IF http_response_size_bytes{handler="prometheus", quantile="0.5", job!="kubernetes-nodes", job!="kubernetes-apiservers"} > 20000 - ANNOTATIONS { - summary = "{{$labels.job}} in {{$labels.ns}} is probably leaking metrics (unbounded attribute)", - help = "Alerts when a service is probably leaking metrics (unbounded attribute).", - } - - - apdex.rules: |+ - # Generated with apdex.py - # Do not manually edit - - # Rate 15m - prod:src_xlang_request_duration_seconds:apdex_02_08_rate15m = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.2",success="true"}[15m])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.8",success="true"}[15m])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[15m])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_1_5_rate15m = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="1",success="true"}[15m])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="5",success="true"}[15m])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[15m])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_2_10_rate15m = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="2",success="true"}[15m])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[15m])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[15m])) by (mode, method) - - - # Rate 1h - prod:src_xlang_request_duration_seconds:apdex_02_08_rate1h = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.2",success="true"}[1h])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.8",success="true"}[1h])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1h])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_1_5_rate1h = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="1",success="true"}[1h])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="5",success="true"}[1h])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1h])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_2_10_rate1h = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="2",success="true"}[1h])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[1h])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1h])) by (mode, method) - - - # Rate 1d - prod:src_xlang_request_duration_seconds:apdex_02_08_rate1d = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.2",success="true"}[1d])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="0.8",success="true"}[1d])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_1_5_rate1d = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="1",success="true"}[1d])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="5",success="true"}[1d])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) - - prod:src_xlang_request_duration_seconds:apdex_2_10_rate1d = - ( - sum(rate(src_xlang_request_duration_seconds_bucket{le="2",success="true"}[1d])) by (mode, method) - + - sum(rate(src_xlang_request_duration_seconds_bucket{le="10",success="true"}[1d])) by (mode, method) - ) / 2 / sum(rate(src_xlang_request_duration_seconds_count[1d])) by (mode, method) - extra.rules: | - src_xlang_request_duration_seconds_bucket:rate1d = sum by (le, mode, method)(rate(src_xlang_request_duration_seconds_bucket{success="true"}[1d])) - - # Duration (5m) - task:src_http_request_duration_seconds_bucket:rate5m = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[5m]) - route:src_http_request_duration_seconds_bucket:rate5m = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - job:src_http_request_duration_seconds_bucket:rate5m = sum by (ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - prod:src_http_request_duration_seconds_bucket:rate5m = sum by (le)(task:src_http_request_duration_seconds_bucket:rate5m) - - - node.rules: | - node:container_cpu_usage_seconds_total:ratio_rate5m = - sum by (instance) (rate(container_cpu_usage_seconds_total{kubernetes_pod_name=""}[5m])) - / - max by (instance) (machine_cpu_cores) - - task:container_memory_usage_bytes:max = max by (namespace, container_name)(container_memory_usage_bytes{container_name!=""}) - task:container_cpu_usage_seconds_total:sum = sum by (id, namespace, container_name) (irate(container_cpu_usage_seconds_total{container_name!=""}[1m])) - - node:k8snode_filesystem_avail_bytes:ratio = - min by (exported_name) (k8snode_filesystem_avail_bytes / k8snode_filesystem_size_bytes) - prometheus.yml: | - --- - - global: - scrape_interval: 30s - evaluation_interval: 30s - - rule_files: - - 'node.rules' - - 'sourcegraph.rules' - - 'xlang.rules' - - 'apdex.rules' - - 'searcher.rules' - - 'symbols.rules' - - 'alert.rules' - - 'extra.rules' - - # A scrape configuration for running Prometheus on a Kubernetes cluster. - # This uses separate scrape configs for cluster components (i.e. API server, node) - # and services to allow each to use different authentication configs. - # - # Kubernetes labels will be added as Prometheus labels on metrics via the - # `labelmap` relabeling action. - - # Scrape config for API servers. - # - # Kubernetes exposes API servers as endpoints to the default/kubernetes - # service so this uses `endpoints` role and uses relabelling to only keep - # the endpoints associated with the default/kubernetes service using the - # default named port `https`. This works for single API server deployments as - # well as HA API server deployments. - scrape_configs: - - job_name: 'kubernetes-apiservers' - - kubernetes_sd_configs: - - role: endpoints - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - # insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - # Keep only the default/kubernetes service endpoints for the https port. This - # will add targets for each API server which Kubernetes adds an endpoint to - # the default/kubernetes service. - relabel_configs: - - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: default;kubernetes;https - - - job_name: 'kubernetes-nodes' - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - kubernetes_sd_configs: - - role: node - - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/${1}/proxy/metrics - - # Scrape config for service endpoints. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/scrape`: Only scrape services that have a value of `true` - # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need - # to set this to `https` & most likely set the `tls_config` of the scrape config. - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: If the metrics are exposed on a different port to the - # service then set this appropriately. - - job_name: 'kubernetes-service-endpoints' - - kubernetes_sd_configs: - - role: endpoints - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - action: replace - target_label: __address__ - regex: (.+)(?::\d+);(\d+) - replacement: $1:$2 - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - # Sourcegraph specific customization. We want a more convenient to type label. - # target_label: kubernetes_namespace - target_label: ns - - source_labels: [__meta_kubernetes_service_name] - action: replace - target_label: kubernetes_name - # Sourcegraph specific customization. We want a nicer name for job - - source_labels: [app] - action: replace - target_label: job - # Sourcegraph specific customization. We want a nicer name for instance - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: instance - - # Example scrape config for probing services via the Blackbox Exporter. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/probe`: Only probe services that have a value of `true` - - job_name: 'kubernetes-services' - - metrics_path: /probe - params: - module: [http_2xx] - - kubernetes_sd_configs: - - role: service - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe] - action: keep - regex: true - - source_labels: [__address__] - target_label: __param_target - - target_label: __address__ - replacement: blackbox - - source_labels: [__param_target] - target_label: instance - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_service_namespace] - # Sourcegraph specific customization. We want a more convenient to type label. - # target_label: kubernetes_namespace - target_label: ns - - source_labels: [__meta_kubernetes_service_name] - target_label: kubernetes_name - - # Example scrape config for pods - # - # The relabeling allows the actual pod scrape endpoint to be configured via the - # following annotations: - # - # * `prometheus.io/scrape`: Only scrape pods that have a value of `true` - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`. - - job_name: 'kubernetes-pods' - - kubernetes_sd_configs: - - role: pod - - relabel_configs: - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: (.+):(?:\d+);(\d+) - replacement: ${1}:${2} - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - # Sourcegraph specific customization. We want a more convenient to type label. - # target_label: kubernetes_namespace - target_label: ns - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: kubernetes_pod_name - searcher.rules: | - ########## - # Errors # - ########## - - searcher_requests:rate10m = sum by (instance)(rate(searcher_service_request_total[10m])) - searcher_errors:rate10m = sum by (instance)(rate(searcher_service_request_total{code!="200",code!="canceled"}[10m])) - searcher_errors:ratio10m = sum(searcher_errors:rate10m) / sum(searcher_requests:rate10m) - sourcegraph.rules: | - # This files contains recording rules targeted at the sourcegraph-frontend app - - # Duration (5m) - task:src_http_request_duration_seconds_bucket:rate5m = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[5m]) - route:src_http_request_duration_seconds_bucket:rate5m = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - job:src_http_request_duration_seconds_bucket:rate5m = sum by (ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - prod:src_http_request_duration_seconds_bucket:rate5m = sum by (le)(task:src_http_request_duration_seconds_bucket:rate5m) - - # Counts (5m) - task:src_http_request_count:rate5m = rate(src_http_request_duration_seconds_count{job=~"sourcegraph-.*"}[5m]) - route:src_http_request_count:rate5m = sum by (route, code, ns)(task:src_http_request_count:rate5m) - job:src_http_request_count:rate5m = sum by (code, ns)(task:src_http_request_count:rate5m) - prod:src_http_request_count:rate5m = sum by (code)(task:src_http_request_count:rate5m) - - # Duration (30m) - task:src_http_request_duration_seconds_bucket:rate30m = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[30m]) - route:src_http_request_duration_seconds_bucket:rate30m = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate30m) - job:src_http_request_duration_seconds_bucket:rate30m = sum by (ns, le)(task:src_http_request_duration_seconds_bucket:rate30m) - prod:src_http_request_duration_seconds_bucket:rate30m = sum by (le)(task:src_http_request_duration_seconds_bucket:rate30m) - - # Counts (30m) - task:src_http_request_count:rate30m = rate(src_http_request_duration_seconds_count{job=~"sourcegraph-.*"}[30m]) - route:src_http_request_count:rate30m = sum by (route, code, ns)(task:src_http_request_count:rate30m) - job:src_http_request_count:rate30m = sum by (code, ns)(task:src_http_request_count:rate30m) - prod:src_http_request_count:rate30m = sum by (code)(task:src_http_request_count:rate30m) - - - # Perf targets are over a day - prod:src_http_request_duration_seconds_bucket:rate1d = sum by (route, le)(rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[1d])) - - - # Measure uptime of services - app:up:sum = sum by (app)(up) - app:up:count = count by (app)(up) - app:up:ratio = - app:up:sum - / on (app) - app:up:count - symbols.rules: | - ########## - # Errors # - ########## - - symbols_requests:rate10m = sum by (instance)(rate(symbols_service_request_total[10m])) - symbols_errors:rate10m = sum by (instance)(rate(symbols_service_request_total{code!="200",code!="canceled"}[10m])) - symbols_errors:ratio10m = sum(symbols_errors:rate10m) / sum(symbols_requests:rate10m) - xlang.rules: | - prod:xlang_requests:rate5m = sum by (mode)(rate(src_xlang_request_duration_seconds_count[5m])) - prod:xlang_errors:rate5m = sum by (mode)(rate(src_xlang_request_duration_seconds_count{success="false"}[5m])) - prod:xlang_errors:ratio5m = prod:xlang_errors:rate5m / prod:xlang_requests:rate5m - prod:src_xlang_request_duration_seconds_bucket:rate1d = - sum by (le, mode, method)(rate(src_xlang_request_duration_seconds_bucket{success="true"}[1d])) -kind: ConfigMap -metadata: - name: prometheus - labels: - deploy: sourcegraph diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.Deployment.yaml deleted file mode 100644 index d942d6f26f96..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Collects metrics and aggregates them into graphs. - labels: - deploy: sourcegraph - name: prometheus -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: prometheus - spec: - containers: - - args: - - -config.file=/etc/prometheus/prometheus.yml - - -storage.local.path=/prometheus/data - - -web.console.libraries=/etc/prometheus/console_libraries - - -web.console.templates=/etc/prometheus/consoles - - -web.external-url= - - -alertmanager.url=http://alertmanager - image: sourcegraph/prometheus:v1.4.1 - name: prometheus - ports: - - containerPort: 9090 - name: http - resources: - limits: - cpu: "4" - memory: 8Gi - requests: - cpu: 500m - memory: 2Gi - volumeMounts: - - mountPath: /prometheus - name: data - - mountPath: /etc/prometheus - name: config - - args: - - --volume-dir=/etc/prometheus - - --webhook-url=http://localhost:9090/-/reload - image: sourcegraph/configmap-reload:v0.1 - name: configmap-reload - resources: - limits: - cpu: 10m - memory: 10Mi - requests: - cpu: 10m - memory: 10Mi - volumeMounts: - - mountPath: /etc/prometheus - name: config - readOnly: true - securityContext: - runAsUser: 0 - serviceAccountName: prometheus - volumes: - - name: data - persistentVolumeClaim: - claimName: prometheus - - configMap: - defaultMode: 384 - name: prometheus - name: config diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml deleted file mode 100644 index eb0f3426e9e6..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: prometheus -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.Service.yaml deleted file mode 100644 index a27e429c877c..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: prometheus - deploy: sourcegraph - name: prometheus -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: prometheus - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml deleted file mode 100644 index 6d6328ef133b..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml +++ /dev/null @@ -1,10 +0,0 @@ -##--- -# Source: sourcegraph/templates/prometheus/prometheus.ServiceAccount.yaml -apiVersion: v1 -imagePullSecrets: -- name: docker-registry -kind: ServiceAccount -metadata: - name: prometheus - labels: - deploy: sourcegraph diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml deleted file mode 100644 index 107fd4bd25f3..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/query-runner/query-runner.Deployment.yaml +++ /dev/null @@ -1,72 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Deployment.yaml - - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Saved search query runner / notification service. - labels: - deploy: sourcegraph - name: query-runner -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: query-runner - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 2528a0893ab486460532ebc49de296b3ffc523807eca4a53c6735ac99d0857a0 - - name: DEPLOY_TYPE - value: datacenter - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_APP_URL - value: http://localhost:3080 - - name: TRACKING_APP_ID - value: "123123123123" - image: sourcegraph/query-runner:2.10.1 - name: query-runner - ports: - - containerPort: 3183 - name: http - resources: - limits: - cpu: "1" - memory: 1G - requests: - cpu: 500m - memory: 1G - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: sourcegraph/jaeger-agent - name: jaeger-agent - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 384 - name: config-file - name: sg-config diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml deleted file mode 100644 index b0f8df158e56..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/query-runner/query-runner.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/query-runner/query-runner.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: query-runner - deploy: sourcegraph - name: query-runner -spec: - ports: - - name: http - port: 80 - targetPort: http - selector: - app: query-runner - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml deleted file mode 100644 index d2899ab68ade..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.ConfigMap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, discard unused keys when hitting limit - maxmemory 5gb - maxmemory-policy allkeys-lru - - # snapshots on disk every minute - dir /redis-data/ - save 60 1 -kind: ConfigMap -metadata: - name: redis-cache - labels: - deploy: sourcegraph diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml deleted file mode 100644 index 7db56c45089d..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing short-lived caches. - labels: - deploy: sourcegraph - name: redis-cache -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-cache - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-cache - - configMap: - name: redis-cache - name: config diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml deleted file mode 100644 index c100d569a89a..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-cache -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.Service.yaml deleted file mode 100644 index 0634270075e8..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-cache.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-cache.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-cache - deploy: sourcegraph - name: redis-cache -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-cache - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml deleted file mode 100644 index 8664390e22de..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.ConfigMap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.ConfigMap.yaml -apiVersion: v1 -data: - redis.conf: | - # allow access from all instances - protected-mode no - - # limit memory usage, return error when hitting limit - maxmemory 5gb - maxmemory-policy noeviction - - # live commit log to disk, additionally snapshots every 10 minutes - dir /redis-data/ - appendonly yes - save 600 1 -kind: ConfigMap -metadata: - name: redis-store - labels: - deploy: sourcegraph diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml deleted file mode 100644 index 75cd48196f1d..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.Deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Redis for storing semi-persistent data like user sessions. - labels: - deploy: sourcegraph - name: redis-store -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: redis-store - spec: - containers: - - command: - - redis-server - - /etc/redis/redis.conf - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - name: redis - ports: - - containerPort: 6379 - name: redis - livenessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 30 - readinessProbe: - tcpSocket: - port: redis - initialDelaySeconds: 5 - resources: - limits: - cpu: "1" - memory: 6Gi - requests: - cpu: 250m - memory: 500M - volumeMounts: - - mountPath: /redis-data - name: redis-data - - mountPath: /etc/redis - name: config - readOnly: true - - image: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - name: redis-exporter - ports: - - containerPort: 9121 - name: redisexp - resources: - limits: - cpu: 10m - memory: 100Mi - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - securityContext: - runAsUser: 0 - volumes: - - name: redis-data - persistentVolumeClaim: - claimName: redis-store - - configMap: - name: redis-store - name: config diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml deleted file mode 100644 index ae604b0d12f1..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml +++ /dev/null @@ -1,16 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.PersistentVolumeClaim.yaml -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - volume.beta.kubernetes.io/storage-class: default - labels: - deploy: sourcegraph - name: redis-store -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Gi diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.Service.yaml deleted file mode 100644 index 7fa5bd6e6a9e..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/redis/redis-store.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/redis/redis-store.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9121" - prometheus.io/scrape: "true" - labels: - app: redis-store - deploy: sourcegraph - name: redis-store -spec: - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis-store - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index a595db469686..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - deploy: sourcegraph - name: repo-updater -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: repo-updater - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 2528a0893ab486460532ebc49de296b3ffc523807eca4a53c6735ac99d0857a0 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - image: sourcegraph/repo-updater:2.10.1 - name: repo-updater - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: sourcegraph/jaeger-agent - name: jaeger-agent - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 384 - name: config-file - name: sg-config diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index fe9f174c924f..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -##--- -# Source: sourcegraph/templates/repo-updater/repo-updater.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: repo-updater - deploy: sourcegraph - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - app: repo-updater - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml deleted file mode 100644 index e69f58358918..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/searcher/searcher.Deployment.yaml +++ /dev/null @@ -1,87 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for text search operations. - labels: - deploy: sourcegraph - name: searcher -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: searcher - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 2528a0893ab486460532ebc49de296b3ffc523807eca4a53c6735ac99d0857a0 - - name: SEARCHER_CACHE_SIZE_MB - value: "100000" - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/searcher:2.10.1 - name: searcher - ports: - - containerPort: 3181 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 1 - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 1 - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - - command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: sourcegraph/jaeger-agent - name: jaeger-agent - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 384 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/searcher/searcher.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/searcher/searcher.Service.yaml deleted file mode 100644 index 3e022747bc86..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/searcher/searcher.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/searcher/searcher.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: searcher - deploy: sourcegraph - name: searcher -spec: - ports: - - name: http - port: 3181 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: searcher - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml deleted file mode 100644 index 3cf280bc31d3..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/symbols/symbols.Deployment.yaml +++ /dev/null @@ -1,80 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for symbols operations. - labels: - deploy: sourcegraph - name: symbols -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - app: symbols - spec: - containers: - - env: - - name: CONFIG_FILE_HASH - value: 2528a0893ab486460532ebc49de296b3ffc523807eca4a53c6735ac99d0857a0 - - name: SOURCEGRAPH_CONFIG_FILE - value: /etc/sourcegraph/config.json - - name: SRC_GIT_SERVERS - value: gitserver-1:3178 - - name: SYMBOLS_CACHE_SIZE_MB - value: "100000" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - image: sourcegraph/symbols:2.10.1 - name: symbols - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - resources: - limits: - cpu: "2" - memory: "2G" - requests: - cpu: "500m" - memory: "500M" - volumeMounts: - - mountPath: /etc/sourcegraph - name: sg-config - - mountPath: /mnt/cache - name: cache-ssd - - command: - - /go/bin/agent-linux - - --collector.host-port=jaeger-collector:14267 - image: sourcegraph/jaeger-agent - name: jaeger-agent - resources: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - securityContext: - runAsUser: 0 - volumes: - - configMap: - defaultMode: 384 - name: config-file - name: sg-config - - emptyDir: {} - name: cache-ssd diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/symbols/symbols.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/symbols/symbols.Service.yaml deleted file mode 100644 index db8f13d027d8..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/symbols/symbols.Service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -##--- -# Source: sourcegraph/templates/symbols/symbols.Service.yaml -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - prometheus.io/scrape: "true" - labels: - app: symbols - deploy: sourcegraph - name: symbols -spec: - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml deleted file mode 100644 index bf1fcce0e603..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml +++ /dev/null @@ -1,56 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - description: Backend for syntax highlighting operations. - labels: - deploy: sourcegraph - name: syntect-server -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: 10 - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - labels: - app: syntect-server - spec: - containers: - - env: - - name: ROCKET_LIMITS - value: '{json=10485760}' - - name: ROCKET_PORT - value: "9238" - image: sourcegraph/syntect_server:624a1a2 - livenessProbe: - httpGet: - path: /health - port: http - scheme: HTTP - initialDelaySeconds: 5 - timeoutSeconds: 5 - name: syntect-server - ports: - - containerPort: 9238 - name: http - readinessProbe: - tcpSocket: - port: http - resources: - limits: - cpu: "4" - memory: 512M - requests: - cpu: 250m - memory: 512M - volumeMounts: - securityContext: - runAsUser: 0 - volumes: diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml deleted file mode 100644 index 632aa302c033..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/syntect-server/syntect-server.Service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -##--- -# Source: sourcegraph/templates/syntect-server/syntect-server.Service.yaml -apiVersion: v1 -kind: Service -metadata: - labels: - app: syntect-server - deploy: sourcegraph - name: syntect-server -spec: - ports: - - name: http - port: 9238 - targetPort: http - selector: - app: syntect-server - type: ClusterIP diff --git a/test-cases/with-jaeger/generated/sourcegraph/templates/tls.Secret.yaml b/test-cases/with-jaeger/generated/sourcegraph/templates/tls.Secret.yaml deleted file mode 100644 index 8fd92022b13e..000000000000 --- a/test-cases/with-jaeger/generated/sourcegraph/templates/tls.Secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -##--- -# Source: sourcegraph/templates/tls.Secret.yaml -apiVersion: v1 -data: - cert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCkRVTU1ZCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K - key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCkRVTU1ZCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K -kind: Secret -metadata: - name: tls - labels: - deploy: sourcegraph -type: Opaque diff --git a/test-cases/with-jaeger/values.yaml b/test-cases/with-jaeger/values.yaml deleted file mode 100644 index 6cb9933c8d4c..000000000000 --- a/test-cases/with-jaeger/values.yaml +++ /dev/null @@ -1,55 +0,0 @@ -cluster: - storageClass: - create: none - configVolume: - defaultMode: 0600 - gitserver: - ssh: - config: | - Host my.gitrepo.internal - ForwardAgent no - HostName my.gitrepo.internal - Port 2323 - id_rsa: | - -----BEGIN RSA PRIVATE KEY----- - MIICWwIBAAKBgGXgbOOFo7M5FTZrkJqWHlEQ8CShBJm+ZAUHH0nOOYiFFgcGAadf - au8KoGfiu2j2TCNJ7eRRRHi/qGoO0tjacMo7DwTvNqDEkyLO91x78hdG5bUxUKN3 - y5OEPWTcXFSbP8rDPLrB9ICqBCDlvFNur2d0OzBGB34aNXQOQERtrrgxAgMBAAEC - gYAoCy7Bv6W4rJdJ7L3KBXelJaM+wousYsmtsD78I7M5lhYybIn53+eITgT+0IAZ - obYLqON4+viO/caU6X62/iWW2MobUmwCcZLPoDmeczl6U2F1s7er2l2NG9gp47IF - /8gyjvUpAQY/KrGycTtwJgRg2RFOppgY0TFY1Z9AO8+OgQJBAKjynEWqHT+ON+FA - 1PISm4n1ki2Mgjn2RjpXJnkg6nkgREisdJITapVoWHSDqPqIz4GpNLEXYw96ScQq - I+Hoai8CQQCaXqxu9jRbyM0qCyJIcVD/IGJoIAoqV0tyPAzRn339uoh5iGdbnQea - AZNOGh93w04xrJ58EN3kJo3CDkcTF0ufAkEApGCIk29UTcX9sHf3uB9KngwEUbTn - 76Uh5xlsIWZZO8idJ2hDcuzZQsznY1XGTxxVaP5MehEbHLAKnYWyq9YJmQJAcEN7 - qXK53yooMnRIaWCnY/L8PfdXDTXQ83HCbMxNxzFZwPC3IgQQHCsbIoiS6/kIK836 - sAVgKWT0YPUbMUIWxwJABqDunyLsPb2gGSIVhX+3ihTmklEIwR1Z2OoY570p6nOe - Nuo04UtzVFEZoA/RnI7gaOVcc3ff/ezYJ9AqgrZomQ== - -----END RSA PRIVATE KEY----- - id_rsa.pub: ssh-rsa MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgGXgbOOFo7M5FTZrkJqWHlEQ8CSh - known_hosts: | - dummy_value -site: - useJaeger: true - siteID: "123123123123" - prometheus: - customRules: | - src_xlang_request_duration_seconds_bucket:rate1d = sum by (le, mode, method)(rate(src_xlang_request_duration_seconds_bucket{success="true"}[1d])) - - # Duration (5m) - task:src_http_request_duration_seconds_bucket:rate5m = rate(src_http_request_duration_seconds_bucket{job=~"sourcegraph-.*"}[5m]) - route:src_http_request_duration_seconds_bucket:rate5m = sum by (route, ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - job:src_http_request_duration_seconds_bucket:rate5m = sum by (ns, le)(task:src_http_request_duration_seconds_bucket:rate5m) - prod:src_http_request_duration_seconds_bucket:rate5m = sum by (le)(task:src_http_request_duration_seconds_bucket:rate5m) - useAlertManager: true - alertmanagerConfig: | - # example - # nothing - tlsCert: | - -----BEGIN CERTIFICATE----- - DUMMY - -----END CERTIFICATE----- - tlsKey: | - -----BEGIN PRIVATE KEY----- - DUMMY - -----END PRIVATE KEY----- diff --git a/values.yaml b/values.yaml deleted file mode 100644 index f260858888d1..000000000000 --- a/values.yaml +++ /dev/null @@ -1,386 +0,0 @@ -# This file defines the default values passed to this Helm chart. The user-provided `values.yaml` -# will be merged with this one and the result will be passed to the Helm templating stage. At the -# top level, these values are separated into three sections: `const`, `cluster`, and `site`, -# documented below. - -# const defines configuration constants that generally should not be changed unless testing out experimental or pre-release features. -const: - frontend: - image: sourcegraph/frontend:2.10.1 - searcher: - image: sourcegraph/searcher:2.10.1 - symbols: - image: sourcegraph/symbols:2.10.1 - gitserver: - image: sourcegraph/gitserver:2.10.1 - githubProxy: - image: sourcegraph/github-proxy:2.10.1 - indexer: - image: sourcegraph/indexer:2.10.1 - lspProxy: - image: sourcegraph/lsp-proxy:2.10.1 - queryRunner: - image: sourcegraph/query-runner:2.10.1 - repoUpdater: - image: sourcegraph/repo-updater:2.10.1 - indexedSearch: - image: sourcegraph/zoekt:18-05-30_3d2275e - pgsql: - exporterImage: sourcegraph/pgsql-exporter:a294a9b6d83c139d3e1217f02c8f80a54cbf73ac - image: sourcegraph/postgres:9.4 - syntectServer: - image: sourcegraph/syntect_server:624a1a2 - xlangGo: - image: sourcegraph/xlang-go:18575_2018-07-20_a470dcb - xlangJava: - image: sourcegraph/xlang-java-skinny:2018-05-10-1621 - xlangJavascriptTypescript: - image: sourcegraph/xlang-javascript-typescript:00081_2018-07-20_09dabb1 - npmProxy: - image: sourcegraph/npm-proxy:9d593e267b6f5e86caeb29da37f140c5f5f4c8b2 - xlangPython: - image: sourcegraph/xlang-python:18892_2018-07-27_ddc9943 - xlangPHP: - image: sourcegraph/xlang-php:00037_2018-07-11_faea319 - redis: - image: sourcegraph/redis:18-02-07_8205764_3.2-alpine - exporterImage: sourcegraph/redis_exporter:18-02-07_bb60087_v0.15.0 - jaeger: - agent: - image: sourcegraph/jaeger-agent - query: - image: sourcegraph/jaeger-query - cassandra: - image: sourcegraph/cassandra:3 - collector: - image: sourcegraph/jaeger-collector - podTmpGC: - image: sourcegraph/pod-tmp-gc:latest - prometheus: - image: sourcegraph/prometheus:v1.4.1 - configMapReload: - image: sourcegraph/configmap-reload:v0.1 - authProxy: - image: sourcegraph/auth-proxy:latest - alertManager: - image: sourcegraph/alertmanager:v0.15.1 - experimentalLangServers: - bash: - image: sourcegraph/codeintel-bash:00239_2018-05-31_6b6cac4 - clojure: - image: sourcegraph/codeintel-clojure:00231_2018-05-31_eef495b - cpp: - image: sourcegraph/codeintel-cpp:00239_2018-05-31_6b6cac4 - cs: - image: sourcegraph/codeintel-csharp:00225_2018-05-26_26f55a3 - css: - image: sourcegraph/codeintel-css:00239_2018-05-31_6b6cac4 - dockerfile: - image: sourcegraph/codeintel-docker:00239_2018-05-31_6b6cac4 - elixir: - image: sourcegraph/codeintel-elixir:00239_2018-05-31_6b6cac4 - html: - image: sourcegraph/codeintel-html:00239_2018-05-31_6b6cac4 - lua: - image: sourcegraph/codeintel-lua:00225_2018-05-26_26f55a3 - ocaml: - image: sourcegraph/codeintel-ocaml:00239_2018-05-31_6b6cac4 - r: - image: sourcegraph/codeintel-r:00239_2018-05-31_6b6cac4 - ruby: - image: sourcegraph/codeintel-ruby:00239_2018-05-31_6b6cac4 - rust: - image: sourcegraph/codeintel-rust:00239_2018-05-31_6b6cac4 - -# cluster specifies the Docker images to use for each service along with replica counts and resource specs where they -# are tunable. -cluster: - # RBAC is enabled by default. Some Kubernetes environments do not permit RBAC. Set to "disabled" to disable and - # prevent RBAC objects from being generated. - rbac: enabled - frontend: - replicas: 1 - containers: - frontend: - # # Additional user-provided environment variables can be added - # env: - # MY_USER_PROVIDED_CUSTOM_ENV_VAR: value - limits: - cpu: "2" - memory: 2G - requests: - cpu: "2" - memory: 1G - searcher: - replicas: 1 - containers: - searcher: - limits: - cpu: "2" - memory: 2G - requests: - cpu: "500m" - memory: "500M" - symbols: - replicas: 1 - containers: - symbols: - limits: - cpu: "2" - memory: 2G - requests: - cpu: "500m" - memory: "500M" - gitserver: - # Number of shards for caching git data. If you change this, you should also change indexedSearch.diskSize. - shards: 1 - # Size of disk of each gitserver shard. If you change this, you should also change indexedSearch.diskSize. - diskSize: 200Gi - # # ssh is a map that describes the structure of gitserver's .ssh directory. If you have configured Sourcegraph - # # to index a private git repository and clone via SSH, you'll need to add the appropriate files to this - # # field. - # ssh: - # known_hosts: "Set this to the desired value for the SSH known_hosts file." - # id_rsa: "Set this to the value of a private key authorized to clone repositories from the code host." - containers: - gitserver: - limits: - cpu: "4" - memory: 8G - requests: - cpu: "500m" - memory: 1G - indexedSearch: - # The size of disk to used for search indexes (this should typically be gitserver.diskSize multipled by gitserver.shards) - diskSize: 200Gi - containers: - # zoekt-indexserver is CPU bound. The more CPU you allocate to it, the - # lower lag between a new commit and it being indexed for search. - zoekt-indexserver: - limits: - cpu: "4" - memory: 4G - requests: - cpu: "500m" - memory: 2Gi - zoekt-webserver: - limits: - cpu: "2" - memory: 4G - requests: - cpu: "500m" - memory: 2Gi - # # Uncomment this to add a Kubernetes node selector to the pods. This is usually unnecessary for most components, unless - # # you have a heterogeneous cluster where you need to ensure certain more resource-hungry pods (e.g., indexedSearch) are - # # assigned to larger nodes. - # nodeSelector: - # beta.kubernetes.io/instance-type: i3.4xlarge - lspProxy: - containers: - lsp-proxy: - limits: - cpu: "1" - memory: 8Gi - requests: - cpu: "500m" - memory: 2Gi - xlangGo: - replicas: 1 - containers: - xlang-go: - limits: - cpu: "4" - memory: 8Gi - requests: - cpu: "500m" - memory: 2Gi - xlangJava: - replicas: 1 - containers: - xlang-java: - limits: - cpu: "4" - memory: 8Gi - requests: - cpu: "500m" - memory: 2Gi - xlangJavascriptTypescript: - replicas: 1 - containers: - xlang-javascript-typescript: - limits: - cpu: "4" - memory: 5Gi - requests: - cpu: "500m" - memory: 2Gi - xlangPython: - replicas: 1 - containers: - xlang-python: - limits: - cpu: "500m" - memory: 1G - requests: - cpu: "500m" - memory: 1G - xlangPHP: - replicas: 1 - containers: - xlang-php: - limits: - cpu: "4" - memory: 8Gi - requests: - cpu: "500m" - memory: 2Gi - pgsql: - volumes: [] - containers: - pgsql: - volumeMounts: [] - jaeger: - containers: - agent: - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - storageClass: - # name is the name of the storage class used by the persistent volumes generated in this chart. This should be - # left as is, unless you are using an already existing storage class. - name: default - - # # REQUIRED: create should be set to "gcp", "aws", or "no". Setting to "gcp" or "aws" will create a new storage class for - # # the designated infrastructure provider. If set to "none", a storage class with the designated name must be - # # created separately from the config generated by this chart - # create: none - - # # zone should be set to the zone in which your Kubernetes cluster resides - # zone: us-west1-a - - # # securityContext, if set, overrides the standard pod security context in all pods - # securityContext: - # fsGroup: 1000 - - configVolume: - # configVolume.defaultMode sets the filesystem mode for ConfigMap volumes - defaultMode: 464 - - # # commonVolumes lists volumes to be included with every pod - # commonVolumes: - # - name: ssl - # hostPath: - # path: /etc/ssl - - # # commonVolumeMounts lists volumeMounts to be attached to every container (these typically - # # corespond to the volumes specified in commonVolumes). - # commonVolumeMounts: - # - mountPath: /etc/ssl - # name: ssl - - # # postgreSQL allows you to specify a custom PostgreSQL server which Sourcegraph will - # # use for storing information. - # postgreSQL: - # user: sg - # password: mysecret - # database: sg - # host: postgres.mycompany.org - # port: 5432 - # sslMode: disable - - # # redis allows you to specify a custom Redis server which Sourcegraph will use - # # for caching information and storing information (session data). - # redis: - # cache: redis.mycompany.org:6379 - # store: redis.mycompany.org:6379 - -# site is the Sourcegraph site configuration. -# -# For legacy reasons, it can include some configuration fields that are only relevant to Data Center. -# -# See all site config options at https://about.sourcegraph.com/docs/config/site. -site: { - # Publicly accessible URL to web app (e.g., what you type into your browser). - "appURL": "http://localhost:3080", - - # Port exposed on all nodes directing HTTP traffic to sourcegraph-frontend pod(s). - "httpNodePort": 30080, - - # # Port exposed on all nodes directing HTTPS traffic to sourcegraph-frontend pod(s). Uncomment this - # # to allow incoming HTTPS traffic. - # httpsNodePort: 30081 - - # # The authentication provider to use for identifying and signing in users. Only one entry is supported. - # # - # # The builtin auth provider with signup disallowed (shown below) means that after the initial site admin signs in, all other users must be invited. - # # - # "auth.providers": [{"type": "builtin", "allowSignup": false}], - - # Uncomment the languages for which you wish to enable code intelligence - "langservers": [ - # { - # "language": "go", - # }, - # { - # "language": "java", - # }, - # { - # "language": "javascript", - # }, - # { - # "language": "typescript", - # }, - # { - # "language": "python", - # }, - # { - # "language": "php", - # }, - - # WARNING experimental language servers follow - read about the caveats - # before enabling them: - # https://about.sourcegraph.com/docs/code-intelligence/experimental-language-servers#caveats-of-experimental-language-servers - # { - # "language": "bash", - # }, - # { - # "language": "clojure", - # }, - # { - # "language": "cpp", - # }, - # { - # "language": "cs", - # }, - # { - # "language": "css", - # }, - # { - # "language": "dockerfile", - # }, - # { - # "language": "elixir", - # }, - # { - # "language": "html", - # }, - # { - # "language": "lua", - # }, - # { - # "language": "ocaml", - # }, - # { - # "language": "r", - # }, - # { - # "language": "ruby", - # }, - # { - # "language": "rust", - # }, - ], -}