Skip to content

Commit 5591f6a

Browse files
committed
Clean up base
1 parent 2ffc522 commit 5591f6a

File tree

236 files changed

+2018
-863
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+2018
-863
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ingress-controller.yaml
12
cluster
23
cluster.yaml
34
generated-cluster

base/monitoring/cadvisor/cadvisor.DaemonSet.yaml

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: DaemonSet
33
metadata:
44
annotations:
55
description: DaemonSet to ensure all nodes run a cAdvisor pod.
6-
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
6+
seccomp.security.alpha.kubernetes.io/pod: "docker/default"
77
labels:
88
deploy: sourcegraph
99
sourcegraph-resource-requires: cluster-admin
@@ -25,60 +25,60 @@ spec:
2525
spec:
2626
serviceAccountName: cadvisor
2727
containers:
28-
- name: cadvisor
29-
image: index.docker.io/sourcegraph/cadvisor:187572_2022-12-06_cbecc5321c7d@sha256:755748f2f9b00d8f70bd65349e85235585bdf1a663e26198c8eaf91dfd5636e1
30-
args:
31-
# Kubernetes-specific flags below (other flags are baked into the Docker image)
32-
#
33-
# disable container labels to allow whitelisting to reduce noise
34-
- --store_container_labels=false
35-
- --whitelisted_container_labels=io.kubernetes.container.name,io.kubernetes.pod.name,io.kubernetes.pod.namespace,io.kubernetes.pod.uid
36-
# it is safe to uncomment this option if you use docker as your container runtime to reduce noise
37-
# - --docker_only
38-
resources:
39-
requests:
40-
memory: 200Mi
41-
cpu: 150m
42-
limits:
43-
memory: 2000Mi
44-
cpu: 300m
45-
volumeMounts:
28+
- name: cadvisor
29+
image: index.docker.io/sourcegraph/cadvisor:187572_2022-12-06_cbecc5321c7d@sha256:755748f2f9b00d8f70bd65349e85235585bdf1a663e26198c8eaf91dfd5636e1
30+
args:
31+
# Kubernetes-specific flags below (other flags are baked into the Docker image)
32+
#
33+
# disable container labels to allow whitelisting to reduce noise
34+
- --store_container_labels=false
35+
- --whitelisted_container_labels=io.kubernetes.container.name,io.kubernetes.pod.name,io.kubernetes.pod.namespace,io.kubernetes.pod.uid
36+
# it is safe to uncomment this option if you use docker as your container runtime to reduce noise
37+
# - --docker_only
38+
resources:
39+
requests:
40+
memory: 200Mi
41+
cpu: 150m
42+
limits:
43+
memory: 2000Mi
44+
cpu: 300m
45+
volumeMounts:
46+
- name: rootfs
47+
mountPath: /rootfs
48+
readOnly: true
49+
- name: var-run
50+
mountPath: /var/run
51+
readOnly: true
52+
- name: sys
53+
mountPath: /sys
54+
readOnly: true
55+
- name: docker
56+
mountPath: /var/lib/docker
57+
readOnly: true
58+
- name: disk
59+
mountPath: /dev/disk
60+
readOnly: true
61+
ports:
62+
- name: http
63+
containerPort: 48080
64+
protocol: TCP
65+
securityContext:
66+
privileged: true
67+
automountServiceAccountToken: false
68+
terminationGracePeriodSeconds: 30
69+
volumes:
4670
- name: rootfs
47-
mountPath: /rootfs
48-
readOnly: true
71+
hostPath:
72+
path: /
4973
- name: var-run
50-
mountPath: /var/run
51-
readOnly: true
74+
hostPath:
75+
path: /var/run
5276
- name: sys
53-
mountPath: /sys
54-
readOnly: true
77+
hostPath:
78+
path: /sys
5579
- name: docker
56-
mountPath: /var/lib/docker
57-
readOnly: true
80+
hostPath:
81+
path: /var/lib/docker
5882
- name: disk
59-
mountPath: /dev/disk
60-
readOnly: true
61-
ports:
62-
- name: http
63-
containerPort: 48080
64-
protocol: TCP
65-
securityContext:
66-
privileged: true
67-
automountServiceAccountToken: false
68-
terminationGracePeriodSeconds: 30
69-
volumes:
70-
- name: rootfs
71-
hostPath:
72-
path: /
73-
- name: var-run
74-
hostPath:
75-
path: /var/run
76-
- name: sys
77-
hostPath:
78-
path: /sys
79-
- name: docker
80-
hostPath:
81-
path: /var/lib/docker
82-
- name: disk
83-
hostPath:
84-
path: /dev/disk
83+
hostPath:
84+
path: /dev/disk

