-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch away from user 0 (root) and delete unnecessary cluster role (#534
) * switch away from user 0 (root) and delete unnecessary cluster role binding * pgsql data dir tweak * avoid chown when already correct * extract initContainers into kustomization (#537) * migrate doc * buildkite checks accommodate kustomize * kubectl version is not working * asas !!!!! * migrate doc specifies kubectl version
- Loading branch information
1 parent
7a19888
commit 821032e
Showing
32 changed files
with
276 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,3 @@ spec: | |
requests: | ||
cpu: 100m | ||
memory: 250M | ||
securityContext: | ||
runAsUser: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- searcher/searcher.Service.yaml | ||
- searcher/searcher.Deployment.yaml | ||
- backend.Service.yaml | ||
- frontend/sourcegraph-frontend.Role.yaml | ||
- frontend/sourcegraph-frontend-internal.Service.yaml | ||
- frontend/sourcegraph-frontend.Deployment.yaml | ||
- frontend/sourcegraph-frontend.ServiceAccount.yaml | ||
- frontend/sourcegraph-frontend.Service.yaml | ||
- frontend/sourcegraph-frontend.RoleBinding.yaml | ||
- frontend/sourcegraph-frontend.Ingress.yaml | ||
- redis/redis-store.Service.yaml | ||
- redis/redis-store.Deployment.yaml | ||
- redis/redis-cache.Service.yaml | ||
- redis/redis-cache.Deployment.yaml | ||
- redis/redis-store.PersistentVolumeClaim.yaml | ||
- redis/redis-cache.PersistentVolumeClaim.yaml | ||
- indexed-search/indexed-search.StatefulSet.yaml | ||
- indexed-search/indexed-search.Service.yaml | ||
- grafana/grafana.Deployment.yaml | ||
- grafana/grafana.ConfigMap.yaml | ||
- grafana/grafana.Service.yaml | ||
- grafana/grafana.ServiceAccount.yaml | ||
- grafana/grafana.PersistentVolumeClaim.yaml | ||
- syntect-server/syntect-server.Service.yaml | ||
- syntect-server/syntect-server.Deployment.yaml | ||
- symbols/symbols.Service.yaml | ||
- symbols/symbols.Deployment.yaml | ||
- pgsql/pgsql.PersistentVolumeClaim.yaml | ||
- pgsql/pgsql.ConfigMap.yaml | ||
- pgsql/pgsql.Service.yaml | ||
- pgsql/pgsql.Deployment.yaml | ||
- prometheus/prometheus.ServiceAccount.yaml | ||
- prometheus/prometheus.ClusterRoleBinding.yaml | ||
- prometheus/prometheus.ConfigMap.yaml | ||
- prometheus/prometheus.Deployment.yaml | ||
- prometheus/prometheus.PersistentVolumeClaim.yaml | ||
- prometheus/prometheus.ClusterRole.yaml | ||
- prometheus/prometheus.Service.yaml | ||
- query-runner/query-runner.Service.yaml | ||
- query-runner/query-runner.Deployment.yaml | ||
- github-proxy/github-proxy.Service.yaml | ||
- github-proxy/github-proxy.Deployment.yaml | ||
- replacer/replacer.Service.yaml | ||
- replacer/replacer.Deployment.yaml | ||
- repo-updater/repo-updater.Service.yaml | ||
- repo-updater/repo-updater.Deployment.yaml | ||
- gitserver/gitserver.Service.yaml | ||
- gitserver/gitserver.StatefulSet.yaml | ||
- lsif-server/lsif-server.Service.yaml | ||
- lsif-server/lsif-server.PersistentVolumeClaim.yaml | ||
- lsif-server/lsif-server.Deployment.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,3 @@ spec: | |
requests: | ||
cpu: 500m | ||
memory: 1G | ||
securityContext: | ||
runAsUser: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,5 +41,3 @@ spec: | |
requests: | ||
cpu: 100m | ||
memory: 500Mi | ||
securityContext: | ||
runAsUser: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,5 +48,3 @@ spec: | |
requests: | ||
cpu: 250m | ||
memory: 2G | ||
securityContext: | ||
runAsUser: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
overlays/migrate-to-nonroot/gitserver/gitserver.StatefulSet.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: gitserver | ||
spec: | ||
template: | ||
spec: | ||
initContainers: | ||
- name: transfer-file-ownership | ||
image: sourcegraph/alpine:3.10@sha256:4d05cd5669726fc38823e92320659a6d1ef7879e62268adec5df658a0bacf65c | ||
command: ["sh", "-c", "if [[ \"$(stat -c '%u' /data/repos)\" -ne 100 ]]; then chown -R 100:100 /data/repos; fi"] | ||
volumeMounts: | ||
- mountPath: /data/repos | ||
name: repos | ||
securityContext: | ||
runAsUser: 0 |
16 changes: 16 additions & 0 deletions
16
overlays/migrate-to-nonroot/grafana/grafana.Deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: grafana | ||
spec: | ||
template: | ||
spec: | ||
initContainers: | ||
- name: transfer-file-ownership | ||
image: sourcegraph/alpine:3.10@sha256:4d05cd5669726fc38823e92320659a6d1ef7879e62268adec5df658a0bacf65c | ||
command: ["sh", "-c", "chown -R 472:472 /var/lib/grafana"] | ||
volumeMounts: | ||
- mountPath: /var/lib/grafana | ||
name: data | ||
securityContext: | ||
runAsUser: 0 |
Oops, something went wrong.