-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-2296 Review and align chart alfresco-connector-msteams with ne…
…wer principals (#159)
- Loading branch information
Showing
16 changed files
with
314 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 2.1.0 | ||
digest: sha256:fa11b87976e8340dfe349a0bc7d672c197decf3303de5bbe102c19f6216690fa | ||
generated: "2023-08-18T17:01:51.618921+02:00" | ||
version: 3.0.0 | ||
digest: sha256:d06b86767c5716a7ac02252c31125a77277bb91d6bdbb9fa1fef295c84642c32 | ||
generated: "2023-12-07T10:54:46.961503+05:30" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,7 @@ resources: | |
limits: | ||
cpu: "1" | ||
memory: "500Mi" | ||
microsoft: | ||
app: | ||
id: change_me_app_id | ||
password: change_me_app_pwd |
28 changes: 28 additions & 0 deletions
28
charts/alfresco-connector-msteams/templates/_helpers-env.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{/* | ||
Set environment variables necessary for secret | ||
*/}} | ||
{{- define "alfresco-connector-msteams.secret-msteams.env" -}} | ||
{{- $msSecret := coalesce .Values.microsoft.app.existingSecret.name (include "alfresco-connector-msteams.secret.name" .) -}} | ||
- name: MICROSOFT_APP_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ $msSecret }} | ||
key: {{ .Values.microsoft.app.existingSecret.keys.id }} | ||
- name: MICROSOFT_APP_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ $msSecret }} | ||
key: {{ .Values.microsoft.app.existingSecret.keys.password }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Set environment variables necessary for configmap | ||
*/}} | ||
{{- define "alfresco-connector-msteams.repo-msteams.env" -}} | ||
{{- $msteamsCm := coalesce .Values.repository.existingConfigMap.name (include "alfresco-connector-msteams.repo-configmap.name" .) -}} | ||
- name: ALFRESCO_BASE_URL | ||
valueFrom: | ||
configMapKeyRef: | ||
name: {{ $msteamsCm }} | ||
key: {{ .Values.repository.existingConfigMap.keys.url }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
charts/alfresco-connector-msteams/templates/configmap-repository.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{- if not .Values.repository.existingConfigMap.name -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "alfresco-connector-msteams.repo-configmap.name" . }} | ||
labels: | ||
{{- include "alfresco-connector-msteams.labels" . | nindent 4 }} | ||
data: | ||
{{- $reqmsg := "You must provide valid base URL" }} | ||
ALFRESCO_BASE_URL: {{ required $reqmsg .Values.alfresco.baseUrl | quote }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
charts/alfresco-connector-msteams/templates/secret-msteams.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- if not .Values.microsoft.app.existingSecret.name }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ template "alfresco-connector-msteams.secret.name" . }} | ||
labels: | ||
{{- include "alfresco-connector-msteams.labels" . | nindent 4 }} | ||
type: Opaque | ||
data: | ||
MICROSOFT_APP_ID: {{ .Values.microsoft.app.id | b64enc | quote }} | ||
MICROSOFT_APP_PASSWORD: {{ .Values.microsoft.app.password | b64enc | quote }} | ||
{{- end }} |
12 changes: 12 additions & 0 deletions
12
charts/alfresco-connector-msteams/templates/serviceaccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "alfresco-connector-msteams.serviceAccountName" . }} | ||
labels: | ||
{{- include "alfresco-connector-msteams.labels" . | nindent 4 }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
28 changes: 28 additions & 0 deletions
28
charts/alfresco-connector-msteams/tests/configmap-repository_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
suite: test msteams-connector configmap | ||
templates: | ||
- configmap-repository.yaml | ||
tests: | ||
- it: should test the random baseurl | ||
set: | ||
alfresco: | ||
baseUrl: htts://test-url:8800 | ||
asserts: | ||
- equal: | ||
path: data.ALFRESCO_BASE_URL | ||
value: htts://test-url:8800 | ||
- it: should render default configmaps based on values | ||
values: &testvalues | ||
- values/test_values.yaml | ||
asserts: | ||
- equal: | ||
path: data.ALFRESCO_BASE_URL | ||
value: change_me_alf_base_url | ||
- it: should not render components configmaps | ||
values: *testvalues | ||
set: | ||
repository: | ||
existingConfigMap: | ||
name: repotest | ||
asserts: | ||
- hasDocuments: | ||
count: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.