Skip to content

Commit

Permalink
OPSEXP-2296 base_url refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
slohe1 committed Dec 18, 2023
1 parent 4334f40 commit 8288228
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/alfresco-connector-msteams/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: alfresco-connector-msteams
description: A Helm chart for deploying Alfresco connector msteams service
type: application
version: 0.2.1
version: 0.2.0-alpha-0
appVersion: "2.0.0"
dependencies:
- name: alfresco-common
Expand Down
5 changes: 4 additions & 1 deletion charts/alfresco-connector-msteams/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# alfresco-connector-msteams

![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-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.2.0-alpha-0](https://img.shields.io/badge/Version-0.2.0--alpha--0-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 msteams service

Expand Down Expand Up @@ -38,6 +38,9 @@ A Helm chart for deploying Alfresco connector msteams service
| readinessProbe.periodSeconds | int | `60` | |
| readinessProbe.timeoutSeconds | int | `10` | |
| replicaCount | int | `2` | |
| repository.existingConfigMap.keys.url | string | `"ALFRESCO_BASE_URL"` | Key within the configmap holding the full url to connect to the alfresco repository |
| repository.existingConfigMap.name | string | `nil` | Alternatively, provide repository connection details via an existing configmap |
| repository.url | string | `nil` | URL of the Alfresco repository |
| resources.limits.cpu | string | `"1"` | |
| resources.limits.memory | string | `"1000Mi"` | |
| resources.requests.cpu | string | `"0.5"` | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{- if not .Values.repository.existingConfigMap.name -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -18,3 +20,4 @@ data:
TEAMS_CHAT_FILENAME_ENABLED: "{{ .Values.teams.chat.filenameEnabled }}"
TEAMS_CHAT_METADATA_ENABLED: "{{ .Values.teams.chat.metadataEnabled }}"
TEAMS_CHAT_IMAGE_ENABLED: "{{ .Values.teams.chat.imageEnabled }}"
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ spec:
template:
metadata:
annotations:
{{- if not .Values.repository.existingConfigMap }}
checksum/config: {{ include (print $.Template.BasePath "/config-connector-msteams.yaml") . | sha256sum }}
{{- end }}
labels:
{{- include "alfresco-connector-msteams.selectorLabels" . | nindent 8 }}
spec:
Expand Down Expand Up @@ -61,6 +63,15 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- include "alfresco-common.component-security-context" .Values | indent 8 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- $msteams_details_cm := .Values.repository.existingConfigMap.name | default (print (include "alfresco-connector-msteams.fullname" .) "-configmap") }}
env:
- name: ALFRESCO_BASE_URL
valueFrom:
configMapKeyRef:
name: {{ $msteams_details_cm }}
key: {{ .Values.repository.existingConfigMap.keys.url }}
envFrom:
- configMapRef:
name: {{ template "alfresco-connector-msteams.fullname" . }}
Expand Down
11 changes: 11 additions & 0 deletions charts/alfresco-connector-msteams/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,14 @@ serviceAccount:
# -- The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: msteams-sa
repository:
# -- URL of the Alfresco repository
url: null
existingConfigMap:
# -- Alternatively, provide repository connection details via an existing
# configmap
name: null
keys:
# -- Key within the configmap holding the full url to connect to the
# alfresco repository
url: ALFRESCO_BASE_URL

0 comments on commit 8288228

Please sign in to comment.