Skip to content

Commit

Permalink
Enforce root component's enabled value (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackrh authored Mar 4, 2024
1 parent 03aa912 commit bd5f3e8
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/keep/templates/backend-hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.backend.autoscaling.enabled }}
{{- if and .Values.backend.enabled .Values.backend.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/keep/templates/backend-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.backend.ingress.enabled -}}
{{- if and .Values.backend.enabled .Values.backend.ingress.enabled -}}
{{- $fullName := include "keep.fullname" . -}}
{{- $svcPort := .Values.backend.service.port -}}
{{- if and .Values.backend.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
Expand Down
2 changes: 1 addition & 1 deletion charts/keep/templates/backend-route.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.backend.route.enabled -}}
{{- if and .Values.backend.enabled .Values.backend.route.enabled -}}
{{- $fullName := include "keep.fullname" . -}}
apiVersion: route.openshift.io/v1
kind: Route
Expand Down
2 changes: 1 addition & 1 deletion charts/keep/templates/frontend-hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.frontend.autoscaling.enabled }}
{{- if and .Values.frontend.enabled .Values.frontend.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/keep/templates/frontend-ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.frontend.ingress.enabled -}}
{{- if and .Values.frontend.enabled .Values.frontend.ingress.enabled -}}
{{- $fullName := include "keep.fullname" . -}}
{{- $svcPort := .Values.frontend.service.port -}}
{{- if and .Values.frontend.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
Expand Down
2 changes: 1 addition & 1 deletion charts/keep/templates/frontend-route.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.frontend.route.enabled -}}
{{- if and .Values.frontend.enabled .Values.frontend.route.enabled -}}
{{- $fullName := include "keep.fullname" . -}}
apiVersion: route.openshift.io/v1
kind: Route
Expand Down
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-backend-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.backend.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -15,3 +16,4 @@ spec:
selector:
{{- include "keep.selectorLabels" . | nindent 4 }}
keep-component: backend
{{- end }}
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-backend.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.backend.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -85,3 +86,4 @@ spec:
volumes:
- name: state-volume
emptyDir: {}
{{- end }}
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-db-pv.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.database.enabled -}}
apiVersion: v1
kind: PersistentVolume
metadata:
Expand All @@ -11,3 +12,4 @@ spec:
storageClassName: {{ .Values.database.storageClasss }}
hostPath:
path: "/var/lib/mysql"
{{- end }}
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-db-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.database.enabled -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -9,3 +10,4 @@ spec:
resources:
requests:
storage: 5Gi
{{- end }}
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-db-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.database.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -15,3 +16,4 @@ spec:
selector:
{{- include "keep.selectorLabels" . | nindent 4 }}
keep-component: database
{{- end }}
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-db.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.database.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -66,3 +67,4 @@ spec:
- name: {{ include "keep.fullname" . }}-pv
persistentVolumeClaim:
claimName: {{ include "keep.fullname" . }}-pvc
{{- end }}
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-frontend-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.frontend.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -15,3 +16,4 @@ spec:
selector:
{{- include "keep.selectorLabels" . | nindent 4 }}
keep-component: frontend
{{- end}}
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-frontend.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.frontend.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -73,3 +74,4 @@ spec:
volumes:
- name: state-volume
emptyDir: {}
{{- end }}
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-websocket-server-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.websocket.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -15,3 +16,4 @@ spec:
selector:
{{- include "keep.selectorLabels" . | nindent 4 }}
keep-component: websocket
{{- end}}
2 changes: 2 additions & 0 deletions charts/keep/templates/keep-websocket-server.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.websocket.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -73,3 +74,4 @@ spec:
volumes:
- name: state-volume
emptyDir: {}
{{- end}}

0 comments on commit bd5f3e8

Please sign in to comment.