base/monitoring/grafana/grafana.StatefulSet.yaml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -25,54 +25,54 @@ spec:
2525
deploy: sourcegraph
2626
spec:
2727
containers:
28-
- name: grafana
29-
image: index.docker.io/sourcegraph/grafana:187572_2022-12-06_cbecc5321c7d@sha256:cf295a1dada50607a364390a54744dbc9142aa99b42c07f1bb623ca251639d2c
30-
terminationMessagePolicy: FallbackToLogsOnError
31-
ports:
32-
- containerPort: 3370
33-
name: http
34-
volumeMounts:
35-
- mountPath: /var/lib/grafana
36-
name: grafana-data
37-
- mountPath: /sg_config_grafana/provisioning/datasources
38-
name: config
39-
- mountPath: /sg_grafana_additional_dashboards
40-
name: dashboards
41-
# Grafana is relied upon to send alerts to site admins when something is wrong with
42-
# Sourcegraph, thus its memory requests and limits are the same to guarantee it has enough
43-
# memory to perform its job reliably and prevent conflicts with other pods on the same
44-
# host node.
45-
resources:
46-
limits:
47-
cpu: "1"
48-
memory: 512Mi
49-
requests:
50-
cpu: 100m
51-
memory: 512Mi
52-
securityContext:
53-
allowPrivilegeEscalation: false
54-
runAsGroup: 472
55-
runAsUser: 472
28+
- name: grafana
29+
image: index.docker.io/sourcegraph/grafana:187572_2022-12-06_cbecc5321c7d@sha256:cf295a1dada50607a364390a54744dbc9142aa99b42c07f1bb623ca251639d2c
30+
terminationMessagePolicy: FallbackToLogsOnError
31+
ports:
32+
- containerPort: 3370
33+
name: http
34+
volumeMounts:
35+
- mountPath: /var/lib/grafana
36+
name: grafana-data
37+
- mountPath: /sg_config_grafana/provisioning/datasources
38+
name: config
39+
- mountPath: /sg_grafana_additional_dashboards
40+
name: dashboards
41+
# Grafana is relied upon to send alerts to site admins when something is wrong with
42+
# Sourcegraph, thus its memory requests and limits are the same to guarantee it has enough
43+
# memory to perform its job reliably and prevent conflicts with other pods on the same
44+
# host node.
45+
resources:
46+
limits:
47+
cpu: "1"
48+
memory: 512Mi
49+
requests:
50+
cpu: 100m
51+
memory: 512Mi
52+
securityContext:
53+
allowPrivilegeEscalation: false
54+
runAsGroup: 472
55+
runAsUser: 472
5656
# serviceAccountName: grafana
5757
volumes:
58-
- name: config
59-
configMap:
60-
defaultMode: 0777
61-
name: grafana
62-
- name: dashboards
63-
configMap:
64-
defaultMode: 0777
65-
name: grafana-dashboards
58+
- name: config
59+
configMap:
60+
defaultMode: 0777
61+
name: grafana
62+
- name: dashboards
63+
configMap:
64+
defaultMode: 0777
65+
name: grafana-dashboards
6666
securityContext:
6767
runAsUser: 472
6868
fsGroup: 472
6969
fsGroupChangePolicy: OnRootMismatch
7070
volumeClaimTemplates:
71-
- metadata:
72-
name: grafana-data
73-
spec:
74-
accessModes: ["ReadWriteOnce"]
75-
resources:
76-
requests:
77-
storage: 2Gi
78-
storageClassName: sourcegraph
71+
- metadata:
72+
name: grafana-data
73+
spec:
74+
accessModes: ["ReadWriteOnce"]
75+
resources:
76+
requests:
77+
storage: 2Gi
78+
storageClassName: sourcegraph

