Skip to content

Commit

Permalink
ACS-8607: Create Helm chart for hxi-connector (#349)
Browse files Browse the repository at this point in the history
Co-authored-by: krdabrowski <[email protected]>
Co-authored-by: Giovanni Toraldo <[email protected]>
Co-authored-by: pmacius <[email protected]>
  • Loading branch information
4 people authored Sep 2, 2024
1 parent 466506c commit 94b93f3
Show file tree
Hide file tree
Showing 30 changed files with 1,343 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/alfresco-connector-hxi/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
12 changes: 12 additions & 0 deletions charts/alfresco-connector-hxi/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dependencies:
- name: alfresco-common
repository: https://alfresco.github.io/alfresco-helm-charts/
version: 3.1.3
- name: activemq
repository: https://alfresco.github.io/alfresco-helm-charts/
version: 3.5.5
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.5.6
digest: sha256:82f2c26305e35e511750f8621c60d0f222f6afad9d66e73c1cbffa17e825e425
generated: "2024-08-30T08:57:16.043350112Z"
20 changes: 20 additions & 0 deletions charts/alfresco-connector-hxi/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v2
name: alfresco-connector-hxi
description: A Helm chart for deploying Alfresco connector hxi services
type: application
version: 0.1.0-alpha.0
appVersion: 1.0.0
dependencies:
- name: alfresco-common
version: 3.1.3
repository: https://alfresco.github.io/alfresco-helm-charts/
- name: activemq
version: 3.5.5
repository: https://alfresco.github.io/alfresco-helm-charts/
tags:
- ci
- name: postgresql
version: 12.5.6
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- ci
155 changes: 155 additions & 0 deletions charts/alfresco-connector-hxi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
title: alfresco-connector-hxi
parent: Charts Reference
---

# alfresco-connector-hxi

![Version: 0.1.0-alpha.0](https://img.shields.io/badge/Version-0.1.0--alpha.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)

A Helm chart for deploying Alfresco connector hxi services

Checkout [alfresco-content-services chart's doc](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for an example of how to leverage this chart from an umbrella chart.

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://alfresco.github.io/alfresco-helm-charts/ | activemq | 3.5.5 |
| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 3.1.3 |
| oci://registry-1.docker.io/bitnamicharts | postgresql | 12.5.6 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| ats.existingConfigMap.keys.sfsUrl | string | `"SFS_URL"` | Key within the configmap holding the URL of the alfresco shared filestore |
| ats.existingConfigMap.keys.transformUrl | string | `"ATS_URL"` | Key within the configmap holding the URL of the alfresco transform |
| ats.existingConfigMap.name | string | `nil` | Alternatively, provide ATS details via an existing configmap |
| ats.sfsUrl | string | `nil` | URL of the alfresco shared filestore |
| ats.transformUrl | string | `nil` | URL of the alfresco transform (trouter or tengine-aio) |
| bulkIngester.affinity | object | `{}` | |
| bulkIngester.enabled | bool | `true` | |
| bulkIngester.environment.ALFRESCO_BULK_INGEST_PUBLISHER_ENDPOINT | string | `"activemq:queue:bulk-ingester-events"` | |
| bulkIngester.image.pullPolicy | string | `"IfNotPresent"` | |
| bulkIngester.image.repository | string | `"quay.io/alfresco/alfresco-hxinsight-connector-bulk-ingester"` | |
| bulkIngester.image.tag | string | `"1.0.0-A13"` | |
| bulkIngester.initContainers.waitForRepository.resources.limits.cpu | string | `"0.25"` | |
| bulkIngester.initContainers.waitForRepository.resources.limits.memory | string | `"10Mi"` | |
| bulkIngester.resources.limits.cpu | string | `"2"` | |
| bulkIngester.resources.limits.memory | string | `"512Mi"` | |
| bulkIngester.resources.requests.cpu | string | `"0.5"` | |
| bulkIngester.resources.requests.memory | string | `"128Mi"` | |
| db.existingConfigMap.keys.url | string | `"DATABASE_URL"` | Key within the configmap holding the full JDBC url to connect to database service |
| db.existingConfigMap.name | string | `nil` | Alternatively, provide database connection details via an existing configmap |
| db.existingSecret.keys.password | string | `"DATABASE_PASSWORD"` | Key within the secret holding the database password |
| db.existingSecret.keys.username | string | `"DATABASE_USERNAME"` | Key within the secret holding the database username |
| db.existingSecret.name | string | `nil` | Alternatively, provide database credentials via an existing secret |
| db.password | string | `nil` | The password required to access the service |
| db.url | string | `nil` | Provide the full JDBC url to connect to database service e.g.: `jdbc:postgresql://hostname:5432/database` |
| db.username | string | `nil` | The username required to access the service |
| fullnameOverride | string | `""` | |
| global.alfrescoRegistryPullSecrets | string | `"quay-registry-secret"` | |
| hxi.existingConfigMap.keys.hxAuthTokenUrl | string | `"HX_AUTH_TOKEN_URL"` | |
| hxi.existingConfigMap.keys.hxInsightIngestionUrl | string | `"HX_INSIGHT_INGESTION_URL"` | |
| hxi.existingConfigMap.keys.hxInsightPredictionsUrl | string | `"HX_INSIGHT_PREDICTIONS_URL"` | |
| hxi.existingConfigMap.name | string | `nil` | |
| hxi.existingSecret.keys.hxAppSourceId | string | `"HX_APP_SOURCE_ID"` | |
| hxi.existingSecret.keys.hxClientId | string | `"HX_CLIENT_ID"` | |
| hxi.existingSecret.keys.hxClientSecret | string | `"HX_CLIENT_SECRET"` | |
| hxi.existingSecret.keys.hxEnvKey | string | `"HX_ENV_KEY"` | |
| hxi.existingSecret.name | string | `nil` | |
| hxi.hxAppSourceId | string | `nil` | |
| hxi.hxAuthTokenUrl | string | `nil` | |
| hxi.hxClientId | string | `nil` | |
| hxi.hxClientSecret | string | `nil` | |
| hxi.hxEnvKey | string | `nil` | |
| hxi.hxInsightIngestionUrl | string | `nil` | |
| hxi.hxInsightPredictionsUrl | string | `nil` | |
| imagePullSecrets | list | `[]` | |
| liveIngester.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0] | object | `{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app.kubernetes.io/name","operator":"In","values":["{{ template \"alfresco-connector-hxi.name\" $ }}"]},{"key":"app.kubernetes.io/instance","operator":"In","values":["{{ $.Release.Name }}"]},{"key":"app.kubernetes.io/component","operator":"In","values":["{{ $.Chart.Name }}"]}]},"topologyKey":"topology.kubernetes.io/zone"},"weight":10}` | Prefer to schedule the content pod on a different zone |
| liveIngester.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[1] | object | `{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app.kubernetes.io/name","operator":"In","values":["{{ template \"alfresco-connector-hxi.name\" $ }}"]},{"key":"app.kubernetes.io/instance","operator":"In","values":["{{ $.Release.Name }}"]},{"key":"app.kubernetes.io/component","operator":"In","values":["{{ $.Chart.Name }}"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":5}` | Prefer to schedule the content pod on a different node |
| liveIngester.environment.ALFRESCO_BULKINGESTER_ENDPOINT | string | `"activemq:queue:bulk-ingester-events"` | |
| liveIngester.environment.SERVER_PORT | int | `8080` | |
| liveIngester.image.internalPort | int | `8080` | |
| liveIngester.image.pullPolicy | string | `"IfNotPresent"` | |
| liveIngester.image.repository | string | `"quay.io/alfresco/alfresco-hxinsight-connector-live-ingester"` | |
| liveIngester.image.tag | string | `"1.0.0-A13"` | |
| liveIngester.livenessProbe.httpGet.path | string | `"/actuator/health/liveness"` | |
| liveIngester.livenessProbe.httpGet.port | int | `8080` | |
| liveIngester.livenessProbe.initialDelaySeconds | int | `30` | |
| liveIngester.readinessProbe.httpGet.path | string | `"/actuator/health/readiness"` | |
| liveIngester.readinessProbe.httpGet.port | int | `8080` | |
| liveIngester.readinessProbe.initialDelaySeconds | int | `40` | |
| liveIngester.replicaCount | int | `1` | |
| liveIngester.resources.limits.cpu | string | `"2"` | |
| liveIngester.resources.limits.memory | string | `"2048Mi"` | |
| liveIngester.resources.requests.cpu | string | `"0.5"` | |
| liveIngester.resources.requests.memory | string | `"256Mi"` | |
| liveIngester.service.externalPort | int | `80` | |
| liveIngester.service.name | string | `"hxi-live-ingester-service"` | |
| liveIngester.service.type | string | `"ClusterIP"` | |
| liveIngester.strategy.rollingUpdate.maxSurge | int | `1` | |
| liveIngester.strategy.rollingUpdate.maxUnavailable | int | `0` | |
| messageBroker.existingConfigMap.keys.url | string | `"BROKER_URL"` | Key within the configmap holding the URL of the message broker |
| messageBroker.existingConfigMap.name | string | `nil` | Alternatively, provide message broker connection details via an existing configmap |
| messageBroker.existingSecret | object | `{"keys":{"password":"BROKER_PASSWORD","username":"BROKER_USERNAME"},"name":null}` | Provide connection details alternatively via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys |
| messageBroker.password | string | `nil` | Broker password |
| messageBroker.url | string | `nil` | Broker URL formatted as per: https://activemq.apache.org/failover-transport-reference |
| messageBroker.username | string | `nil` | Broker username |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| predictionApplier.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0] | object | `{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app.kubernetes.io/name","operator":"In","values":["{{ template \"alfresco-connector-hxi.name\" $ }}"]},{"key":"app.kubernetes.io/instance","operator":"In","values":["{{ $.Release.Name }}"]},{"key":"app.kubernetes.io/component","operator":"In","values":["{{ $.Chart.Name }}"]}]},"topologyKey":"topology.kubernetes.io/zone"},"weight":10}` | Prefer to schedule the content pod on a different zone |
| predictionApplier.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[1] | object | `{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app.kubernetes.io/name","operator":"In","values":["{{ template \"alfresco-connector-hxi.name\" $ }}"]},{"key":"app.kubernetes.io/instance","operator":"In","values":["{{ $.Release.Name }}"]},{"key":"app.kubernetes.io/component","operator":"In","values":["{{ $.Chart.Name }}"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":5}` | Prefer to schedule the content pod on a different node |
| predictionApplier.enabled | bool | `true` | |
| predictionApplier.environment."HYLANDEXPERIENCE.INSIGHT.PREDICTIONS.BUFFERENDPOINT" | string | `"activemq:queue:predictions-buffer"` | |
| predictionApplier.environment."HYLANDEXPERIENCE.INSIGHT.PREDICTIONS.POLLPERIODMILLIS" | int | `300000` | |
| predictionApplier.environment.SERVER_PORT | int | `8080` | |
| predictionApplier.image.internalPort | int | `8080` | |
| predictionApplier.image.pullPolicy | string | `"IfNotPresent"` | |
| predictionApplier.image.repository | string | `"quay.io/alfresco/alfresco-hxinsight-connector-prediction-applier"` | |
| predictionApplier.image.tag | string | `"1.0.0-A13"` | |
| predictionApplier.livenessProbe.httpGet.path | string | `"/actuator/health/liveness"` | |
| predictionApplier.livenessProbe.httpGet.port | int | `8080` | |
| predictionApplier.livenessProbe.initialDelaySeconds | int | `30` | |
| predictionApplier.readinessProbe.httpGet.path | string | `"/actuator/health/readiness"` | |
| predictionApplier.readinessProbe.httpGet.port | int | `8080` | |
| predictionApplier.readinessProbe.initialDelaySeconds | int | `40` | |
| predictionApplier.replicaCount | int | `1` | |
| predictionApplier.resources.limits.cpu | string | `"2"` | |
| predictionApplier.resources.limits.memory | string | `"2048Mi"` | |
| predictionApplier.resources.requests.cpu | string | `"0.5"` | |
| predictionApplier.resources.requests.memory | string | `"256Mi"` | |
| predictionApplier.service.externalPort | int | `80` | |
| predictionApplier.service.name | string | `"hxi-prediction-applier-service"` | |
| predictionApplier.service.type | string | `"ClusterIP"` | |
| predictionApplier.strategy.rollingUpdate.maxSurge | int | `1` | |
| predictionApplier.strategy.rollingUpdate.maxUnavailable | int | `0` | |
| repository.authGrantType | string | `nil` | |
| repository.authTokenUrl | string | `nil` | |
| repository.authType | string | `nil` | |
| repository.clientId | string | `nil` | |
| repository.clientSecret | string | `nil` | |
| repository.existingConfigMap.keys.authGrantType | string | `"REPOSITORY_AUTH_GRANT_TYPE"` | |
| repository.existingConfigMap.keys.authTokenUrl | string | `"REPOSITORY_AUTH_TOKEN_URL"` | |
| repository.existingConfigMap.keys.authType | string | `"REPOSITORY_AUTH_TYPE"` | |
| repository.existingConfigMap.keys.url | string | `"REPOSITORY_URL"` | Key within the configmap holding the full url to connect to the alfresco repository |
| repository.existingConfigMap.keys.versionOverride | string | `"REPOSITORY_VERSION_OVERRIDE"` | |
| repository.existingConfigMap.name | string | `nil` | Alternatively, provide repository connection details via an existing configmap |
| repository.existingSecret.keys.clientId | string | `"REPOSITORY_CLIENT_ID"` | |
| repository.existingSecret.keys.clientSecret | string | `"REPOSITORY_CLIENT_SECRET"` | |
| repository.existingSecret.keys.password | string | `"REPOSITORY_PASSWORD"` | |
| repository.existingSecret.keys.username | string | `"REPOSITORY_USERNAME"` | |
| repository.existingSecret.name | string | `nil` | |
| repository.password | string | `nil` | |
| repository.url | string | `nil` | URL of the Alfresco repository |
| repository.username | string | `nil` | |
| repository.versionOverride | string | `nil` | |
| securityContext | object | `{}` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `"alfresco-connector-hxi-sa"` | |
| tags.ci | bool | `false` | A chart tag used for Hyland's CI purpose. Do not set it to true. |
| tolerations | list | `[]` | |
23 changes: 23 additions & 0 deletions charts/alfresco-connector-hxi/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: {{ template "chart.name" . }}
parent: Charts Reference
---

{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

Checkout [alfresco-content-services chart's doc](https://github.com/Alfresco/acs-deployment/blob/master/docs/helm/README.md) for an example of how to leverage this chart from an umbrella chart.

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}
51 changes: 51 additions & 0 deletions charts/alfresco-connector-hxi/ci/default-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
liveIngester:
replicaCount: 1
resources:
requests:
cpu: "0.01"
memory: "128Mi"
limits:
cpu: "1"
memory: "500Mi"
livenessProbe: null
readinessProbe: null
bulkIngester:
resources:
requests:
cpu: "0.01"
memory: "128Mi"
limits:
cpu: "1"
memory: "1Gi"
predictionApplier:
replicaCount: 1
resources:
requests:
cpu: "0.01"
memory: "128Mi"
limits:
cpu: "1"
memory: "1Gi"
livenessProbe: null
readinessProbe: null
activemq:
fullnameOverride: activemq
resources:
requests:
cpu: "100m"
memory: "512Mi"
limits:
cpu: "1000m"
memory: "1Gi"
db:
url: jdbc:postgresql://postgresql:5432/postgres
messageBroker:
url: nio://activemq-broker:61616
repository:
url: http://repository
ats:
sfsUrl: http://alfresco-transform-services-sfs
hxi:
hxInsightPredictionsUrl: http://hxi-predictions
tags:
ci: true
16 changes: 16 additions & 0 deletions charts/alfresco-connector-hxi/templates/_helpers-env-ats.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{/*
Usage: include "alfresco-connector-hxi.sfs.cm.env" $
*/}}
{{- define "alfresco-connector-hxi.ats.cm.env" -}}
{{- $cmCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default $.Chart.Name) "ats")) "Chart" .Chart "Release" .Release }}
{{- with .Values.ats }}
{{- $cmName := coalesce .existingConfigMap.name (include "alfresco-connector-hxi.fullname" $cmCtx) }}
- name: ALFRESCO_TRANSFORM_SHAREDFILESTORE_BASEURL
valueFrom:
configMapKeyRef:
name: {{ $cmName }}
key: {{ .existingConfigMap.keys.sfsUrl }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{{/*
Usage: include "alfresco-connector-hxi.cm.env" $
*/}}
{{- define "alfresco-connector-hxi.cm.env" -}}
{{- $cmCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default $.Chart.Name) "")) "Chart" .Chart "Release" .Release }}
{{- with .Values.hxi }}
{{- $cmName := coalesce .existingConfigMap.name (include "alfresco-connector-hxi.fullname" $cmCtx ) }}
- name: AUTH_PROVIDERS_HYLANDEXPERIENCE_TOKENURI
valueFrom:
configMapKeyRef:
name: {{ $cmName }}
key: {{ .existingConfigMap.keys.hxAuthTokenUrl }}
{{- end -}}
{{- end -}}

