Skip to content

Commit

Permalink
Adding support for Openshift.
Browse files Browse the repository at this point in the history
Unlike k8s, Openshift is running containers in user mode, therefore,
some adjustments were needed in order to make Signoz run on Openshift.

Signed-off-by: Yoni Bettan <[email protected]>
  • Loading branch information
ybettan committed Feb 20, 2022
1 parent ebba806 commit 4071fbe
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 16 deletions.
8 changes: 6 additions & 2 deletions charts/alertmanager/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.securityContext.pod.enabled }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- toYaml .Values.securityContext.pod.data | nindent 8 }}
{{- end}}
containers:
{{- if and (.Values.configmapReload.enabled) (.Values.config) }}
- name: {{ .Chart.Name }}-{{ .Values.configmapReload.name }}
Expand All @@ -67,8 +69,10 @@ spec:
mountPath: /etc/alertmanager
{{- end }}
- name: {{ .Chart.Name }}
{{- if .Values.securityContext.container.enabled }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- toYaml .Values.securityContext.container.data | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
Expand Down
24 changes: 13 additions & 11 deletions charts/alertmanager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name:

podSecurityContext:
fsGroup: 65534
dnsConfig: {}
# nameservers:
# - 1.2.3.4
Expand All @@ -37,14 +35,18 @@ dnsConfig: {}
# - name: ndots
# value: "2"
# - name: edns0

securityContext:
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
runAsUser: 65534
runAsNonRoot: true
runAsGroup: 65534
pod:
enabled: false
data:
fsGroup: 65534
container:
enable: false
data:
runAsUser: 65534
runAsNonRoot: true
runAsGroup: 65534

additionalPeers: []

Expand Down Expand Up @@ -116,7 +118,7 @@ persistence:
size: 100Mi

config:
global:
global:
resolve_timeout: 1m
slack_api_url: 'https://hooks.slack.com/services/xxx'

Expand Down Expand Up @@ -160,7 +162,7 @@ configmapReload:
##
resources: {}

templates:
templates:
title.tmpl: |-
{{ define "slack.title" }}
[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} for {{ .CommonLabels.job }}
Expand Down
3 changes: 3 additions & 0 deletions charts/clickhouse/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ dependencies:
- name: zookeeper
repository: "https://charts.bitnami.com/bitnami"
version: 6.0.0
maintainers:
- name: signoz
email: [email protected]
2 changes: 1 addition & 1 deletion charts/clickhouse/templates/clickhouse-instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
image: yandex/clickhouse-server:21.7
volumeMounts:
- name: default-volume-claim
mountPath: /var/lib/clickhouse
mountPath: /usr/lib/clickhouse
- name: initdb
mountPath: /docker-entrypoint-initdb.d
volumes:
Expand Down
2 changes: 2 additions & 0 deletions charts/clickhouse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
zookeeper:
autopurge:
purgeInterval: 1
securityContext:
enabled: false

# cloud:

Expand Down
4 changes: 2 additions & 2 deletions charts/signoz/templates/query-service/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ spec:
- name: prometheus
mountPath: /root/config
- name: signoz-db
mountPath: /var/lib/signoz/
mountPath: /var/tmp/signoz
- name: dashboards
mountPath: /root/config/dashboards
mountPath: /var/tmp/dashboards
resources:
{{- toYaml .Values.queryService.resources | nindent 12 }}
{{- with .Values.queryService.nodeSelector }}
Expand Down

0 comments on commit 4071fbe

Please sign in to comment.