Skip to content
Snippets Groups Projects
Commit 76805b39 authored by Oleksandr Kosse (EPAM)'s avatar Oleksandr Kosse (EPAM)
Browse files

Merge branch 'GONRG-6452-redis-notification' into 'master'

Added redis service for notification in GC

See merge request !337
parents 05ad2886 ab105c90
No related branches found
No related tags found
1 merge request!337Added redis service for notification in GC
Pipeline #164308 failed
......@@ -36,7 +36,8 @@ First you need to set variables in **values.yaml** file using any code editor. S
**entitlementsHost** | entitlements service host address | string | `http://entitlements` | yes
**registerHost** | register service host address | string | `http://register` | yes
**partitionHost** | partition service host address | string | `http://partition` | yes
**redisNotificationHost** | The host for redis instance. If empty, helm installs an internal redis instance | string | `redis-ent-master` | yes
**redisNotificationPort** | The port for redis instance | digit | 6379 | yes
### Deployment variables
| Name | Description | Type | Default |Required |
......@@ -48,6 +49,7 @@ First you need to set variables in **values.yaml** file using any code editor. S
**serviceAccountName** | name of your service account | string | `notification` | yes
**imagePullPolicy** | when to pull image | string | `IfNotPresent` | yes
**image** | service image | string | - | yes
**redisImage** | redis image | string | `redis:7` | yes
### Config variables
......@@ -57,6 +59,7 @@ First you need to set variables in **values.yaml** file using any code editor. S
**configmap** | configmap to be used | string | `notification-config` | yes
**rabbitmqSecretName** | secret for rabbitmq | string | `rabbitmq-secret` | yes
**openidSecretName** | secret for openid | string | `notification-keycloak-secret` | yes
**notificationRedisSecretName** | Notification redis secret | string | `notification-redis-secret` | yes
**onPremEnabled** | whether on-prem is enabled | boolean | false | yes
**domain** | your domain, ex `example.com` | string | - | yes
......
......@@ -11,5 +11,11 @@ data:
ENTITLEMENTS_HOST: {{ .Values.data.entitlementsHost | quote}}
REGISTER_HOST: {{ .Values.data.registerHost | quote}}
PARTITION_HOST: {{ .Values.data.partitionHost | quote}}
REDIS_PORT: {{ .Values.data.redisNotificationPort | quote }}
{{- if .Values.data.redisNotificationHost }}
REDIS_HOST: {{ .Values.data.redisNotificationHost | quote }}
{{- else }}
REDIS_HOST: {{ printf "redis-%s" .Values.conf.appName | quote }}
{{- end }}
{{- if not .Values.conf.onPremEnabled }}
{{- end }}
{{ if not .Values.data.redisNotificationHost }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ printf "redis-%s" .Values.conf.appName | quote }}
namespace: {{ .Release.Namespace | quote }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ printf "redis-%s" .Values.conf.appName | quote }}
template:
metadata:
labels:
app: {{ printf "redis-%s" .Values.conf.appName | quote }}
annotations:
sidecar.istio.io/proxyCPU: 30m
spec:
containers:
- args:
- --requirepass
- $(REDIS_PASSWORD)
envFrom:
- secretRef:
name: {{ .Values.conf.notificationRedisSecretName | quote }}
image: {{ .Values.data.redisImage | quote }}
imagePullPolicy: {{ .Values.data.imagePullPolicy | quote }}
name: {{ printf "redis-%s" .Values.conf.appName | quote }}
ports:
- containerPort: 6379
protocol: TCP
resources:
requests:
memory: 100Mi
{{ end }}
......@@ -28,6 +28,8 @@ spec:
envFrom:
- configMapRef:
name: {{ .Values.conf.configmap | quote}}
- secretRef:
name: {{ .Values.conf.notificationRedisSecretName | quote }}
{{- if .Values.conf.onPremEnabled }}
- secretRef:
name: {{ .Values.conf.rabbitmqSecretName | quote}}
......
{{ if not .Values.data.redisNotificationHost }}
apiVersion: v1
kind: Service
metadata:
name: {{ printf "redis-%s" .Values.conf.appName | quote }}
namespace: {{ .Release.Namespace | quote }}
spec:
ports:
- port: {{ .Values.data.redisNotificationPort }}
protocol: TCP
targetPort: 6379
selector:
app: {{ printf "redis-%s" .Values.conf.appName | quote }}
{{ end }}
......@@ -5,6 +5,10 @@ data:
entitlementsHost: "http://entitlements"
registerHost: "http://register"
partitionHost: "http://partition"
# redis connection. Change it if you want to use external redis
redisNotificationHost: ""
redisNotificationPort: 6379
redisImage: "docker.io/library/redis:7"
#Deployments
requestsCpu: "0.1"
requestsMemory: "256M"
......@@ -19,8 +23,11 @@ conf:
appName: "notification"
rabbitmqSecretName: "rabbitmq-secret"
openidSecretName: "notification-keycloak-secret"
notificationRedisSecretName: "notification-redis-secret"
onPremEnabled: false
domain: ""
#FIXME fix condition with redis ssl configuration
# redisSSL: false
istio:
proxyCPU: "50m"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment