-
Notifications
You must be signed in to change notification settings - Fork 33
/
artifactory-ha-values.yaml
144 lines (143 loc) · 5.14 KB
/
artifactory-ha-values.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
global:
jfrog:
observability:
branch: master
prometheus:
release_name: prometheus
installerInfo: '{ "productId": "Helm_prometheus_artifactory/{{ .Chart.Version }}", "features": [ { "featureId": "ArtifactoryVersion/{{ default .Chart.AppVersion .Values.artifactory.image.version }}" }, { "featureId": "{{ if .Values.postgresql.enabled }}postgresql{{ else }}{{ .Values.database.type }}{{ end }}/0.0.0" }, { "featureId": "Platform/{{ default "kubernetes" .Values.installer.platform }}" }, { "featureId": "Channel/Helm_prometheus_artifactory" } ] }'
artifactory:
# For Artifactory versions <= 7.86.x please use artifactory.openMetrics.enabled instead of artifactory.metrics.enabled
metrics:
enabled: true
customInitContainersBegin: |
- name: "prepare-fluentd-conf-on-persistent-volume"
image: {{ include "artifactory.getImageInfoByValue" (list . "initContainers") }}
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
command:
- 'sh'
- '-c'
- >
mkdir -p {{ .Values.artifactory.persistence.mountPath }}/etc/fluentd/;
curl https://raw.githubusercontent.com/jfrog/log-analytics-prometheus/{{ .Values.global.jfrog.observability.branch }}/fluent_metrics.conf.rt -o {{ .Values.artifactory.persistence.mountPath }}/etc/fluentd/fluentd.conf
volumeMounts:
- mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
name: volume
customSidecarContainers: |
- name: "artifactory-fluentd-sidecar"
image: "releases-pts-observability-fluentd.jfrog.io/fluentd:4.5"
imagePullPolicy: "IfNotPresent"
volumeMounts:
- mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
name: volume
env:
- name: JF_PRODUCT_DATA_INTERNAL
value: {{ .Values.artifactory.persistence.mountPath }}
- name: LOKI_URL
value: http://loki.{{ .Release.Namespace }}:3100
- name: FLUENTD_CONF
value: ../../../..{{ .Values.artifactory.persistence.mountPath }}/etc/fluentd/fluentd.conf
## Allows to add additional kubernetes resources
## Use --- as a separator between multiple resources
additionalResources: |
apiVersion: v1
kind: Service
metadata:
name: {{ template "artifactory-ha.fullname" . }}-metrics
annotations:
prometheus.io/path: "/artifactory/api/v1/metrics"
prometheus.io/scheme: "http"
prometheus.io/port: "24231"
prometheus.io/scrape: "true"
labels:
app: {{ template "artifactory-ha.name" . }}
chart: {{ template "artifactory-ha.chart" . }}
component: {{ template "artifactory-ha.name" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- with .Values.artifactory-ha.labels }}
{{ toYaml . | indent 4 }}
{{- end }}
spec:
type: ClusterIP
ports:
- name: metrics
port: 24231
targetPort: 8082
protocol: TCP
selector:
app: {{ template "artifactory-ha.name" . }}
component: {{ template "artifactory-ha.name" . }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: servicemonitor-{{ template "artifactory-ha.name" . }}
labels:
metrics: jfrog
app: {{ template "artifactory-ha.name" . }}
chart: {{ template "artifactory-ha.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Values.global.prometheus.release_name }}
spec:
selector:
matchLabels:
app: {{ template "artifactory-ha.name" . }}
component: {{ template "artifactory-ha.name" . }}
endpoints:
- port: metrics
scheme: http
path: /artifactory/api/v1/metrics
interval: 15s
bearerTokenSecret:
key: token
name: jfrog-admin-token
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.observability.name }}-metrics
annotations:
prometheus.io/path: "/observability/api/v1/metrics"
prometheus.io/scheme: "http"
prometheus.io/port: "24232"
prometheus.io/scrape: "true"
labels:
app: {{ .Values.observability.name }}
component: {{ .Values.observability.name }}
chart: {{ template "artifactory-ha.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Values.global.prometheus.release_name }}
spec:
type: ClusterIP
ports:
- name: metricsob
port: 24232
targetPort: 8082
protocol: TCP
selector:
app: {{ template "artifactory-ha.name" . }}
component: {{ template "artifactory-ha.name" . }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: servicemonitor-{{ .Values.observability.name }}
labels:
metrics: jfrog
app: {{ .Values.observability.name }}
chart: {{ template "artifactory-ha.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Values.global.prometheus.release_name }}
spec:
selector:
matchLabels:
app: {{ .Values.observability.name }}
component: {{ .Values.observability.name }}
endpoints:
- port: metricsob
scheme: http
path: /observability/api/v1/metrics
interval: 15s
bearerTokenSecret:
key: token
name: jfrog-admin-token