Skip to content

Commit 0ef3192

Browse files
ronethingnic-6443
andauthored
chore: upgrade api7 to v3.2.9.2 (#94)
Signed-off-by: ashing <[email protected]> Signed-off-by: Nic <[email protected]> Co-authored-by: Nic <[email protected]>
1 parent 9ce830f commit 0ef3192

File tree

7 files changed

+70
-11
lines changed

7 files changed

+70
-11
lines changed

charts/api7/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.12.1
18+
version: 0.12.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/api7/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# api7ee3
22

3-
![Version: 0.12.1](https://img.shields.io/badge/Version-0.12.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square)
3+
![Version: 0.12.2](https://img.shields.io/badge/Version-0.12.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square)
44

55
A Helm chart for Kubernetes
66

@@ -20,7 +20,8 @@ A Helm chart for Kubernetes
2020
| busybox.image.tag | float | `1.28` | |
2121
| dashboard.image.pullPolicy | string | `"IfNotPresent"` | |
2222
| dashboard.image.repository | string | `"api7/api7-ee-3-integrated"` | |
23-
| dashboard.image.tag | string | `"v3.2.9.1"` | |
23+
| dashboard.image.tag | string | `"v3.2.9.2"` | |
24+
| dashboard.keyCertSecret | string | `""` | |
2425
| dashboard.replicaCount | int | `1` | |
2526
| dashboard_configuration.console.addr | string | `"http://127.0.0.1:3000"` | |
2627
| dashboard_configuration.database.dsn | string | `"postgres://api7ee:changeme@api7-postgresql:5432/api7ee"` | |
@@ -33,15 +34,22 @@ A Helm chart for Kubernetes
3334
| dashboard_configuration.prometheus.whitelist[2] | string | `"/api/v1/format_query"` | |
3435
| dashboard_configuration.prometheus.whitelist[3] | string | `"/api/v1/series"` | |
3536
| dashboard_configuration.prometheus.whitelist[4] | string | `"/api/v1/labels"` | |
37+
| dashboard_configuration.server.listen.disable | bool | `true` | |
3638
| dashboard_configuration.server.listen.host | string | `"0.0.0.0"` | |
3739
| dashboard_configuration.server.listen.port | int | `7080` | |
40+
| dashboard_configuration.server.tls.cert_file | string | `""` | |
41+
| dashboard_configuration.server.tls.disable | bool | `false` | |
42+
| dashboard_configuration.server.tls.host | string | `"0.0.0.0"` | |
43+
| dashboard_configuration.server.tls.key_file | string | `""` | |
44+
| dashboard_configuration.server.tls.port | int | `7443` | |
3845
| dashboard_configuration.session_options_config.same_site | string | `"lax"` | |
3946
| dashboard_configuration.session_options_config.secure | bool | `false` | |
4047
| dashboard_service.port | int | `7080` | |
48+
| dashboard_service.tlsPort | int | `7443` | |
4149
| dashboard_service.type | string | `"ClusterIP"` | |
4250
| dp_manager.image.pullPolicy | string | `"IfNotPresent"` | |
4351
| dp_manager.image.repository | string | `"api7/api7-ee-dp-manager"` | |
44-
| dp_manager.image.tag | string | `"v3.2.9.1"` | |
52+
| dp_manager.image.tag | string | `"v3.2.9.2"` | |
4553
| dp_manager.replicaCount | int | `1` | |
4654
| dp_manager_configuration.database.dsn | string | `"postgres://api7ee:changeme@api7-postgresql:5432/api7ee"` | |
4755
| dp_manager_configuration.log.level | string | `"warn"` | |

charts/api7/templates/NOTES.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
11
1. Get the application URL by running these commands:
22
{{- if contains "NodePort" .Values.dashboard_service.type }}
3-
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "api7ee3.fullname" . }})
43
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
4+
{{- if not .Values.dashboard_configuration.server.listen.disable }}
5+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "api7ee3.fullname" . }})
56
echo http://$NODE_IP:$NODE_PORT
7+
{{- end }}
8+
{{- if not .Values.dashboard_configuration.server.tls.disable }}
9+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[1].nodePort}" services {{ include "api7ee3.fullname" . }})
10+
echo https://$NODE_IP:$NODE_PORT
11+
{{- end }}
612
{{- else if contains "LoadBalancer" .Values.dashboard_service.type }}
713
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
814
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "api7ee3.fullname" . }}'
915
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "api7ee3.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
16+
{{- if not .Values.dashboard_configuration.server.listen.disable }}
1017
echo http://$SERVICE_IP:{{ .Values.dashboard_service.port }}
18+
{{- end }}
19+
{{- if not .Values.dashboard_configuration.server.tls.disable }}
20+
echo https://$SERVICE_IP:{{ .Values.dashboard_service.tlsPort }}
21+
{{- end }}
1122
{{- else if contains "ClusterIP" .Values.dashboard_service.type }}
1223
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "api7ee3.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
24+
{{- if not .Values.dashboard_configuration.server.listen.disable }}
1325
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
1426
echo "Visit http://127.0.0.1:7080 to use your application"
1527
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 7080:$CONTAINER_PORT
28+
{{- end }}
29+
{{- if not .Values.dashboard_configuration.server.tls.disable }}
30+
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[1].containerPort}")
31+
echo "Visit https://127.0.0.1:7443 to use your application"
32+
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 7443:$CONTAINER_PORT
33+
{{- end }}
1634
{{- end }}

