forked from oss-aspen/8Knot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds redis instance for user session data to OCP
'redis-users' service available in docker-compose definition, but explicit creation of another service for this purpose is required in the openshift resource definitions. This commit includes these definitions and sets the environment variables required so that services can access the new cache instance. Signed-off-by: James Kunstle <[email protected]>
- Loading branch information
1 parent
e00540b
commit 138c934
Showing
6 changed files
with
109 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"redis:6-el8","namespace":"openshift"},"fieldPath":"spec.template.spec.containers[?(@.name==\"redis-users\")].image","pause":"false"}]' | ||
labels: | ||
name: eightknot-redis-users | ||
app.kubernetes.io/name: eightknot-redis-users | ||
name: eightknot-redis-users | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
name: eightknot-redis-users | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
name: eightknot-redis-users | ||
spec: | ||
containers: | ||
- envFrom: | ||
- secretRef: | ||
name: eightknot-redis | ||
image: image-registry.openshift-image-registry.svc:5000/openshift/redis:6-el8 | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
failureThreshold: 3 | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
tcpSocket: | ||
port: 6379 | ||
timeoutSeconds: 1 | ||
name: eightknot-redis-users | ||
ports: | ||
- containerPort: 6379 | ||
protocol: TCP | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -i | ||
- -c | ||
- test "$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)" == "PONG" | ||
failureThreshold: 3 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
resources: | ||
limits: | ||
memory: 4Gi | ||
requests: | ||
memory: 128Mi | ||
volumeMounts: | ||
- mountPath: /var/lib/redis/data | ||
name: redis-data | ||
restartPolicy: Always | ||
volumes: | ||
- name: empty | ||
emptyDir: {} | ||
- name: redis-data | ||
persistentVolumeClaim: | ||
claimName: eightknot-redis-data | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/part-of: eightknot-app | ||
name: eightknot-redis-users | ||
spec: | ||
ports: | ||
- name: redis | ||
port: 6379 | ||
protocol: TCP | ||
targetPort: 6379 | ||
selector: | ||
name: eightknot-redis-users | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: eightknot-redis-users-data | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 4Gi | ||
volumeMode: Filesystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters