Skip to content

Commit

Permalink
Merge pull request #157 from xenit-eu/XENOPS-1187
Browse files Browse the repository at this point in the history
XENOPS-1187 flag to enable/disable Enterprise features
  • Loading branch information
maartenboonen-xenit authored Aug 8, 2024
2 parents ee031b5 + 3a06728 commit 015034a
Show file tree
Hide file tree
Showing 22 changed files with 44 additions and 105 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
chronology things are added/fixed/changed and - where possible - links to the PRs involved.

### Changes
[v0.7.1]
* add flag to enable/disable enterprise-only functionality
* remove HorizontalPodAutoscaler as it was not functional
* set postgresql default strategy to Recreate

[v0.7.0]
* rename blocked solr path to blocked paths
* rename blocked solr path to blocked paths
* split default backend and default path

[v0.6.9]
Expand Down
53 changes: 10 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ For more information take a look at

### General

#### `general.enterprise`

* Required: false
* Default: true
* Description: Whether this is an enterprise version of Alfresco. In a community version Transform Service Router,
Transform Service Shared File Storage, Clustering (replica count should always have a max of 1 for ACS pods), MQ and
Digital Workspace are disabled.


#### `general.strategy`

* Required: false
Expand Down Expand Up @@ -486,48 +495,6 @@ For more information take a look at
* Default: None
* Description: The maximum resources a pod may consume from a node

#### `acs.hpa.enabled`

* Required: false
* Default: false
* Description: Whether the ACS deployment should autoscale

#### `acs.hpa.minReplicas`

* Required: false
* Default: 1
* Description: The min ammount of replicas will run when autoscaling

#### `acs.hpa.maxReplicas`

* Required: false
* Default: 10
* Description: The max ammount of replicas will run when autoscaling

#### `acs.hpa.cpu.enabled`

* Required: false
* Default: false
* Description: whether horizontal scaling should trigger on cpu load

#### `acs.hpa.cpu.utilization`

* Required: false
* Default: 70
* Description: The CPU cutover percentage

#### `acs.hpa.memory.enabled`

* Required: false
* Default: true
* Description: whether horizontal scaling should trigger on memory load

#### `acs.hpa.memory.utilization`

* Required: false
* Default: 70
* Description: The Memory cutover percentage

#### `acs.imagePullSecrets`

* Required: false
Expand Down Expand Up @@ -1136,7 +1103,7 @@ For more information take a look at
#### `postgresql.strategy.type`

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

#### `postgresql.additionalEnvironmentVariables`
Expand Down
7 changes: 6 additions & 1 deletion xenit-alfresco/templates/acs/acs-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ data:
{{- if .Values.mq.enabled }}
GLOBAL_messaging.broker.url: 'failover:(nio://mq-service:61616)?timeout=3000&jms.useCompression=true'
{{- end }}
{{- if gt .Values.acs.replicas 1.0 }}
{{- if and (gt .Values.acs.replicas 1.0) (.Values.general.enterprise) }}
GLOBAL_alfresco.cluster.enabled: 'true'
{{- end }}
{{- if not (.Values.general.enterprise) }}
GLOBAL_local.transform.service.enabled: 'true'
GLOBAL_messaging.subsystem.autoStart: 'false'
GLOBAL_repo.event2.enabled: 'false'
{{- end}}
{{- if .Values.transformServices.enabled }}
GLOBAL_transform.service.enabled: 'true'
{{- if .Values.transformServices.transformRouter.enabled }}
Expand Down
4 changes: 4 additions & 0 deletions xenit-alfresco/templates/acs/acs-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ metadata:
labels:
app: acs
spec:
{{- if .Values.general.enterprise }}
replicas: {{ .Values.acs.replicas }}
{{- else }}
replicas: 1
{{- end }}
selector:
matchLabels:
app: acs
Expand Down
33 changes: 0 additions & 33 deletions xenit-alfresco/templates/acs/acs-hpa.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion xenit-alfresco/templates/active-mq/mq-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.mq.enabled -}}
{{- if and (.Values.mq.enabled) (.Values.general.enterprise) -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
2 changes: 1 addition & 1 deletion xenit-alfresco/templates/active-mq/mq-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.mq.enabled -}}
{{- if and (.Values.mq.enabled) (.Values.general.enterprise) -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 1 addition & 1 deletion xenit-alfresco/templates/active-mq/mq-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (not .Values.general.secrets.mq.selfManaged) (.Values.mq.enabled) }}
{{- if and (not .Values.general.secrets.mq.selfManaged) (.Values.mq.enabled) (.Values.general.enterprise) }}
{{- $secret_name := "mq-secret" }}

apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion xenit-alfresco/templates/active-mq/mq-service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.mq.enabled -}}
{{- if and (.Values.mq.enabled) (.Values.general.enterprise) -}}
apiVersion: v1
kind: Service
metadata:
Expand Down
2 changes: 1 addition & 1 deletion xenit-alfresco/templates/active-mq/network-policy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.general.networkPolicies.enabled) (.Values.mq.enabled) }}
{{- if and (.Values.general.networkPolicies.enabled) (.Values.mq.enabled) (.Values.general.enterprise) }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.digitalWorkspace.enabled -}}
{{- if and (.Values.digitalWorkspace.enabled) (.Values.general.enterprise) -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.digitalWorkspace.enabled -}}
{{- if and (.Values.digitalWorkspace.enabled) (.Values.general.enterprise) -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.digitalWorkspace.enabled -}}
{{- if and (.Values.digitalWorkspace.enabled) (.Values.general.enterprise) -}}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.sharedFileStore.enabled) (.Values.general.networkPolicies.enabled) }}
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.sharedFileStore.enabled) (.Values.general.networkPolicies.enabled) (.Values.general.enterprise) }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.sharedFileStore.enabled) -}}
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.sharedFileStore.enabled) (.Values.general.enterprise) -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.sharedFileStore.enabled) -}}
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.sharedFileStore.enabled) (.Values.general.enterprise) -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.sharedFileStore.enabled) -}}
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.sharedFileStore.enabled) (.Values.general.enterprise) -}}
apiVersion: v1
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.transformRouter.enabled) (.Values.general.networkPolicies.enabled) }}
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.transformRouter.enabled) (.Values.general.networkPolicies.enabled) (.Values.general.enterprise) }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.transformRouter.enabled) -}}
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.transformRouter.enabled) (.Values.general.enterprise) -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.transformRouter.enabled) -}}
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.transformRouter.enabled) (.Values.general.enterprise) -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.transformRouter.enabled) -}}
{{- if and (.Values.transformServices.enabled) (.Values.transformServices.transformRouter.enabled) (.Values.general.enterprise) -}}
apiVersion: v1
kind: Service
metadata:
Expand Down
13 changes: 2 additions & 11 deletions xenit-alfresco/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
general:
enterprise: true
strategy:
type: RollingUpdate
rollingUpdate:
Expand Down Expand Up @@ -44,16 +45,6 @@ acs:
requests:
memory: "2Gi"
cpu: "2"
hpa:
enabled: false
minReplicas: 1
maxReplicas: 10
cpu:
enabled: false
utilization: 70
memory:
enabled: true
utilization: 70
dbUrl: 'jdbc:postgresql://postgresql-service:5432/alfresco'
dbDriver: 'org.postgresql.Driver'
sharePort: '443'
Expand Down Expand Up @@ -146,7 +137,7 @@ postgresql:
repository: 'xenit/postgres'
tag: 'latest'
strategy:
type: RollingUpdate
type: Recreate
resources:
requests:
memory: "1Gi"
Expand Down

0 comments on commit 015034a

Please sign in to comment.