Skip to content

Commit

Permalink
OPSEXP-1853: fix repository config support for insight engine (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: alxgomz <[email protected]>
  • Loading branch information
alxgomz and alxgomz authored Mar 9, 2023
1 parent f77aff3 commit 632758d
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 14 deletions.
6 changes: 3 additions & 3 deletions charts/alfresco-search-service/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 2.0.0
- name: alfresco-common
repository: https://alfresco.github.io/alfresco-helm-charts/
version: 1.0.0
digest: sha256:576d7fe1a1a2ba8c99631bdebb6a0cbfd49e2ad84fb639260ba321ddcc312220
generated: "2023-03-02T11:33:25.548227568Z"
version: 2.0.0
digest: sha256:73ceeccdb51e1b757c9e7067759f748f716667efb9084b456fad43c3367a8cec
generated: "2023-03-09T11:30:13.663069+01:00"
4 changes: 2 additions & 2 deletions charts/alfresco-search-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ keywords:
name: alfresco-search-service
sources:
- https://github.com/Alfresco/alfresco-helm-charts
version: 1.0.1
version: 1.0.2
appVersion: 2.0.6
dependencies:
- name: alfresco-insight-zeppelin
version: 2.0.0
condition: alfresco-insight-zeppelin.enabled
- name: alfresco-common
version: 1.0.0
version: 2.0.0
repository: https://alfresco.github.io/alfresco-helm-charts/
4 changes: 2 additions & 2 deletions charts/alfresco-search-service/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# alfresco-search-service

![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![AppVersion: 2.0.6](https://img.shields.io/badge/AppVersion-2.0.6-informational?style=flat-square)
![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![AppVersion: 2.0.6](https://img.shields.io/badge/AppVersion-2.0.6-informational?style=flat-square)

A Helm chart for deploying Alfresco Search Service

Expand All @@ -17,7 +17,7 @@ Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/b
| Repository | Name | Version |
|------------|------|---------|
| | alfresco-insight-zeppelin | 2.0.0 |
| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 1.0.0 |
| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.0.0 |

## Values

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: alfresco-common
repository: https://alfresco.github.io/alfresco-helm-charts/
version: 1.0.0
digest: sha256:094ae734b29e6e4735e4b6c3ad786305217cb375570a6a8518395c92f61c23bf
generated: "2023-02-28T16:18:12.814867+01:00"
version: 2.0.0
digest: sha256:04d458edc1a42ae7a4e4bc73d5872cc5cab9ef5960e5b6226af605a661bff71f
generated: "2023-03-09T11:31:57.561169+01:00"
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ sources:
appVersion: 2.0.6
dependencies:
- name: alfresco-common
version: 1.0.0
version: 2.0.0
repository: https://alfresco.github.io/alfresco-helm-charts/
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Please refer to the [documentation](https://github.com/Alfresco/acs-deployment/b

| Repository | Name | Version |
|------------|------|---------|
| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 1.0.0 |
| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.0.0 |

## Values

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@ Get Alfresco Zeppelin Host
Get Alfresco Repo Host
*/}}
{{- define "alfresco-repo-host" -}}
{{- printf "%s-%s-%s" .Release.Name .Values.repository.host "repository" -}}
{{- .Values.repository.host | default (printf "%s-repository" (include "content-services.shortname" $)) }}
{{- end -}}

{{/*
Get Alfresco Repo Port
*/}}
{{- define "alfresco-repo-port" -}}
{{- .Values.repository.port | default 80 }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ metadata:
component: zeppelin
data:
REPO_HOST: "{{ template "alfresco-repo-host" . }}"
REPO_PORT: "{{ .Values.repository.port }}"
REPO_PORT: "{{ template "alfresco-repo-port" . }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
suite: test configmaps
templates:
- config.yaml
tests:
- it: should have default port and hosts
asserts:
- equal:
path: data.REPO_HOST
value: RELEASE-NAME-alfresco-cs-repository
template: config.yaml
- equal:
path: data.REPO_PORT
value: "80"
template: config.yaml

- it: should have provided host and port
set:
repository:
host: somacshost
port: 888
asserts:
- equal:
path: data.REPO_HOST
value: somacshost
template: config.yaml
- equal:
path: data.REPO_PORT
value: "888"
template: config.yaml
26 changes: 26 additions & 0 deletions charts/alfresco-search-service/tests/resources_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
suite: test resource management
templates:
- deployment.yaml
- config.yaml
tests:
- it: should render cpu and memory limits
set:
resources:
requests:
cpu: "1"
memory: "1500Mi"
limits:
cpu: "4"
memory: "3000Mi"
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
requests:
cpu: "1"
memory: "1500Mi"
limits:
cpu: "4"
memory: "3000Mi"
template: deployment.yaml

0 comments on commit 632758d

Please sign in to comment.