mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-07 09:27:38 -02:30
Use dedicated front-proxy-ca for front-proxy-client
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
create_mount_max_lease_ttl: "{{ item.max_lease_ttl }}"
|
||||
create_mount_description: "{{ item.description }}"
|
||||
create_mount_cert_dir: "{{ item.cert_dir }}"
|
||||
create_mount_config_ca_needed: item.name != vault_pki_mounts.kube.name
|
||||
create_mount_config_ca_needed: item.name != vault_pki_mounts.kube.name and item.name != vault_pki_mounts.front_proxy.name
|
||||
with_items:
|
||||
- "{{ vault_pki_mounts.vault }}"
|
||||
- "{{ vault_pki_mounts.etcd }}"
|
||||
- "{{ vault_pki_mounts.kube }}"
|
||||
- "{{ vault_pki_mounts.front_proxy }}"
|
||||
|
||||
@@ -35,6 +35,14 @@
|
||||
gen_ca_copy_group: "kube-master"
|
||||
when: inventory_hostname in groups.vault
|
||||
|
||||
- include_tasks: ../shared/gen_ca.yml
|
||||
vars:
|
||||
gen_ca_cert_dir: "{{ vault_pki_mounts.front_proxy.cert_dir }}"
|
||||
gen_ca_mount_path: "{{ vault_pki_mounts.front_proxy.name }}"
|
||||
gen_ca_vault_headers: "{{ vault_headers }}"
|
||||
gen_ca_vault_options: "{{ vault_ca_options.front_proxy }}"
|
||||
when: inventory_hostname in groups.vault
|
||||
|
||||
- include_tasks: ../shared/auth_backend.yml
|
||||
vars:
|
||||
auth_backend_description: A Username/Password Auth Backend primarily used for services needing to issue certificates
|
||||
@@ -47,6 +55,7 @@
|
||||
- "{{ vault_pki_mounts.vault }}"
|
||||
- "{{ vault_pki_mounts.etcd }}"
|
||||
- "{{ vault_pki_mounts.kube }}"
|
||||
- "{{ vault_pki_mounts.front_proxy }}"
|
||||
loop_control:
|
||||
loop_var: mount
|
||||
when: inventory_hostname in groups.vault
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
# issue_cert_alt_name: Requested Subject Alternative Names, in a list.
|
||||
# issue_cert_common_name: Common Name included in the cert
|
||||
# issue_cert_copy_ca: Copy issuing CA cert needed
|
||||
# issue_cert_ca_filename: Filename for copied issuing CA cert (default ca.pem)
|
||||
# issue_cert_dir_mode: Mode of the placed cert directory
|
||||
# issue_cert_file_group: Group of the placed cert file and directory
|
||||
# issue_cert_file_mode: Mode of the placed cert file
|
||||
@@ -100,7 +101,7 @@
|
||||
- name: issue_cert | Copy issuing CA cert
|
||||
copy:
|
||||
content: "{{ issue_cert_result['json']['data']['issuing_ca'] }}\n"
|
||||
dest: "{{ issue_cert_path | dirname }}/ca.pem"
|
||||
dest: "{{ issue_cert_path | dirname }}/{{ issue_cert_ca_filename | default('ca.pem') }}"
|
||||
group: "{{ issue_cert_file_group | d('root' )}}"
|
||||
mode: "{{ issue_cert_file_mode | d('0644') }}"
|
||||
owner: "{{ issue_cert_file_owner | d('root') }}"
|
||||
|
||||
Reference in New Issue
Block a user