Merge pull request #144 from rooftopcellist/more_unique_pg_pod

Name pg pod in a more unique way
This commit is contained in:
Shane McDonald
2021-03-25 11:20:14 -04:00
committed by GitHub
3 changed files with 8 additions and 6 deletions

View File

@@ -62,6 +62,8 @@ metadata:
name: awx
```
> The metadata.name you provide, will be the name of the resulting AWX deployment. If you deploy more than one to the same namespace, be sure to use unique names.
Finally, use `kubectl` to create the awx instance in your cluster:
```bash

View File

@@ -13,7 +13,7 @@
kind: Pod
namespace: '{{ meta.namespace }}'
label_selectors:
- "app={{ deployment_type }}-postgres"
- "app={{ meta.name }}-{{ deployment_type }}-postgres"
register: postgres_pod
until: "postgres_pod['resources'][0]['status']['phase'] == 'Running'"
delay: 5

View File

@@ -6,11 +6,11 @@ metadata:
name: '{{ meta.name }}-postgres'
namespace: '{{ meta.namespace }}'
labels:
app: '{{ deployment_type }}-postgres'
app: '{{ meta.name }}-{{ deployment_type }}-postgres'
spec:
selector:
matchLabels:
app: '{{ deployment_type }}-postgres'
app: '{{ meta.name }}-{{ deployment_type }}-postgres'
serviceName: '{{ meta.name }}'
replicas: 1
updateStrategy:
@@ -18,7 +18,7 @@ spec:
template:
metadata:
labels:
app: '{{ deployment_type }}-postgres'
app: '{{ meta.name }}-{{ deployment_type }}-postgres'
spec:
containers:
- image: '{{ tower_postgres_image }}'
@@ -71,10 +71,10 @@ metadata:
name: '{{ meta.name }}-postgres'
namespace: '{{ meta.namespace }}'
labels:
app: '{{ deployment_type }}-postgres'
app: '{{ meta.name }}-{{ deployment_type }}-postgres'
spec:
ports:
- port: 5432
clusterIP: None
selector:
app: '{{ deployment_type }}-postgres'
app: '{{ meta.name }}-{{ deployment_type }}-postgres'