use harbor for docker and helm

This commit is contained in:
ace
2021-02-01 21:17:48 +03:00
parent 643b90eef8
commit 1b8b5973c7
13 changed files with 255 additions and 24 deletions

View File

@ -0,0 +1,25 @@
- block:
- name: Set DB namespace for secret lookup
set_fact:
db_namespace: "{{ harbor_db_namespace | default(postgres_db_namespace) | default(postgres_namespace) | default(postgres_operator_namespace) | default(namespace) }}"
- name: Set DB secret name for lookup
set_fact:
db_secret_name: "harbor.{{ postgres_db_team | default(namespace) }}-postgres.credentials.postgresql.acid.zalan.do"
- name: Lookup Harbor DB secret
set_fact:
harbor_db_secret: "{{ lookup('k8s', kind='Secret', namespace=db_namespace, resource_name=db_secret_name) }}"
- debug:
msg: "{{ harbor_db_secret }}"
verbosity: 2
- name: Set Harbor DB username
set_fact:
harbor_db_username: "{{ harbor_db_secret.data.username | b64decode }}"
- name: Set Harbor DB password
set_fact:
harbor_db_password: "{{ harbor_db_secret.data.password | b64decode }}"