Skip to content

Commit

Permalink
fix helm StatefulSet
Browse files Browse the repository at this point in the history
  • Loading branch information
xyctruth committed Feb 28, 2022
1 parent ce75b7c commit cc1b965
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- **Detailed Analysis**
- Click the bubbles in the charts to jump to the detailed page of Profile and Trace for further detailed analysis

## [Demo](http://profiler.jia-huang.com)
## [Demo](https://profiler.jia-huang.com/)

<table>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- **详细分析**
- 点击图表中的气泡跳转到 Profile 与 Trace 的详细页面进行进一步详细的分析

## [演示](http://profiler.jia-huang.com)
## [演示](https://profiler.jia-huang.com/)

<table>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- **详细分析**
- 点击图表中的气泡跳转到 Profile 与 Trace 的详细页面进行进一步详细的分析

## [演示](http://profiler.jia-huang.com)
## [演示](https://profiler.jia-huang.com/)

<table>
<tr>
Expand Down
15 changes: 0 additions & 15 deletions charts/profiler/templates/pvc.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "profiler.fullname" . }}
labels:
Expand All @@ -9,6 +9,9 @@ spec:
selector:
matchLabels:
{{- include "profiler.selectorLabels" . | nindent 6 }}
serviceName: "{{ template "profiler.fullname" . }}"
updateStrategy:
type: RollingUpdate
template:
metadata:
{{- with .Values.podAnnotations }}
Expand Down Expand Up @@ -57,22 +60,14 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: profiler-data
{{- if .Values.persistence.existingClaim }}
- name: {{ .Values.persistence.existingClaim }}
{{- else }}
- name: data
{{- end }}
mountPath: /profiler/data
readOnly: false
- name: profiler-config
mountPath: /profiler/config
volumes:
- name: profiler-config
configMap:
name: {{ include "profiler.fullname" . }}-conf
- name: profiler-data
{{- if and .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "profiler.fullname" . }}-data
{{- else }}
emptyDir: {}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -85,3 +80,37 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: profiler-config
configMap:
name: {{ include "profiler.fullname" . }}-conf
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
- name: {{ .Values.persistence.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}
{{ end }}
{{- if and .Values.persistence.enabled ( not .Values.persistence.existingClaim ) }}
volumeClaimTemplates:
- metadata:
name: data
labels:
{{- include "profiler.labels" . | nindent 10 }}
spec:
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: {{ .Values.persistence.storageClass | quote }}
{{- end }}
{{- end }}
{{- else }}
- name: "data"
emptyDir: {}
{{- end }}
24 changes: 14 additions & 10 deletions charts/profiler/values.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,20 @@ affinity: {}
resources:
limits:
cpu: "400m"
memory: "500Mi"
memory: "1000Mi"
requests:
cpu: "100m"
memory: "200Mi"
cpu: "200m"
memory: "300Mi"

persistence:
## If true, use a Persistent Volume Claim, If false, use emptyDir
##
enabled: true

## Enable persistence using an existing PVC
##
existingClaim: data-profiler-0

storageClass: "alicloud-disk-essd"
## Persistent Volume Claim annotations
##
Expand All @@ -256,17 +260,17 @@ service:
ingress:
enabled: true
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-nginx
hosts:
- host: profiler.jia-huang.com
paths:
- path: /
pathType: Prefix
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
tls:
- secretName: profiler-tls
hosts:
- profiler.jia-huang.com


2 changes: 2 additions & 0 deletions charts/profiler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ persistence:
##
enabled: false

# existingClaim:

storageClass: "alicloud-disk-essd"
## Persistent Volume Claim annotations
##
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"dev": "vite",
"test": "npm run dev --base_api_url=http://profiler.jia-huang.com",
"test": "npm run dev --base_api_url=https://profiler.jia-huang.com/",
"build": "vite build",
"preview": "vite preview"
},
Expand Down

0 comments on commit cc1b965

Please sign in to comment.