Skip to content

Commit

Permalink
OPSEXP-2116 fixup chart alfresco-connector-ms365 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
slohe1 authored Aug 1, 2023
1 parent 578c66b commit 871041b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion charts/alfresco-connector-ms365/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: alfresco-connector-ms365
description: A Helm chart for deploying Alfresco connector ms365 service
type: application
version: 0.3.2
version: 0.3.3
appVersion: "2.0.0"
dependencies:
- name: alfresco-common
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-connector-ms365/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# alfresco-connector-ms365

![Version: 0.3.2](https://img.shields.io/badge/Version-0.3.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square)
![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square)

A Helm chart for deploying Alfresco connector ms365 service

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,8 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- include "component-security-context" .Values | indent 8 }}
{{- $repo_details_cm := .Values.repository.existingConfigMap.name | default (include "alfresco-connector-ms365.fullname" .) }}
{{- $repo_url := printf "-Dalfresco.base-url=http://%s:%s" "$REPO_HOST" "$REPO_PORT" }}
{{- $repo_url := printf "-Dalfresco.base-url=http://%s:%s" "$(REPO_HOST)" "$(REPO_PORT)" }}
env:
{{- range $key, $value := (omit .Values.environment "JAVA_OPTS") }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
- name: JAVA_OPTS
value: >-
{{ (printf "%s %s" (.Values.environment.JAVA_OPTS | default "") ($repo_url)) }}
- name: REPO_HOST
valueFrom:
configMapKeyRef:
Expand All @@ -82,6 +75,13 @@ spec:
configMapKeyRef:
name: {{ $repo_details_cm }}
key: {{ .Values.repository.existingConfigMap.keys.port }}
{{- range $key, $value := (omit .Values.environment "JAVA_OPTS") }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
- name: JAVA_OPTS
value: >-
{{ (printf "%s %s" (.Values.environment.JAVA_OPTS | default "") ($repo_url)) }}
ports:
- containerPort: {{ .Values.image.internalPort }}
resources: {{- toYaml .Values.resources | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tests:
name: myns/mycm
asserts:
- equal:
path: spec.template.spec.containers[0].env[2].valueFrom.configMapKeyRef.name
path: spec.template.spec.containers[0].env[0].valueFrom.configMapKeyRef.name
value: myns/mycm
template: deployment-connector-ms365.yaml

Expand All @@ -44,8 +44,20 @@ tests:
test_data: 80
asserts:
- equal:
path: spec.template.spec.containers[0].env[0]
path: spec.template.spec.containers[0].env[2]
value:
name: test_data
value: "80"
template: deployment-connector-ms365.yaml

- it: should set environment variables correctly with quotes
set:
environment:
JAVA_OPTS: "-Xmx 2GB"
asserts:
- equal:
path: spec.template.spec.containers[0].env[2]
value:
name: JAVA_OPTS
value: "-Xmx 2GB -Dalfresco.base-url=http://$(REPO_HOST):$(REPO_PORT)"
template: deployment-connector-ms365.yaml

0 comments on commit 871041b

Please sign in to comment.