base/monitoring/node-exporter/node-exporter.DaemonSet.yaml

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: DaemonSet
33
metadata:
44
annotations:
55
description: DaemonSet to ensure all nodes run a node-exporter pod.
6-
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
6+
seccomp.security.alpha.kubernetes.io/pod: "docker/default"
77
labels:
88
deploy: sourcegraph
99
app: node-exporter
@@ -23,68 +23,68 @@ spec:
2323
app: node-exporter
2424
spec:
2525
containers:
26-
- name: node-exporter
27-
image: index.docker.io/sourcegraph/node-exporter:187572_2022-12-06_cbecc5321c7d@sha256:2d9dcdf0b2226f0c3d550a64d2667710265462350a3ba9ebe37d0302bc64af0f
28-
imagePullPolicy: IfNotPresent
29-
resources:
30-
limits:
31-
cpu: '1'
32-
memory: 1Gi
33-
requests:
34-
cpu: 200m
35-
memory: 100Mi
36-
args:
37-
- --web.listen-address=:9100
38-
- --path.sysfs=/host/sys
39-
- --path.rootfs=/host/root
40-
- --path.procfs=/host/proc
41-
- --no-collector.wifi
42-
- --no-collector.hwmon
43-
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
44-
- --collector.netclass.ignored-devices=^(veth.*)$
45-
- --collector.netdev.device-exclude=^(veth.*)$
46-
env:
47-
securityContext:
48-
allowPrivilegeEscalation: false
49-
readOnlyRootFilesystem: true
50-
runAsGroup: 65534
51-
runAsUser: 65534
52-
volumeMounts:
53-
- name: rootfs
54-
mountPath: /host/root
55-
mountPropagation: HostToContainer
56-
readOnly: true
57-
- name: sys
58-
mountPath: /host/sys
59-
mountPropagation: HostToContainer
60-
readOnly: true
61-
- name: proc
62-
mountPath: /host/proc
63-
mountPropagation: HostToContainer
64-
readOnly: true
65-
ports:
66-
- name: metrics
67-
containerPort: 9100
68-
protocol: TCP
69-
readinessProbe:
70-
failureThreshold: 3
71-
httpGet:
72-
scheme: HTTP
73-
port: metrics
74-
initialDelaySeconds: 0
75-
periodSeconds: 10
76-
successThreshold: 1
77-
timeoutSeconds: 1
78-
livenessProbe:
79-
failureThreshold: 3
80-
httpGet:
81-
scheme: HTTP
82-
port: metrics
83-
initialDelaySeconds: 0
84-
periodSeconds: 10
85-
successThreshold: 1
86-
timeoutSeconds: 1
87-
terminationMessagePolicy: FallbackToLogsOnError
26+
- name: node-exporter
27+
image: index.docker.io/sourcegraph/node-exporter:187572_2022-12-06_cbecc5321c7d@sha256:2d9dcdf0b2226f0c3d550a64d2667710265462350a3ba9ebe37d0302bc64af0f
28+
imagePullPolicy: IfNotPresent
29+
resources:
30+
limits:
31+
cpu: "1"
32+
memory: 1Gi
33+
requests:
34+
cpu: 200m
35+
memory: 100Mi
36+
args:
37+
- --web.listen-address=:9100
38+
- --path.sysfs=/host/sys
39+
- --path.rootfs=/host/root
40+
- --path.procfs=/host/proc
41+
- --no-collector.wifi
42+
- --no-collector.hwmon
43+
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
44+
- --collector.netclass.ignored-devices=^(veth.*)$
45+
- --collector.netdev.device-exclude=^(veth.*)$
46+
env:
47+
securityContext:
48+
allowPrivilegeEscalation: false
49+
readOnlyRootFilesystem: true
50+
runAsGroup: 65534
51+
runAsUser: 65534
52+
volumeMounts:
53+
- name: rootfs
54+
mountPath: /host/root
55+
mountPropagation: HostToContainer
56+
readOnly: true
57+
- name: sys
58+
mountPath: /host/sys
59+
mountPropagation: HostToContainer
60+
readOnly: true
61+
- name: proc
62+
mountPath: /host/proc
63+
mountPropagation: HostToContainer
64+
readOnly: true
65+
ports:
66+
- name: metrics
67+
containerPort: 9100
68+
protocol: TCP
69+
readinessProbe:
70+
failureThreshold: 3
71+
httpGet:
72+
scheme: HTTP
73+
port: metrics
74+
initialDelaySeconds: 0
75+
periodSeconds: 10
76+
successThreshold: 1
77+
timeoutSeconds: 1
78+
livenessProbe:
79+
failureThreshold: 3
80+
httpGet:
81+
scheme: HTTP
82+
port: metrics
83+
initialDelaySeconds: 0
84+
periodSeconds: 10
85+
successThreshold: 1
86+
timeoutSeconds: 1
87+
terminationMessagePolicy: FallbackToLogsOnError
8888
automountServiceAccountToken: false
8989
terminationGracePeriodSeconds: 30
9090
securityContext:
@@ -98,12 +98,12 @@ spec:
9898
tolerations:
9999
hostPID: true
100100
volumes:
101-
- name: rootfs
102-
hostPath:
103-
path: /
104-
- name: sys
105-
hostPath:
106-
path: /sys
107-
- name: proc
108-
hostPath:
109-
path: /proc
101+
- name: rootfs
102+
hostPath:
103+
path: /
104+
- name: sys
105+
hostPath:
106+
path: /sys
107+
- name: proc
108+
hostPath:
109+
path: /proc

0 commit comments

Comments
 (0)