Changed Trident secret and registry credentials
Changed Trident secret name from "trident-local-registry-secret" to "default-registry-key" and got registry credentials from sysinv. Closes-Bug: 1937301 Signed-off-by: Joao Victor Portal <Joao.VictorPortal@windriver.com> Change-Id: I8bc236f267b878081de2a54b701a32d60175288f
This commit is contained in:
@@ -29,7 +29,7 @@ trident_metrics_port: 8001
|
|||||||
trident_deploy_only_on_controllers: false
|
trident_deploy_only_on_controllers: false
|
||||||
|
|
||||||
trident_force_reinstall: false
|
trident_force_reinstall: false
|
||||||
trident_secret_name: "trident-local-registry-secret"
|
trident_secret_name: "default-registry-key"
|
||||||
|
|
||||||
# Extra parameters to be given to the tridentctl install command
|
# Extra parameters to be given to the tridentctl install command
|
||||||
# If you want to configure Ipv6 add "--use-ipv6" to this list
|
# If you want to configure Ipv6 add "--use-ipv6" to this list
|
||||||
|
|||||||
@@ -120,10 +120,10 @@
|
|||||||
vars:
|
vars:
|
||||||
script_content: |
|
script_content: |
|
||||||
import keyring
|
import keyring
|
||||||
password = keyring.get_password("CGCS", "admin")
|
password = keyring.get_password("sysinv", "services")
|
||||||
if not password:
|
if not password:
|
||||||
raise Exception("Local registry password not found.")
|
raise Exception("Local registry password not found.")
|
||||||
print(dict(username='admin', password=str(password)))
|
print(dict(username='sysinv', password=str(password)))
|
||||||
shell: "{{ script_content }}"
|
shell: "{{ script_content }}"
|
||||||
args:
|
args:
|
||||||
executable: /usr/bin/python
|
executable: /usr/bin/python
|
||||||
|
|||||||
@@ -56,6 +56,11 @@
|
|||||||
when: create_ns_output.rc is defined and create_ns_output.rc !=0 and
|
when: create_ns_output.rc is defined and create_ns_output.rc !=0 and
|
||||||
create_ns_output.stderr is not search('AlreadyExists')
|
create_ns_output.stderr is not search('AlreadyExists')
|
||||||
|
|
||||||
|
- name: Fail if the docker registry secret name to be used differs from default name
|
||||||
|
fail:
|
||||||
|
msg: "Trident secret name for docker registry credentials differs from default value 'default-registry-key'"
|
||||||
|
when: trident_secret_name != "default-registry-key"
|
||||||
|
|
||||||
- name: Check if secret exists
|
- name: Check if secret exists
|
||||||
command: kubectl -n {{ trident_namespace }} get secret {{ trident_secret_name }}
|
command: kubectl -n {{ trident_namespace }} get secret {{ trident_secret_name }}
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user