{{/*
Usage: include "alfresco-connector-hxi.live-ingester.cm.env" $
*/}}
{{- define "alfresco-connector-hxi.live-ingester.cm.env" -}}
{{- $cmCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default $.Chart.Name) "")) "Chart" .Chart "Release" .Release }}
{{- with .Values.hxi }}
{{- $cmName := coalesce .existingConfigMap.name (include "alfresco-connector-hxi.fullname" $cmCtx ) }}
{{- include "alfresco-connector-hxi.cm.env" $ }}
- name: HYLANDEXPERIENCE_INSIGHT_INGESTION_BASEURL
valueFrom:
configMapKeyRef:
name: {{ $cmName }}
key: {{ .existingConfigMap.keys.hxInsightIngestionUrl }}
{{- end -}}
{{- end -}}

{{/*
Usage: include "alfresco-connector-hxi.prediction-applier.cm.env" $
*/}}
{{- define "alfresco-connector-hxi.prediction-applier.cm.env" -}}
{{- $cmCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default $.Chart.Name) "")) "Chart" .Chart "Release" .Release }}
{{- with .Values.hxi }}
{{- $cmName := coalesce .existingConfigMap.name (include "alfresco-connector-hxi.fullname" $cmCtx ) }}
{{- include "alfresco-connector-hxi.cm.env" $ }}
- name: HYLANDEXPERIENCE_INSIGHT_PREDICTIONS_BASEURL
valueFrom:
configMapKeyRef:
name: {{ $cmName }}
key: {{ .existingConfigMap.keys.hxInsightPredictionsUrl }}
{{- end -}}
{{- end -}}

