Skip to content
Snippets Groups Projects
Commit 9d9127ce authored by OZGCloud's avatar OZGCloud
Browse files

OZG-1928: intelliform adapter component fix, fix instance value in helpers...

OZG-1928: intelliform adapter component fix, fix instance value in helpers tpl, fix tests by adding the scrapedisabled value
parent 126d1c1f
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@
{{/* Default Labels: Helm recommended best-practice labels https://helm.sh/docs/chart_best_practices/labels/ */}}
{{- define "app.defaultLabels" }}
app.kubernetes.io/instance: {{ include "app.name" . }}
app.kubernetes.io/instance: afm-adapter
app.kubernetes.io/managed-by: {{ include "app.managedBy" . }}
app.kubernetes.io/name: {{ include "app.name" . }}
app.kubernetes.io/part-of: kop
......
......@@ -21,7 +21,7 @@ spec:
metadata:
labels:
{{- include "app.defaultLabels" . | indent 8 }}
component: intelliform-adapter
component: afm-adapter
spec:
topologySpreadConstraints:
- maxSkew: 1
......
......@@ -8,10 +8,12 @@ templates:
- templates/service.yaml
tests:
- it: check default labels
set:
scrapeMetricsDisabled: false
asserts:
- equal:
path: metadata.labels.[app.kubernetes.io/instance]
value: intelliform-adapter
value: afm-adapter
- equal:
path: metadata.labels.[app.kubernetes.io/name]
value: intelliform-adapter
......
......@@ -6,6 +6,8 @@ templates:
- templates/service_monitor.yaml
tests:
- it: should have the label component with value afm-adapter-service-monitor attached
set:
scrapeMetricsDisabled: false
asserts:
- isKind:
of: ServiceMonitor
......@@ -14,6 +16,7 @@ tests:
value: afm-adapter-service-monitor
- it: should have the metrics endpoint configured by default
set:
scrapeMetricsDisabled: false
env.springProfiles: oc,stage
asserts:
- isKind:
......@@ -35,16 +38,22 @@ tests:
port: metrics
path: /actuator/prometheus
- it: namespace selector should contain the namespace
set:
scrapeMetricsDisabled: false
asserts:
- contains:
path: spec.namespaceSelector.matchNames
content: sh-helm-test
- it: selector should contain the component label with the value afm-adapter-service
set:
scrapeMetricsDisabled: false
asserts:
- equal:
path: spec.selector.matchLabels.[component]
value: afm-adapter-service
- it: selector should contain helm recommended labels name and namespace
set:
scrapeMetricsDisabled: false
asserts:
- equal:
path: spec.selector.matchLabels.[app.kubernetes.io/name]
......
......@@ -29,6 +29,8 @@ tests:
count: 1
any: true
- it: ports should contain the metrics port
set:
scrapeMetricsDisabled: false
asserts:
- contains:
path: spec.ports
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment