Skip to content

Commit 155baef

Browse files
Add service account for site controller
Add pod name to site controller Add option disable by default
1 parent 23e84e8 commit 155baef

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

charts/primary-site/templates/deployments/site-controller.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ spec:
2323
{{ $key }}: {{ $value | quote }}
2424
{{- end }}
2525
spec:
26+
serviceAccount: site-controller
2627
{{- if .Values.siteController.deployment.extraVolumes }}
2728
volumes:
2829
{{- toYaml .Values.siteController.deployment.extraVolumes | nindent 8 }}
@@ -82,6 +83,14 @@ spec:
8283
value: {{ .Values.siteController.deployment.metrics.subsystem }}
8384
- name: PRIMARY_SITE_VERSION
8485
value: {{ .Chart.Version }}
86+
- name: ENABLE_SITE_METRICS
87+
value: "{{ .Values.globals.publishSiteMetrics }}"
88+
- name: SITE_CONTROLLER_NAMESPACE
89+
value: {{ .Release.Namespace }}
90+
- name: SITE_CONTROLLER_POD_NAME
91+
valueFrom:
92+
fieldRef:
93+
fieldPath: metadata.name
8594
{{- range $item := .Values.siteController.deployment.env }}
8695
- name: {{ $item.name }}
8796
value: {{ $item.value | quote}}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: site-controller
5+
namespace: {{ .Release.Namespace }}
6+
---
7+
apiVersion: rbac.authorization.k8s.io/v1
8+
kind: RoleBinding
9+
metadata:
10+
name: site-controller
11+
roleRef:
12+
apiGroup: rbac.authorization.k8s.io
13+
kind: ClusterRole
14+
name: view
15+
subjects:
16+
- kind: ServiceAccount
17+
name: site-controller
18+
namespace: {{ .Release.Namespace }}

charts/primary-site/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ globals:
2929
storageProvider: google_cloud
3030
bucketName: foxglove-index-in-place
3131

32+
## Publish metrics from the primary site to Foxglove
33+
publishSiteMetrics: false
34+
3235
## Configure an http/https egress proxy if your environment requires outgoing connections to be proxied. Set `enabled` to `true` and appropriate values for `httpProxy`, `httpsProxy` and `noProxy`.
3336
proxy:
3437
enabled: false

0 commit comments

Comments
 (0)