Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature](WPN-287) MariaDB's password for each MariaDB #604

Open
wants to merge 1 commit into
base: WPN
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ansible/roles/wordpress-namespace/tasks/mariadb.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- tags: always
include_vars:
file : "{{ item }}"
with_items:
with_items:
- mariadb-vars.yml
- "backup-secrets-{{ inventory_deployment_stage }}.yml"

Expand All @@ -15,7 +15,7 @@
apiVersion: k8s.mariadb.com/v1alpha1
kind: MariaDB
metadata:
name: "{{ mariadb_name }}-{{ '%02d' | format(item|int) }}"
name: "{{ _mariadb_name }}"
namespace: "{{ inventory_namespace }}"
spec:
storage:
Expand All @@ -29,11 +29,13 @@
storage: 1Gi
storageClassName: "{{ storage_class_to_use }}"
rootPasswordSecretKeyRef:
name: mariadb
name: "{{ _mariadb_name }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please either put this pull request on hold, or put up a comment to explain why this task will stay red until we get https://go.epfl.ch/WPN-300 done.

key: root-password
generate: true
metrics:
enabled: true
vars:
_mariadb_name: "{{ mariadb_name }}-{{ '%02d' | format(item|int) }}"

- name: "Backup/{{ mariadb_name }} (Backups scheduling)"
with_sequence: >-
Expand All @@ -58,7 +60,7 @@
# snapshotting acitvated. This means that `.snapshot` folders
# pop up randomly in every directory, causing this error:
#
# `mariadb-dump: Got error: 1102: "Incorrect database name
# `mariadb-dump: Got error: 1102: "Incorrect database name
# '#mysql50#.snapshot'" when selecting the database`
#
# The following line works around that.
Expand Down