Skip to content

Commit

Permalink
Merge pull request #4 from deepflowys/update-deepflow-server
Browse files Browse the repository at this point in the history
[Chart] update deepflow
  • Loading branch information
jianchang authored Aug 10, 2022
2 parents c8b6573 + d66d9a2 commit fce1667
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 42 deletions.
2 changes: 1 addition & 1 deletion charts/deepflow-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: An automated observability platform for cloud-native developers.
name: deepflow-agent
engine: gotpl
type: application
version: 0.1.008
version: 0.1.009
appVersion: "6.1.1"
kubeVersion: ">=1.16.0-0"
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/deepflow/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: An automated observability platform for cloud-native developers.
name: deepflow
engine: gotpl
type: application
version: 0.1.008
version: 0.1.009
appVersion: "6.1.1"
kubeVersion: ">=1.16.0-0"
sources:
Expand Down
3 changes: 2 additions & 1 deletion charts/deepflow/charts/clickhouse/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,8 @@ data:
-->
<remote_servers>
<df_cluster>
{{range $i, $e := until (atoi (printf "%d" (int64 ( tpl .Values.replicas . )))) }}
{{- $replicas := int (tpl (toString .Values.replicas) .) }}
{{- range $i := until $replicas }}
<shard>
<replica>
<host>{{ $.Release.Name }}-clickhouse-headless-{{$i}}</host>
Expand Down
24 changes: 14 additions & 10 deletions charts/deepflow/charts/clickhouse/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
nodePort: {{ tpl (toString .nodePort) $ }}
{{- end }}
protocol: {{ tpl .protocol $ }}
{{- end }}
{{- end }}
{{- if .Values.service.additionalPorts }}
{{ toYaml .Values.service.additionalPorts | indent 2 }}
{{- end }}
Expand All @@ -55,15 +55,17 @@ metadata:
spec:
clusterIP: None
ports:
- name: tcp
port: 9000
targetPort: 9000
protocol: TCP
{{- range .Values.service.ports }}
- name: {{ tpl .name $ }}
port: {{ tpl (toString .port) $ }}
targetPort: {{ tpl (toString .targetPort) $ }}
protocol: {{ tpl .protocol $ }}
{{- end }}
selector:
{{- include "clickhouse.selectorLabels" . | nindent 4 }}
type: ClusterIP

