Skip to content

Commit c74cff9

Browse files
author
Alexander Rogalskiy
committed
Updates on files
1 parent 2cece68 commit c74cff9

File tree

7 files changed

+76
-3
lines changed

7 files changed

+76
-3
lines changed

charts/templates/clusterrole.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ metadata:
77
namespace: {{ .Release.Namespace | quote }}
88
labels:
99
{{- include "backend-java-patterns.labels" . | nindent 4 }}
10+
{{- if .Values.general.labels }}
11+
{{- with .Values.general.labels }}
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
14+
{{- end }}
15+
{{- if .Values.general.annotations }}
16+
{{- with .Values.general.annotations }}
17+
annotations:
18+
{{- toYaml . | indent 4 }}
19+
{{- end }}
20+
{{- end }}
1021
rules:
1122
- apiGroups: ["certificates.k8s.io"]
1223
resources: ["certificatesigningrequests"]

charts/templates/clusterrolebinding.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,26 @@ metadata:
88
namespace: {{ .Release.Namespace | quote }}
99
labels:
1010
{{- include "backend-java-patterns.labels" . | nindent 4 }}
11+
labels:
12+
{{- include "backend-java-patterns.labels" . | nindent 4 }}
13+
{{- if .Values.general.labels }}
14+
{{- with .Values.general.labels }}
15+
{{- toYaml . | nindent 4 }}
16+
{{- end }}
17+
{{- end }}
18+
{{- if .Values.general.annotations }}
19+
{{- with .Values.general.annotations }}
20+
annotations:
21+
{{- toYaml . | indent 4 }}
22+
{{- end }}
23+
{{- end }}
1124
roleRef:
1225
apiGroup: rbac.authorization.k8s.io
1326
kind: ClusterRole
1427
name: {{ $fullName }}
1528
subjects:
16-
- kind: ServiceAccount
29+
- apiGroup: ""
30+
kind: ServiceAccount
1731
name: {{ $serviceAccountName }}
1832
namespace: {{ .Release.Namespace | quote }}
1933
{{- end }}

charts/templates/deployment.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ spec:
117117
add:
118118
- NET_BIND_SERVICE
119119
{{- end }}
120+
{{- if .Values.general.lifecycleHooks }}
121+
lifecycle:
122+
{{- toYaml .Values.general.lifecycleHooks | nindent 12 }}
123+
{{- end }}
120124
ports:
121125
- name: http
122126
containerPort: {{ .Values.service.httpPort | default 8000 }}
@@ -132,6 +136,15 @@ spec:
132136
hostPort: {{ .Values.tls.hostPort }}
133137
{{- end }}
134138
{{- end }}
139+
envFrom:
140+
{{- if .Values.general.extraEnvVars }}
141+
- configMapRef:
142+
name: {{ .Values.general.extraEnvVars }}
143+
{{- end }}
144+
{{- if .Values.general.extraEnvVarsSecret }}
145+
- secretRef:
146+
name: {{ .Values.general.extraEnvVarsSecret }}
147+
{{- end }}
135148
env:
136149
{{- if .Values.general.debug}}
137150
- name: DEBUG

charts/templates/role.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ metadata:
77
namespace: {{ .Release.Namespace | quote }}
88
labels:
99
{{- include "backend-java-patterns.labels" . | nindent 4 }}
10+
{{- if .Values.general.labels }}
11+
{{- with .Values.general.labels }}
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
14+
{{- end }}
15+
{{- if .Values.general.annotations }}
16+
{{- with .Values.general.annotations }}
17+
annotations:
18+
{{- toYaml . | indent 4 }}
19+
{{- end }}
20+
{{- end }}
1021
rules:
1122
- apiGroups:
1223
- ""

charts/templates/rolebinding.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,26 @@ metadata:
88
namespace: {{ .Release.Namespace | quote }}
99
labels:
1010
{{- include "backend-java-patterns.labels" . | nindent 4 }}
11+
labels:
12+
{{- include "backend-java-patterns.labels" . | nindent 4 }}
13+
{{- if .Values.general.labels }}
14+
{{- with .Values.general.labels }}
15+
{{- toYaml . | nindent 4 }}
16+
{{- end }}
17+
{{- end }}
18+
{{- if .Values.general.annotations }}
19+
{{- with .Values.general.annotations }}
20+
annotations:
21+
{{- toYaml . | indent 4 }}
22+
{{- end }}
23+
{{- end }}
1124
roleRef:
1225
apiGroup: rbac.authorization.k8s.io
1326
kind: Role
1427
name: {{ $fullName }}
1528
subjects:
16-
- kind: ServiceAccount
29+
- apiGroup: ""
30+
kind: ServiceAccount
1731
name: {{ $serviceAccountName }}
1832
namespace: {{ .Release.Namespace | quote }}
1933
{{- end }}

charts/templates/servicemonitor.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ metadata:
2424
{{- end }}
2525
spec:
2626
endpoints:
27-
- port: metrics
27+
- targetPort: {{ .Values.serviceMonitor.targetPort }}
28+
# port: metrics
29+
{{- if .Values.serviceMonitor.path }}
30+
path: {{ .Values.serviceMonitor.path }}
31+
{{- end }}
2832
path: /metrics
2933
interval: 30s
3034
{{- if .Values.serviceMonitor.interval }}

charts/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,12 @@ serviceMonitor:
560560
##
561561
enabled: false
562562

563+
## @param serviceMonitor.path The path for service metrics
564+
## e.g:
565+
## namespace: metrics
566+
##
567+
path: "/metrics"
568+
563569
## @param serviceMonitor.namespace The namespace in which the ServiceMonitor will be created
564570
## e.g:
565571
## namespace: monitoring

0 commit comments

Comments
 (0)