Skip to content

Commit

Permalink
OPSEXP-1855 Fix activemq service selector construction (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn authored Feb 20, 2023
1 parent 9d7e7c6 commit 41eb02b
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/activemq/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords:
name: activemq
sources:
- https://github.com/Alfresco/alfresco-helm-charts
version: 3.0.0
version: 3.0.1
dependencies:
- name: alfresco-common
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion charts/activemq/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# activemq

![Version: 3.0.0](https://img.shields.io/badge/Version-3.0.0-informational?style=flat-square) ![AppVersion: 5.17.1](https://img.shields.io/badge/AppVersion-5.17.1-informational?style=flat-square)
![Version: 3.0.1](https://img.shields.io/badge/Version-3.0.1-informational?style=flat-square) ![AppVersion: 5.17.1](https://img.shields.io/badge/AppVersion-5.17.1-informational?style=flat-square)

A Helm chart providing a basic Apache ActiveMQ deployment required to evaluate ACS (not meant to be used in production).

Expand Down
3 changes: 1 addition & 2 deletions charts/activemq/templates/svc-activemq-broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ spec:
name: amqp
protocol: TCP
selector:
app: {{ template "activemq.fullname" . }}
release: {{ .Release.Name }}
{{- include "activemq.selectorLabels" . | nindent 4 }}
3 changes: 1 addition & 2 deletions charts/activemq/templates/svc-activemq-web-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ spec:
name: web-console
protocol: TCP
selector:
app: {{ template "activemq.fullname" . }}
release: {{ .Release.Name }}
{{- include "activemq.selectorLabels" . | nindent 4 }}
2 changes: 1 addition & 1 deletion charts/activemq/tests/deployment-activemq_test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
suite: test activemq persistence
suite: test activemq deployment
templates:
- deployment-activemq.yaml
tests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tests:
sizeLimit: 20Gi
name: data
template: deployment-activemq.yaml

- it: should render a deployment with set claim
set:
persistence:
Expand All @@ -27,6 +28,7 @@ tests:
spec.template.spec.volumes[0].persistentVolumeClaim.claimName
value: mysfsvolume
template: deployment-activemq.yaml

- it: should render a deployment with dynamic claim name
set:
persistence:
Expand All @@ -44,6 +46,7 @@ tests:
- isNull:
path: spec.storageClassName
template: pvc-activemq.yaml

- it: should render a deployment with provided storage class
set:
persistence:
Expand Down
20 changes: 20 additions & 0 deletions charts/activemq/tests/svc-activemq_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
suite: test activemq services
templates:
- svc-activemq-broker.yaml
- svc-activemq-web-console.yaml
tests:
- it: should use the default service name
asserts:
- equal:
path: spec.selector
value:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: activemq
template: svc-activemq-broker.yaml
- equal:
path: spec.selector
value:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: activemq
template: svc-activemq-web-console.yaml

0 comments on commit 41eb02b

Please sign in to comment.