Skip to content

Commit

Permalink
XENOPS-1187 flag that disables enterprise functionality on community …
Browse files Browse the repository at this point in the history
…version
  • Loading branch information
maartenboonen-xenit committed Aug 7, 2024
1 parent ee031b5 commit 73892ae
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 13 deletions.
9 changes: 9 additions & 0 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: false
* 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) and
Digital Workspace are disabled.


#### `general.strategy`

* Required: false
Expand Down
2 changes: 1 addition & 1 deletion xenit-alfresco/templates/acs/acs-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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 .Values.transformServices.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
2 changes: 1 addition & 1 deletion xenit-alfresco/templates/acs/acs-hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.acs.hpa.enabled }}
{{- if and (.Values.acs.hpa.enabled) (.Values.general.enterprise) }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
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: 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
1 change: 1 addition & 0 deletions xenit-alfresco/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
general:
enterprise: false
strategy:
type: RollingUpdate
rollingUpdate:
Expand Down

0 comments on commit 73892ae

Please sign in to comment.