...

Text file src/github.com/emissary-ingress/emissary/v3/python/tests/manifests.py

Documentation: github.com/emissary-ingress/emissary/v3/python/tests

     1httpbin_manifests = """
     2---
     3apiVersion: v1
     4kind: Service
     5metadata:
     6  name: httpbin
     7spec:
     8  type: ClusterIP
     9  selector:
    10    service: httpbin
    11  ports:
    12  - port: 80
    13    targetPort: http
    14---
    15apiVersion: apps/v1
    16kind: Deployment
    17metadata:
    18  name: httpbin
    19spec:
    20  replicas: 1
    21  selector:
    22    matchLabels:
    23      service: httpbin
    24  template:
    25    metadata:
    26      labels:
    27        service: httpbin
    28    spec:
    29      containers:
    30      - name: httpbin
    31        image: kennethreitz/httpbin
    32        ports:
    33        - name: http
    34          containerPort: 80
    35"""
    36
    37qotm_manifests = """
    38---
    39apiVersion: v1
    40kind: Service
    41metadata:
    42  name: qotm
    43spec:
    44  selector:
    45    service: qotm
    46  ports:
    47    - port: 80
    48      targetPort: http-api
    49---
    50apiVersion: apps/v1
    51kind: Deployment
    52metadata:
    53  name: qotm
    54spec:
    55  selector:
    56    matchLabels:
    57      service: qotm
    58  replicas: 1
    59  strategy:
    60    type: RollingUpdate
    61  template:
    62    metadata:
    63      annotations:
    64        sidecar.istio.io/inject: "false"
    65      labels:
    66        service: qotm
    67    spec:
    68      serviceAccountName: ambassador
    69      containers:
    70      - name: qotm
    71        image: docker.io/datawire/qotm:1.3
    72        ports:
    73        - name: http-api
    74          containerPort: 5000
    75"""
    76
    77
    78# This is a little weird -- you need to fill in the '%s' with the namespace
    79# you want before you use 'format' to fill in other things from 'self'.
    80cleartext_host_manifest = """
    81---
    82apiVersion: getambassador.io/v3alpha1
    83kind: Host
    84metadata:
    85  name: cleartext-host-{self.path.k8s}
    86  labels:
    87    scope: AmbassadorTest
    88  namespace: %s
    89spec:
    90  ambassador_id: [ "{self.ambassador_id}" ]
    91  hostname: "*"
    92  acmeProvider:
    93    authority: none
    94  requestPolicy:
    95    insecure:
    96      action: Route
    97"""
    98
    99# This is a little weird -- there are several things to fill in before you
   100# use 'format' to fill in other things from 'self'.
   101default_listener_manifest = """
   102---
   103apiVersion: getambassador.io/v3alpha1
   104kind: Listener
   105metadata:
   106  name: listener-%(port)s-{self.path.k8s}
   107  labels:
   108    scope: AmbassadorTest
   109  namespace: %(namespace)s
   110spec:
   111  ambassador_id: [ "{self.ambassador_id}" ]
   112  port: %(port)d
   113  protocol: %(protocol)s
   114  securityModel: %(securityModel)s
   115  hostBinding:
   116    namespace:
   117      from: ALL
   118"""

View as plain text