[the-new-hotness] Add redis deployment

This PR adds redis service together with deployment config and updates the
configuration of the hotness to work with this new redis deployment.

This will now only work for the staging, but it doesn't break anything if
deployed on production.

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
This commit is contained in:
Michal Konečný 2022-05-26 14:37:17 +02:00 committed by kevin
parent a8ffd59c46
commit 37066f172f
4 changed files with 71 additions and 0 deletions

View file

@ -82,5 +82,40 @@ items:
namespace: the-new-hotness
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: the-new-hotness
service: the-new-hotness-redis
name: the-new-hotness-redis
spec:
replicas: 1 # Never change this to more or less than ONE!
selector:
app: the-new-hotness
deploymentconfig: the-new-hotness-redis
template:
metadata:
labels:
app: the-new-hotness
deploymentconfig: the-new-hotness-redis
spec:
containers:
- name: the-new-hotness-redis
image: the-new-hotness-redis:latest
resources: {}
env:
- name: REDIS_PASSWORD
value: "{{ hotness_redis_pass }}"
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- the-new-hotness-redis
from:
kind: ImageStreamTag
name: the-new-hotness-redis:latest
kind: List
metadata: {}

View file

@ -1,3 +1,4 @@
---
apiVersion: v1
items:
- apiVersion: v1
@ -6,5 +7,15 @@ items:
name: the-new-hotness
labels:
build: the-new-hotness
- apiVersion: v1
kind: ImageStream
metadata:
name: the-new-hotness-redis
spec:
tags:
- name: latest
from:
kind: DockerImage
name: gcr.io/bitnami-containers/redis:latest
kind: List
metadata: {}

View file

@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
app: the-new-hotness
name: the-new-hotness-redis
spec:
ports:
- name: 6379-tcp
port: 6379
protocol: TCP
targetPort: 6379
selector:
app: the-new-hotness
deploymentconfig: the-new-hotness-redis

View file

@ -88,6 +88,15 @@ read_timeout = 15
# that failed for any reason (e.g. read timeout, DNS error, etc)
requests_retries = 3
# Redis configuration for the-new-hotness
[consumer_config.redis]
# Hostname of the redis server
hostname = "the-new-hotness-redis.the-new-hotness.svc.cluster.local"
# Port of the redis server
port = 6379
# Password for redis server
password = "{{ hotness_redis_pass }}"
[consumer_config.bugzilla]
enabled = true
{% if env == "staging" %}