charts/api7/templates/dashboard-deploy.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ spec:
3232
- name: config
3333
configMap:
3434
name: {{ include "api7ee3.fullname" . }}-dashboard-config
35+
{{- if .Values.dashboard.keyCertSecret }}
36+
- name: ssl
37+
secret:
38+
secretName: {{ .Values.dashboard.keyCertSecret | quote }}
39+
{{- end }}
3540
{{- if or .Values.postgresql.builtin .Values.prometheus.builtin }}
3641
initContainers:
3742
{{- if .Values.postgresql.builtin }}
@@ -57,25 +62,35 @@ spec:
5762
imagePullPolicy: {{ .Values.dashboard.image.pullPolicy }}
5863
ports:
5964
- name: http
60-
containerPort: 7080
65+
containerPort: {{ .Values.dashboard_configuration.server.listen.port }}
66+
protocol: TCP
67+
- name: https
68+
containerPort: {{ .Values.dashboard_configuration.server.tls.port }}
6169
protocol: TCP
6270
livenessProbe:
6371
httpGet:
6472
path: /healthz
65-
port: http
73+
port: {{ if not .Values.dashboard_configuration.server.listen.disable }}http{{ else }}https{{ end }}
74+
scheme: {{ if not .Values.dashboard_configuration.server.listen.disable }}HTTP{{ else }}HTTPS{{ end }}
6675
initialDelaySeconds: 1
6776
periodSeconds: 2
6877
failureThreshold: 30
6978
readinessProbe:
7079
httpGet:
7180
path: /healthz
72-
port: http
81+
port: {{ if not .Values.dashboard_configuration.server.listen.disable }}http{{ else }}https{{ end }}
82+
scheme: {{ if not .Values.dashboard_configuration.server.listen.disable }}HTTP{{ else }}HTTPS{{ end }}
7383
initialDelaySeconds: 1
7484
periodSeconds: 2
7585
failureThreshold: 30
7686
volumeMounts:
7787
- name: config
7888
mountPath: /app/conf
89+
{{- if .Values.dashboard.keyCertSecret }}
90+
- mountPath: /app/certs
91+
name: ssl
92+
readOnly: true
93+
{{- end }}
7994
resources:
8095
{{- toYaml .Values.resources | nindent 12 }}
8196

charts/api7/templates/dashboard-service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ spec:
1212
targetPort: http
1313
protocol: TCP
1414
name: http
15+
- port: {{ .Values.dashboard_service.tlsPort }}
16+
targetPort: https
17+
protocol: TCP
18+
name: https
1519

1620
selector:
1721
{{- include "api7ee3.selectorLabels" . | nindent 4 }}

charts/api7/templates/dp-manager-deploy.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ spec:
3535
initContainers:
3636
- name: wait-for-dashboard
3737
image: "{{ .Values.busybox.image.repository }}:{{ .Values.busybox.image.tag }}"
38-
command: [ 'sh', '-c', "until wget --timeout=3 -q --spider {{ include "api7ee3.fullname" . }}-dashboard:{{ .Values.dashboard_service.port }}/healthz;do echo waiting for dashboard `date`; sleep 2; done;" ]
38+
{{- if not .Values.dashboard_configuration.server.listen.disable }}
39+
command: [ 'sh', '-c', "until wget --timeout=3 -q --spider http://{{ include "api7ee3.fullname" . }}-dashboard:{{ .Values.dashboard_service.port }}/healthz;do echo waiting for dashboard `date`; sleep 2; done;" ]
40+
{{- else }}
41+
command: [ 'sh', '-c', "until wget --no-check-certificate --timeout=3 -q --spider https://{{ include "api7ee3.fullname" . }}-dashboard:{{ .Values.dashboard_service.tlsPort }}/healthz;do echo waiting for dashboard `date`; sleep 2; done;" ]
42+
{{- end }}
3943
securityContext:
4044
{{- toYaml .Values.securityContext | nindent 12 }}
4145
containers:

charts/api7/values.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44

55
dashboard:
66
replicaCount: 1
7+
# Specifies the name of Secret for dashboard TLS configuration, and files store under /app/certs directory
8+
keyCertSecret: ""
79
image:
810
repository: api7/api7-ee-3-integrated
911
pullPolicy: IfNotPresent
1012
# Overrides the image tag whose default is the chart appVersion.
11-
tag: "v3.2.9.1"
13+
tag: "v3.2.9.2"
1214

1315
dp_manager:
1416
replicaCount: 1
1517
image:
1618
repository: api7/api7-ee-dp-manager
1719
pullPolicy: IfNotPresent
1820
# Overrides the image tag whose default is the chart appVersion.
19-
tag: "v3.2.9.1"
21+
tag: "v3.2.9.2"
2022

2123
imagePullSecret: ""
2224
nameOverride: ""
@@ -47,6 +49,7 @@ securityContext: {}
4749
dashboard_service:
4850
type: ClusterIP
4951
port: 7080
52+
tlsPort: 7443
5053

5154
dp_manager_service:
5255
type: ClusterIP
@@ -120,8 +123,15 @@ postgresql:
120123
dashboard_configuration:
121124
server:
122125
listen:
126+
disable: true
123127
host: "0.0.0.0"
124128
port: 7080
129+
tls:
130+
disable: false
131+
host: "0.0.0.0"
132+
port: 7443
133+
key_file: "" # the file path of private key, (e.g. /app/certs/tls.key)
134+
cert_file: "" # the file path of certificate, (e.g. /app/certs/tls.crt)
125135
session_options_config:
126136
same_site: "lax" # means the value SameSiteNoneMode
127137
secure: false

0 commit comments

Comments
 (0)