diff --git a/README.md b/README.md index d6bf18fb..83fc864a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/roles/installer/tasks/migrate_data.yml b/roles/installer/tasks/migrate_data.yml index ae04e8ca..59b5c744 100644 --- a/roles/installer/tasks/migrate_data.yml +++ b/roles/installer/tasks/migrate_data.yml @@ -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 diff --git a/roles/installer/templates/tower_postgres.yaml.j2 b/roles/installer/templates/tower_postgres.yaml.j2 index 5cdd17e2..c2629861 100644 --- a/roles/installer/templates/tower_postgres.yaml.j2 +++ b/roles/installer/templates/tower_postgres.yaml.j2 @@ -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'