mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 06:12:54 +00:00
Initial commit.
This commit is contained in:
32
roles/tower/README.md
Normal file
32
roles/tower/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
Tower
|
||||
=======
|
||||
|
||||
This role builds and maintains an Ansible Tower instance inside of Kubernetes.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
TODO.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
TODO.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
N/A
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
roles:
|
||||
- tower
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
MIT / BSD
|
||||
2
roles/tower/defaults/main.yml
Normal file
2
roles/tower/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# defaults file for tower
|
||||
19
roles/tower/meta/main.yml
Normal file
19
roles/tower/meta/main.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
galaxy_info:
|
||||
author: Jeff Geerling
|
||||
description: Tower role for Tower Operator for Kubernetes.
|
||||
company: Midwestern Mac, LLC
|
||||
|
||||
license: MIT
|
||||
|
||||
min_ansible_version: 2.8
|
||||
|
||||
galaxy_tags:
|
||||
- tower
|
||||
- awx
|
||||
- ansible
|
||||
- automation
|
||||
- ci
|
||||
- cd
|
||||
- deployment
|
||||
|
||||
dependencies: []
|
||||
8
roles/tower/tasks/main.yml
Normal file
8
roles/tower/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Ensure configured Tower Postgres resources exist in the cluster.
|
||||
k8s:
|
||||
definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
- tower_postgres_secret.yaml.j2
|
||||
- tower_postgres_statefulset.yaml.j2
|
||||
- tower_postgres_service.yaml.j2
|
||||
8
roles/tower/templates/tower_postgres_secret.yaml.j2
Normal file
8
roles/tower/templates/tower_postgres_secret.yaml.j2
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: '{{ meta.name }}-postgres-pass'
|
||||
namespace: {{ meta.namespace }}
|
||||
data:
|
||||
password: {{ tower_postgres_pass | b64encode }}
|
||||
14
roles/tower/templates/tower_postgres_service.yaml.j2
Normal file
14
roles/tower/templates/tower_postgres_service.yaml.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: '{{ meta.name }}-postgres'
|
||||
namespace: '{{ meta.namespace }}'
|
||||
labels:
|
||||
app: tower-postgres
|
||||
spec:
|
||||
ports:
|
||||
- port: 5432
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: tower-postgres
|
||||
50
roles/tower/templates/tower_postgres_statefulset.yaml.j2
Normal file
50
roles/tower/templates/tower_postgres_statefulset.yaml.j2
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: '{{ meta.name }}-postgres'
|
||||
namespace: '{{ meta.namespace }}'
|
||||
labels:
|
||||
app: tower-postgres
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tower-postgres
|
||||
serviceName: '{{ meta.name }}'
|
||||
replicas: 1
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tower-postgres
|
||||
spec:
|
||||
containers:
|
||||
- image: '{{ mariadb_image }}'
|
||||
name: postgres
|
||||
env:
|
||||
- name: POSTGRES_DB
|
||||
value: awx
|
||||
- name: POSTGRES_USER
|
||||
value: awx
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ meta.name }}-postgres-pass'
|
||||
key: password
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
name: postgres
|
||||
volumeMounts:
|
||||
- name: postgres
|
||||
mountPath: /var/lib/postgresql/data
|
||||
subPath: data
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: postgres
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: '{{ tower_postgres_storage_request }}'
|
||||
Reference in New Issue
Block a user