A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://sdk.operatorframework.io/docs/building-operators/ansible/reference/proxy-vars/ below:

Proxy Friendly Operators | Operator SDK

Proxy Friendly Operators

Proxy-friendly Operators should inspect their environment for the standard proxy variables (HTTPS_PROXY, HTTP_PROXY, and NO_PROXY) and pass the values to Operands.

Example:

- name: start proxy-test job
  kubernetes.core.k8s:
    definition:
      apiVersion: batch/v1
      kind: Job
      metadata:
        name: env-job
        namespace: "{{ ansible_operator_meta.namespace }}"
      spec:
        template:
          spec:
            containers:
              - name: curl-example
                image: registry.access.redhat.com/ubi8/ubi:8.8
                command: ["curl"]
                args: ["http://example.com/job-request"]
                env:
                  - name: HTTP_PROXY
                    value: '{{ lookup("env", "HTTP_PROXY") | default("", True) }}'
                  - name: http_proxy
                    value: '{{ lookup("env", "HTTP_PROXY") | default("", True) }}'
            restartPolicy: Never
        backoffLimit: 4

You can set the environment variable on the Operator deployment. Using the memcached tutorial, edit config/manager/manager.yaml:

containers:
 - args:
   - --leader-elect
   - --leader-election-id=ansible-proxy-demo
   image: controller:latest
   name: manager
   env:
     - name: "HTTP_PROXY"
       value: "http_proxy_test"

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4