{{/*
Usage: include "alfresco-connector-hxi.secret.env" $
*/}}
{{- define "alfresco-connector-hxi.secret.env" -}}
{{- $cmCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default $.Chart.Name) "")) "Chart" .Chart "Release" .Release }}
{{- with .Values.hxi }}
{{- $secretName := coalesce .existingSecret.name (include "alfresco-connector-hxi.fullname" $cmCtx ) }}
- name: AUTH_PROVIDERS_HYLANDEXPERIENCE_CLIENTID
valueFrom:
secretKeyRef:
name: {{ $secretName }}
key: {{ .existingSecret.keys.hxClientId }}
- name: AUTH_PROVIDERS_HYLANDEXPERIENCE_CLIENTSECRET
valueFrom:
secretKeyRef:
name: {{ $secretName }}
key: {{ .existingSecret.keys.hxClientSecret }}
- name: AUTH_PROVIDERS_HYLANDEXPERIENCE_ENVIRONMENTKEY
valueFrom:
secretKeyRef:
name: {{ $secretName }}
key: {{ .existingSecret.keys.hxEnvKey }}
- name: APPLICATION_SOURCEID
valueFrom:
secretKeyRef:
name: {{ $secretName }}
key: {{ .existingSecret.keys.hxAppSourceId }}
{{- end -}}
{{- end -}}
Loading

0 comments on commit 94b93f3

Please sign in to comment.