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 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: Finally, use `kubectl` to create the awx instance in your cluster:
```bash ```bash

View File

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

View File

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