Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XEN-2322 add ooi deployment #9

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,83 @@ For more information take a look at
*
#### `syncService.resources.limits`

* Required: false
* Default: None
* Description: The maximum resources a pod may consume from a node### Sync Service

### Office Online Integration(OOI)

#### `ooi.enabled`

* Required: false
* Default: `false`
* Description: Enable or disable the Office Online Integration

#### `ooi.replicaCount`

* Required: false
* Default: `1`
* Description: The number of pods that will be running

#### `ooi.image.repository`

* Required: false
* Default: `quay.io/alfresco/alfresco-ooi-service:1.1.2`
* Description: The repository of the docker image that will be used

#### `ooi.image.pullPolicy`

* Required: false
* Default: `IfNotPresent`
* Description: Specify when the pods should pull the image from the repositories

#### `ooi.strategy.type`

* Required: false
* Default: `RollingUpdate`
* Description: Can be set to `Recreate` if you want all your pods to be killed before new ones are created

#### `ooi.additionalEnvironmentVariables`

* Required: false
* Default: None
* Example:
```
environmentVariable1Key: environmentVariable1Value
environmentVariable2Key: environmentVariable2Value
```
* Description: With this list of parameters you can add 1 or multiple environment variables that will be passed to the docker container. These will be stored in a config and are hence not safe for sensitive information

#### `ooi.podAnnotations`

* Required: false
* Default: None
* Example:
```
annotation1Key: annotation1Value
annotation2Key: annotation2Value
```
* Description: With this list of parameters you can add 1 or multiple annotations to the Office Online Integration deployment

#### `ooi.serviceAccount`

* Required: false
* Default: None
* Description: If your pods need to run with a service account you can specify that here. Please note that you are yourself responsible to create the serviceAccount referenced in the namespace of this helm chart
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all other deployment have it , so I followed the same principle


#### `ooi.resources.requests`

* Required: false
* Default:
```
requests:
memory: "128Mi"
cpu: "100m"
```
* Description: The resources a node should keep reserved for your pod
*
#### `ooi.resources.limits`

* Required: false
* Default: None
* Description: The maximum resources a pod may consume from a node
Expand Down
6 changes: 3 additions & 3 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ entries:
xenit-alfresco:
- apiVersion: v2
appVersion: 0.1.0
created: "2022-06-24T15:08:52.4568838+01:00"
created: "2022-06-28T12:45:20.5600186+01:00"
description: A Helm chart for Alfresco
digest: 02eac06dfdeef04f1ef7313b7cc74f9a59a09d9618edc549be23adf32ff453c2
digest: f81327db3092e250a812dc082b7f5f1a4850311fc7866ef8e9291d8b84da3c6a
name: xenit-alfresco
type: application
urls:
- https://xenit-eu.github.io/xenit-k8s-alfresco/xenit-alfresco-0.1.0.tgz
version: 0.1.0
generated: "2022-06-24T15:08:52.4552647+01:00"
generated: "2022-06-28T12:45:20.5569236+01:00"
Binary file modified xenit-alfresco-0.1.0.tgz
Binary file not shown.
9 changes: 9 additions & 0 deletions xenit-alfresco/templates/ingress/alfresco-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ spec:
port:
number: 30300
{{- end }}
{{- if .Values.ooi.enabled }}
- path: /ooi-service
pathType: Prefix
backend:
service:
name: ooi-service
port:
number: 30500
{{- end }}
{{- if .Values.syncService.enabled }}
- host: {{ required "If sync Services are enabled a specific host for sync services must be specified in values.ingress.syncServiceHost" .Values.ingress.syncServiceHost }}
http:
Expand Down
14 changes: 14 additions & 0 deletions xenit-alfresco/templates/ooi/ooi-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.ooi.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: ooi-configmap
namespace: {{ .Release.Namespace | quote }}
labels:
app: ooi
data:
JAVA_OPTS: "-Xms256m -Xmx512m -Dalfresco.base-url={{ .Values.ingress.protocol }}://{{ .Values.ingress.host }}"
{{- if .Values.ooi.additionalEnvironmentVariables }}
{{ toYaml .Values.ooi.additionalEnvironmentVariables | nindent 2 }}
{{- end }}
{{- end }}
75 changes: 75 additions & 0 deletions xenit-alfresco/templates/ooi/ooi-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{{- if .Values.ooi.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: ooi
namespace: {{ .Release.Namespace | quote }}
annotations:
{{- include "globalPodAnnotations" . | indent 4 }}
{{- if .Values.ooi.podAnnotations }}
{{ toYaml .Values.ooi.podAnnotations | nindent 4 }}
{{- end }}
labels:
app: ooi
spec:
replicas: {{ .Values.ooi.replicaCount }}
selector:
matchLabels:
app: ooi
strategy:
{{- if eq .Values.ooi.strategy.type "Recreate" }}
type: {{ .Values.ooi.strategy.type }}
{{- else }}
{{ toYaml .Values.general.strategy | nindent 4 }}
{{- end }}
{{- if .Values.ooi.serviceAccount }}
serviceAccountName: {{ .Values.ooi.serviceAccount }}
{{- end }}
template:
metadata:
labels:
app: ooi
spec:
containers:
- name: ooi-container
image: {{ .Values.ooi.image.repository }}
imagePullPolicy: {{ .Values.ooi.image.pullPolicy | default "IfNotPresent" }}
livenessProbe:
tcpSocket:
port: 9095
failureThreshold: 1
initialDelaySeconds: 10
periodSeconds: 20
successThreshold: 1
timeoutSeconds: 10
readinessProbe:
tcpSocket:
port: 9095
failureThreshold: 1
initialDelaySeconds: 20
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 10
envFrom:
- configMapRef:
name: ooi-configmap
ports:
- containerPort: 9095
protocol: TCP
{{- if or (.Values.ooi.resources.requests) ((.Values.ooi.resources.limits)) }}
resources:
{{- if .Values.ooi.resources.requests }}
requests:
{{ toYaml .Values.ooi.resources.requests | nindent 14 }}
{{- end }}
{{- if .Values.ooi.resources.limits }}
limits:
{{ toYaml .Values.ooi.resources.limits | nindent 14 }}
{{- end }}
{{- end }}
imagePullSecrets:
- name: alfrescocred
{{- if .Values.general.imagePullSecrets}}
{{ toYaml .Values.general.imagePullSecrets | nindent 8 }}
{{- end }}
{{- end }}
17 changes: 17 additions & 0 deletions xenit-alfresco/templates/ooi/ooi-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.ooi.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: ooi-service
namespace: {{ .Release.Namespace | quote }}
spec:
selector:
app: ooi
ports:
- protocol: TCP
port: 30500
targetPort: 9095
{{- if .Values.general.serviceType }}
type: {{ .Values.general.serviceType }}
{{- end }}
{{- end }}
14 changes: 13 additions & 1 deletion xenit-alfresco/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,19 @@ syncService:
requests:
memory: "512Mi"
cpu: "0.5"


ooi:
enabled: false
replicaCount: 1
image:
repository: 'quay.io/alfresco/alfresco-ooi-service:1.1.2'
strategy:
type: RollingUpdate
resources:
requests:
memory: "128Mi"
cpu: "100m"

persistentStorage:
alfresco:
enabled: true
Expand Down