istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/external/pypi.yaml (about)

     1  # This ServiceEntry exposes the hosts needed for Python `pip`.
     2  # After applying this file, Istio-enabled pods will be able to execute
     3  # `pip search istio`.
     4  
     5  # HTTP and TLS, the host must be specified
     6  # See https://istio.io/docs/tasks/traffic-management/egress/
     7  
     8  apiVersion: networking.istio.io/v1alpha3
     9  kind: ServiceEntry
    10  metadata:
    11    name: python-https
    12  spec:
    13    hosts:
    14    - pypi.python.org
    15    ports:
    16    - number: 443
    17      name: https
    18      protocol: HTTPS
    19  ---
    20  # pypi.python.org may 301 redirect to pypi.org, so we need this too.
    21  apiVersion: networking.istio.io/v1alpha3
    22  kind: ServiceEntry
    23  metadata:
    24    name: pypi-https
    25  spec:
    26    hosts:
    27    - pypi.org
    28    ports:
    29    - number: 443
    30      name: https
    31      protocol: HTTPS
    32  ---
    33  # pip install may fetch files from files.pythonhosted.org
    34  apiVersion: networking.istio.io/v1alpha3
    35  kind: ServiceEntry
    36  metadata:
    37    name: pythonhosted-https
    38  spec:
    39    hosts:
    40    - files.pythonhosted.org
    41    ports:
    42    - number: 443
    43      name: https
    44      protocol: HTTPS