mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 22:37:41 -02:30
redis socket support
This commit is contained in:
committed by
Ryan Petrello
parent
d58df0f34a
commit
770b457430
@@ -25,8 +25,7 @@ redis_cpu_request: 500
|
||||
|
||||
kubernetes_redis_image: "redis"
|
||||
kubernetes_redis_image_tag: "latest"
|
||||
kubernetes_redis_hostname: "localhost"
|
||||
kubernetes_redis_port: "6379"
|
||||
kubernetes_redis_config_mount_path: "/usr/local/etc/redis/redis.conf"
|
||||
|
||||
memcached_hostname: localhost
|
||||
memcached_mem_request: 1
|
||||
|
||||
@@ -205,5 +205,11 @@ data:
|
||||
USE_X_FORWARDED_PORT = True
|
||||
|
||||
AWX_CONTAINER_GROUP_DEFAULT_IMAGE = "{{ container_groups_image }}"
|
||||
BROADCAST_WEBSOCKETS_PORT = 8052
|
||||
BROADCAST_WEBSOCKETS_PROTOCOL = 'http'
|
||||
BROADCAST_WEBSOCKET_PORT = 8052
|
||||
BROADCAST_WEBSOCKET_PROTOCOL = 'http'
|
||||
|
||||
{{ kubernetes_deployment_name }}_redis_conf: |
|
||||
unixsocket /var/run/redis/redis.sock
|
||||
unixsocketperm 777
|
||||
port 0
|
||||
bind 127.0.0.1
|
||||
|
||||
@@ -12,15 +12,3 @@ DATABASES = {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
BROKER_URL = 'redis://{}:{}/'.format(
|
||||
"{{ kubernetes_redis_hostname }}",
|
||||
"{{ kubernetes_redis_port }}",)
|
||||
|
||||
CHANNEL_LAYERS = {
|
||||
'default': {'BACKEND': 'channels_redis.core.RedisChannelLayer',
|
||||
'CONFIG': {
|
||||
'hosts': [("{{ kubernetes_redis_hostname }}", {{ kubernetes_redis_port|int }})],
|
||||
'capacity': 10000,
|
||||
}}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ spec:
|
||||
service: django
|
||||
app: {{ kubernetes_deployment_name }}
|
||||
spec:
|
||||
serviceAccountName: awx
|
||||
terminationGracePeriodSeconds: 10
|
||||
{% if custom_venvs is defined %}
|
||||
{% set trusted_hosts = "" %}
|
||||
@@ -127,6 +128,9 @@ spec:
|
||||
subPath: SECRET_KEY
|
||||
readOnly: true
|
||||
|
||||
- name: {{ kubernetes_deployment_name }}-redis-socket
|
||||
mountPath: "/var/run/redis"
|
||||
|
||||
resources:
|
||||
requests:
|
||||
memory: "{{ web_mem_request }}Gi"
|
||||
@@ -170,6 +174,9 @@ spec:
|
||||
mountPath: "/etc/tower/SECRET_KEY"
|
||||
subPath: SECRET_KEY
|
||||
readOnly: true
|
||||
|
||||
- name: {{ kubernetes_deployment_name }}-redis-socket
|
||||
mountPath: "/var/run/redis"
|
||||
env:
|
||||
- name: AWX_SKIP_MIGRATIONS
|
||||
value: "1"
|
||||
@@ -197,10 +204,19 @@ spec:
|
||||
- name: {{ kubernetes_deployment_name }}-redis
|
||||
image: {{ kubernetes_redis_image }}:{{ kubernetes_redis_image_tag }}
|
||||
imagePullPolicy: Always
|
||||
args: ["/usr/local/etc/redis/redis.conf"]
|
||||
ports:
|
||||
- name: redis
|
||||
protocol: TCP
|
||||
containerPort: 6379
|
||||
volumeMounts:
|
||||
- name: {{ kubernetes_deployment_name }}-redis-config
|
||||
mountPath: "{{ kubernetes_redis_config_mount_path }}"
|
||||
subPath: redis.conf
|
||||
readOnly: true
|
||||
|
||||
- name: {{ kubernetes_deployment_name }}-redis-socket
|
||||
mountPath: "/var/run/redis"
|
||||
resources:
|
||||
requests:
|
||||
memory: "{{ redis_mem_request }}Gi"
|
||||
@@ -273,6 +289,13 @@ spec:
|
||||
- key: {{ kubernetes_deployment_name }}_nginx_conf
|
||||
path: nginx.conf
|
||||
|
||||
- name: {{ kubernetes_deployment_name }}-redis-config
|
||||
configMap:
|
||||
name: {{ kubernetes_deployment_name }}-config
|
||||
items:
|
||||
- key: {{ kubernetes_deployment_name }}_redis_conf
|
||||
path: redis.conf
|
||||
|
||||
- name: "{{ kubernetes_deployment_name }}-application-credentials"
|
||||
secret:
|
||||
secretName: "{{ kubernetes_deployment_name }}-secrets"
|
||||
@@ -289,6 +312,9 @@ spec:
|
||||
- key: secret_key
|
||||
path: SECRET_KEY
|
||||
|
||||
- name: {{ kubernetes_deployment_name }}-redis-socket
|
||||
emptyDir: {}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
Reference in New Issue
Block a user