Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
f9df6920
Commit
f9df6920
authored
7 years ago
by
woopstar
Committed by
Andreas Kruger
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue front proxy certs for vault
parent
f193b120
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/kubernetes/secrets/tasks/gen_certs_vault.yml
+26
-0
26 additions, 0 deletions
roles/kubernetes/secrets/tasks/gen_certs_vault.yml
roles/vault/defaults/main.yml
+8
-0
8 additions, 0 deletions
roles/vault/defaults/main.yml
with
34 additions
and
0 deletions
roles/kubernetes/secrets/tasks/gen_certs_vault.yml
+
26
−
0
View file @
f9df6920
...
...
@@ -93,3 +93,29 @@
issue_cert_mount_path
:
"
{{
kube_vault_mount_path
}}"
with_items
:
"
{{
kube_proxy_certs_needed|d([])
}}"
when
:
inventory_hostname in groups['k8s-cluster']
# Issue front proxy cert to kube-master hosts
-
include_tasks
:
../../../vault/tasks/shared/issue_cert.yml
vars
:
issue_cert_common_name
:
"
front-proxy-client"
issue_cert_alt_names
:
"
{{
kube_cert_alt_names
}}"
issue_cert_file_group
:
"
{{
kube_cert_group
}}"
issue_cert_file_owner
:
kube
issue_cert_hosts
:
"
{{
groups['kube-master']
}}"
issue_cert_ip_sans
:
>-
[
{%- for host in groups['kube-master'] -%}
"{{ hostvars[host]['ansible_default_ipv4']['address'] }}",
{%- if hostvars[host]['ip'] is defined -%}
"{{ hostvars[host]['ip'] }}",
{%- endif -%}
{%- endfor -%}
"127.0.0.1","::1","{{ kube_apiserver_ip }}"
]
issue_cert_path
:
"
{{
item
}}"
issue_cert_role
:
front-proxy-client
issue_cert_url
:
"
{{
hostvars[groups.vault|first]['vault_leader_url']
}}"
issue_cert_mount_path
:
"
{{
kube_vault_mount_path
}}"
with_items
:
"
{{
kube_master_components_certs_needed|d([])
}}"
when
:
inventory_hostname in groups['kube-master']
notify
:
set secret_changed
This diff is collapsed.
Click to expand it.
roles/vault/defaults/main.yml
+
8
−
0
View file @
f9df6920
...
...
@@ -162,3 +162,11 @@ vault_pki_mounts:
allow_any_name
:
true
enforce_hostnames
:
false
organization
:
"
system:node-proxier"
-
name
:
front-proxy-client
group
:
k8s-cluster
password
:
"
{{
lookup('password',
'credentials/vault/kube-proxy
length=15')
}}"
policy_rules
:
default
role_options
:
allow_any_name
:
true
enforce_hostnames
:
false
organization
:
"
system:front-proxy"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment