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

add disable_local_ca_jwt param in k8s auth config #489

Merged
merged 1 commit into from
Sep 6, 2024
Merged
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
5 changes: 5 additions & 0 deletions ansible/modules/hashivault/hashivault_k8s_auth_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
description:
- Optional JWT issuer. If no issuer is specified, then this plugin will use kubernetes.io/serviceaccount as
the default issuer (Available in hvac 0.10.2).
disable_local_ca_jwt:
description:
- Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod.
extends_documentation_fragment: hashivault
'''
EXAMPLES = '''
Expand All @@ -57,6 +60,7 @@ def main():
argspec['kubernetes_ca_cert'] = dict(required=False, type='str', default=None)
argspec['pem_keys'] = dict(required=False, type='list', default=None)
argspec['issuer'] = dict(required=False, type='str', default=None)
argspec['disable_local_ca_jwt'] = dict(required=False, type='bool', default=False)
required_together = [['kubernetes_host', 'kubernetes_ca_cert']]

module = hashivault_init(argspec, supports_check_mode=True, required_together=required_together)
Expand All @@ -78,6 +82,7 @@ def hashivault_k8s_auth_config(module):
desired_state['token_reviewer_jwt'] = params.get('token_reviewer_jwt')
desired_state['kubernetes_ca_cert'] = params.get('kubernetes_ca_cert')
desired_state['pem_keys'] = params.get('pem_keys')
desired_state['disable_local_ca_jwt'] = params.get('disable_local_ca_jwt')
if params.get('issuer'):
desired_state['issuer'] = params.get('issuer')
desired_state['mount_point'] = mount_point
Expand Down
Loading