{{- $replicas := int (tpl .Values.replicas . |toString) }}
{{- $replicas := int (tpl (toString .Values.replicas) .) }}
{{- range $i := until $replicas }}
---
apiVersion: v1
Expand All @@ -78,10 +80,12 @@ spec:
type: ClusterIP
clusterIP: None
ports:
- name: tcp
port: 9000
targetPort: 9000
protocol: TCP
{{- range $.Values.service.ports }}
- name: {{ tpl .name $ }}
port: {{ tpl (toString .port) $ }}
targetPort: {{ tpl (toString .targetPort) $ }}
protocol: {{ tpl .protocol $ }}
{{- end }}
selector:
{{- include "clickhouse.selectorLabels" $ | nindent 4 }}
"statefulset.kubernetes.io/pod-name": {{ include "clickhouse.fullname" $ }}-{{ $i }}
Expand Down
3 changes: 1 addition & 2 deletions charts/deepflow/charts/clickhouse/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ metadata:
labels:
{{- include "clickhouse.labels" . | nindent 4 }}
spec:
spec:
replicas: {{ tpl .Values.replicas . }}
replicas: {{ tpl (toString .Values.replicas) . }}
podManagementPolicy: {{ tpl .Values.podManagementPolicy . }}
serviceName: {{ include "clickhouse.fullname" . }}-headless
selector:
Expand Down
2 changes: 1 addition & 1 deletion charts/deepflow/charts/mysql/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
labels:
{{- include "mysql.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicas }}
replicas: {{ tpl (toString .Values.replicas) . }}
strategy:
type: Recreate
selector:
Expand Down
2 changes: 1 addition & 1 deletion charts/deepflow/charts/mysql/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
nodePort: {{ tpl (toString .nodePort) $ }}
{{- end }}
protocol: {{ tpl .protocol $ }}
{{- end }}
{{- end }}
{{- if .Values.service.additionalPorts }}
{{ toYaml .Values.service.additionalPorts | indent 2 }}
{{- end }}
Expand Down
8 changes: 5 additions & 3 deletions charts/deepflow/templates/app-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ metadata:
labels:
{{- include "deepflow-app.labels" . | nindent 4 }}
spec:
replicas: {{ tpl .Values.app.replicas . }}
replicas: {{ tpl (toString .Values.app.replicas) . }}
selector:
matchLabels:
{{- include "deepflow-app.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/customConfig: {{ sha256sum (print (tpl (toYaml .Values.configmap) $)) }}
labels:
{{- include "deepflow-app.selectorLabels" . | nindent 8 }}
spec:
Expand Down
5 changes: 4 additions & 1 deletion charts/deepflow/templates/server-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
rollingUpdate:
partition: 0
type: RollingUpdate
replicas: {{ tpl .Values.server.replicas . }}
replicas: {{ tpl (toString .Values.server.replicas) . }}
podManagementPolicy: {{ tpl .Values.server.podManagementPolicy . }}
serviceName: {{ include "deepflow.fullname" . }}-server-headless
selector:
Expand All @@ -28,6 +28,9 @@ spec:
spec:
hostNetwork: {{ tpl .Values.server.hostNetwork . }}
dnsPolicy: {{ tpl .Values.server.dnsPolicy . }}
dnsConfig:
searches:
- {{ include "deepflow.fullname" . }}-server-headless.{{ .Release.Namespace }}.svc.{{ tpl .Values.clusterDomain . }}
imagePullSecrets:
{{- with .Values.imagePullSecrets }}
{{- toYaml . | nindent 8 }}
Expand Down
48 changes: 27 additions & 21 deletions charts/deepflow/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,38 @@ spec:
nodePort: {{ tpl (toString .nodePort) $ }}
{{- end }}
protocol: {{ tpl .protocol $ }}
{{- end }}
{{- end }}
{{- if .Values.server.service.additionalPorts }}
{{ toYaml .Values.server.service.additionalPorts | indent 2 }}
{{- end }}
selector:
{{- include "deepflow-server.selectorLabels" . | nindent 4 }}
type: "{{ .Values.server.service.type }}"
{{/*
# ---
# apiVersion: v1
# kind: Service
# metadata:
# name: {{ include "deepflow.fullname" . }}-server-headless
# labels:
# {{- include "deepflow-server.labels" . | nindent 4 }}
# spec:
# clusterIP: None
# ports:
# - name: tcp
# port: 20416
# targetPort: 20416
# protocol: TCP
# selector:
# {{- include "deepflow-server.selectorLabels" . | nindent 4 }}
# type: ClusterIP
*/}}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "deepflow.fullname" . }}-server-headless
labels:
{{- include "deepflow-server.labels" . | nindent 4 }}
{{- if .Values.server.service.annotations }}
annotations:
{{ toYaml .Values.server.service.annotations | indent 4 }}
{{- end }}
spec:
clusterIP: None
ports:
{{- range .Values.server.service.ports }}
- name: {{ tpl .name $ }}
port: {{ tpl (toString .port) $ }}
targetPort: {{ tpl (toString .targetPort) $ }}
{{- if and (eq $serviceType "NodePort") (.nodePort) }}
{{- end }}
protocol: {{ tpl .protocol $ }}
{{- end }}
selector:
{{- include "deepflow-server.selectorLabels" . | nindent 4 }}
type: ClusterIP
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -105,7 +111,7 @@ spec:
nodePort: {{ tpl (toString .nodePort) $ }}
{{- end }}
protocol: {{ tpl .protocol $ }}
{{- end }}
{{- end }}
{{- if .Values.app.service.additionalPorts }}
{{ toYaml .Values.app.service.additionalPorts | indent 2 }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions charts/deepflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ global:
## Whether to enable allInone local storage, if enabled, the local /opt directory is used to store data by default, ignoring the node affinity check, and is not responsible for any data persistence
allInOneLocalStorage: false
storageClass: ""
clusterDomain: cluster.local

image:
server:
Expand All @@ -51,6 +52,7 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

clusterDomain: "{{ .Values.global.clusterDomain }}"
timezone: "{{ .Values.global.timezone }}"
podAnnotations: {}

Expand Down

0 comments on commit fce1667

Please sign in to comment.