Merge pull request #34 from tylerauerbeck/pgsql-openshift

Initial OpenShift functionality
This commit is contained in:
Jeff Geerling
2020-05-15 22:12:22 -05:00
committed by GitHub
9 changed files with 79 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
---
tower_task_privileged: false
tower_ingress_type: ingress
tower_hostname: example-tower.test
tower_secret_key: aabbcc
@@ -32,3 +35,5 @@ tower_postgres_pass: awxpass
tower_postgres_image: postgres:10
tower_postgres_storage_request: 8Gi
tower_postgres_storage_class: ''
tower_postgres_data_path: '/var/lib/postgresql/data/pgdata'

View File

@@ -43,13 +43,15 @@ spec:
secretKeyRef:
name: '{{ meta.name }}-postgres-pass'
key: password
- name: PGDATA
value: '{{ tower_postgres_data_path }}'
ports:
- containerPort: 3306
name: postgres
volumeMounts:
- name: postgres
mountPath: /var/lib/postgresql/data
subPath: data
mountPath: '{{ tower_postgres_data_path | dirname }}'
subPath: '{{ tower_postgres_data_path | dirname | basename }}'
volumeClaimTemplates:
- metadata:
name: postgres

View File

@@ -20,8 +20,10 @@ spec:
containers:
- image: '{{ tower_task_image }}'
name: tower-task
{% if tower_task_privileged == true %}
securityContext:
privileged: true
{% endif %}
command:
- /usr/bin/launch_awx_task.sh
envFrom:

View File

@@ -94,10 +94,12 @@ spec:
- port: 80
protocol: TCP
targetPort: 8052
name: http
selector:
app: tower
# Tower Ingress.
{% if 'ingress' == tower_ingress_type %}
---
apiVersion: extensions/v1beta1
kind: Ingress
@@ -113,3 +115,24 @@ spec:
backend:
serviceName: '{{ meta.name }}-service'
servicePort: 80
{% endif %}
{% if 'route' == tower_ingress_type %}
---
apiVersion: v1
kind: Route
metadata:
name: '{{ meta.name }}'
namespace: '{{ meta.namespace }}'
spec:
port:
targetPort: http
tls:
insecureEdgeTerminationPolicy: Redirect
termination: edge
to:
kind: Service
name: {{ meta.name }}-service
weight: 100
wildcardPolicy: None
{% endif %}