Skip to content

Commit

Permalink
GDB-7986: Added feature toggles
Browse files Browse the repository at this point in the history
- `cluster.jobs.createCluster.enabled`
- `cluster.jobs.patchCluster.enabled`
- `cluster.jobs.scaleCluster.enabled`
- `headlessService.enabled`
- `proxy.service.enabled`
- `proxy.headlessService.enabled`
  • Loading branch information
mihailradkov committed Apr 10, 2024
1 parent 12e22f7 commit 0a21342
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ TODO: decide how detailed we want this to be
- Added `ports` mappings in each service
- Added `extraContainerPorts` and `proxy.extraContainerPorts`
- Added `imagePullPolicy` to the jobs containers
- Added feature toggles
- `cluster.jobs.createCluster.enabled`
- `cluster.jobs.patchCluster.enabled`
- `cluster.jobs.scaleCluster.enabled`
- `headlessService.enabled`
- `proxy.service.enabled`
- `proxy.headlessService.enabled`

### Updates

Expand Down
2 changes: 1 addition & 1 deletion templates/graphdb/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ data:
{{- if gt (int .Values.replicas) 1 }}
-Dgraphdb.auth.token.secret={{ .Values.cluster.clusterSecret | quote }}
{{- end }}
{{ default .Values.configuration.javaArguments}}
{{ .Values.configuration.javaArguments }}
2 changes: 2 additions & 0 deletions templates/graphdb/service-headless.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.headlessService.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -26,3 +27,4 @@ spec:
targetPort: rpc
protocol: TCP
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion templates/jobs/configmap-cluster-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and (gt (int .Values.replicas) 1) (not .Values.cluster.existingConfig) }}
{{- if and .Values.cluster.jobs.createCluster.enabled (gt (int .Values.replicas) 1) (not .Values.cluster.existingConfig) }}
# Default configuration map for provisioning the GraphDB cluster configuration.
# To change it, prepare another configuration map and update "graphdb.configs.clusterConfig"
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion templates/jobs/job-create-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if gt (int .Values.replicas) 1 }}
{{- if and .Values.cluster.jobs.createCluster.enabled (gt (int .Values.replicas) 1) }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/jobs/job-patch-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if gt (int .Values.replicas) 1 }}
{{- if and .Values.cluster.jobs.patchCluster.enabled (gt (int .Values.replicas) 1) }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
2 changes: 2 additions & 0 deletions templates/jobs/job-scale-down-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.cluster.jobs.scaleCluster.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down Expand Up @@ -62,3 +63,4 @@ spec:
- name: graphdb-utils
configMap:
name: {{ include "graphdb.fullname.configmap.utils" . }}
{{- end }}
2 changes: 1 addition & 1 deletion templates/jobs/job-scale-up-cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if gt (int .Values.replicas) 1 }}
{{- if and .Values.cluster.jobs.scaleCluster.enabled (gt (int .Values.replicas) 1) }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/proxy/service-headless.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if gt (int .Values.replicas) 1 }}
{{- if and .Values.proxy.headlessService.enabled (gt (int .Values.replicas) 1) }}
apiVersion: v1
kind: Service
metadata:
Expand Down
2 changes: 1 addition & 1 deletion templates/proxy/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if gt (int .Values.replicas) 1 }}
{{- if and .Values.proxy.service.enabled (gt (int .Values.replicas) 1) }}
apiVersion: v1
kind: Service
metadata:
Expand Down
17 changes: 17 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@ cluster:
transactionLogMaximumSizeGB: 50
# The amount of time in milliseconds a follower node would wait before attempting to verify the last committed entry when the first verification is unsuccessful.
verificationTimeout: 1500
# Jobs configurations for to the cluster automation
jobs:
createCluster:
# Enables or disables the cluster creation Job
enabled: true
patchCluster:
# Enables or disables the Job for patching the cluster configuration
enabled: true
scaleCluster:
# Enables or disables the Jobs for scaling up or down the cluster
enabled: true

##########################
# Ingress Configurations #
Expand Down Expand Up @@ -183,6 +194,8 @@ ingress:
##########################

headlessService:
# Enables or disables the headless Service deployment
enabled: true
# Extra labels to append to the headless service
labels: {}
# Extra annotations to append to the service
Expand Down Expand Up @@ -424,6 +437,8 @@ proxy:

# GraphDB cluster proxy service configurations
service:
# Enables or disables the Service deployment
enabled: true
# Extra labels to append to the service
labels: {}
# Extra annotations to append to the service
Expand All @@ -440,6 +455,8 @@ proxy:

# GraphDB cluster proxy headless service configurations
headlessService:
# Enables or disables the headless Service deployment
enabled: true
# Extra labels to append to the headless service
labels: {}
# Extra annotations to append to the service
Expand Down

0 comments on commit 0a21342

Please sign in to comment.