Skip to content

kubernetes.core.kustomize lookup: support http proxy #783

Open
@bh-tt

Description

@bh-tt
SUMMARY

Kubernetes.core.kustomize lookup does not allow setting a HTTP proxy. This means we cannot use it to run kustomize with remote (e.g. github) bases/resources, since our ansible controller is on a system without direct access to the internet. I'd like to add a proxy (or maybe http_proxy) setting to the plugin to allow setting the proxy for use with this lookup.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

kubernetes.core.kustomize

ADDITIONAL INFORMATION

It allows ansible controllers behind a http proxy to access remote kustomize bases/resources. I've looked at several alternatives:

  • using the pipe plugin, as that allows setting the HTTPS_PROXY variable, but that is not really usable as the PWD of the lookup becomes the playbook file, whereas most of our lookups will happen in roles
  • simply using ansible.builtin.command, but again that results in PWD issues
  • adding a reverse proxy (say github.example.com) to our infrastructure and directing the calls there, but that seems needlessly complicated
- name: kustomize
   ansible.builtin.set_fact:
      resources: "{{ lookup('kubernetes.core.kustomize', dir='../files/', proxy='http://proxy') }}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions