|
| 1 | +# This file contains the base resources that most conformance tests will rely |
| 2 | +# on. This includes 4 namespaces along with Server and Client Deployments in |
| 3 | +# each of them that can be used as backends and probes for testing traffic. |
| 4 | +# Create 4 namespaces |
| 5 | +apiVersion: v1 |
| 6 | +kind: Namespace |
| 7 | +metadata: |
| 8 | + name: network-policy-conformance-gryffindor |
| 9 | + labels: |
| 10 | + conformance-house: gryffindor |
| 11 | +--- |
| 12 | +apiVersion: v1 |
| 13 | +kind: Namespace |
| 14 | +metadata: |
| 15 | + name: network-policy-conformance-slytherin |
| 16 | + labels: |
| 17 | + conformance-house: slytherin |
| 18 | +--- |
| 19 | +apiVersion: v1 |
| 20 | +kind: Namespace |
| 21 | +metadata: |
| 22 | + name: network-policy-conformance-hufflepuff |
| 23 | + labels: |
| 24 | + conformance-house: hufflepuff |
| 25 | +--- |
| 26 | +apiVersion: v1 |
| 27 | +kind: Namespace |
| 28 | +metadata: |
| 29 | + name: network-policy-conformance-ravenclaw |
| 30 | + labels: |
| 31 | + conformance-house: ravenclaw |
| 32 | +# Create 4 deployments; 2 pods each under these namespaces |
| 33 | +--- |
| 34 | +apiVersion: apps/v1 |
| 35 | +kind: StatefulSet |
| 36 | +metadata: |
| 37 | + name: harry-potter |
| 38 | + namespace: network-policy-conformance-gryffindor |
| 39 | +spec: |
| 40 | + selector: |
| 41 | + matchLabels: |
| 42 | + conformance-house: gryffindor |
| 43 | + replicas: 2 |
| 44 | + template: |
| 45 | + metadata: |
| 46 | + labels: |
| 47 | + conformance-house: gryffindor |
| 48 | + spec: |
| 49 | + containers: |
| 50 | + - name: harry-potter-client |
| 51 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 52 | + - name: harry-potter-80 |
| 53 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 54 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --tcp --http=false --port 80"] |
| 55 | + - name: harry-potter-8080 |
| 56 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 57 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --tcp --http=false --port 8080"] |
| 58 | + - name: harry-potter-5353 |
| 59 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 60 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --udp --http=false --port 5353"] |
| 61 | + - name: harry-potter-53 |
| 62 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 63 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --udp --http=false --port 53"] |
| 64 | + - name: harry-potter-9003 |
| 65 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 66 | + command: ["/bin/bash", "-c", "/agnhost porter"] |
| 67 | + env: |
| 68 | + - name: SERVE_SCTP_PORT_9003 |
| 69 | + value: "foo" |
| 70 | + - name: harry-potter-9005 |
| 71 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 72 | + command: ["/bin/bash", "-c", "/agnhost porter"] |
| 73 | + env: |
| 74 | + - name: SERVE_SCTP_PORT_9005 |
| 75 | + value: "foo" |
| 76 | +--- |
| 77 | +apiVersion: apps/v1 |
| 78 | +kind: StatefulSet |
| 79 | +metadata: |
| 80 | + name: draco-malfoy |
| 81 | + namespace: network-policy-conformance-slytherin |
| 82 | +spec: |
| 83 | + selector: |
| 84 | + matchLabels: |
| 85 | + conformance-house: slytherin |
| 86 | + replicas: 2 |
| 87 | + template: |
| 88 | + metadata: |
| 89 | + labels: |
| 90 | + conformance-house: slytherin |
| 91 | + spec: |
| 92 | + containers: |
| 93 | + - name: draco-malfoy-client |
| 94 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 95 | + - name: draco-malfoy-80 |
| 96 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 97 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --tcp --http=false --port 80"] |
| 98 | + - name: draco-malfoy-8080 |
| 99 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 100 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --tcp --http=false --port 8080"] |
| 101 | + - name: draco-malfoy-5353 |
| 102 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 103 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --udp --http=false --port 5353"] |
| 104 | + - name: draco-malfoy-53 |
| 105 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 106 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --udp --http=false --port 53"] |
| 107 | + - name: draco-malfoy-9003 |
| 108 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 109 | + command: ["/bin/bash", "-c", "/agnhost porter"] |
| 110 | + env: |
| 111 | + - name: SERVE_SCTP_PORT_9003 |
| 112 | + value: "foo" |
| 113 | + - name: draco-malfoy-9005 |
| 114 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 115 | + command: ["/bin/bash", "-c", "/agnhost porter"] |
| 116 | + env: |
| 117 | + - name: SERVE_SCTP_PORT_9005 |
| 118 | + value: "foo" |
| 119 | +--- |
| 120 | +apiVersion: apps/v1 |
| 121 | +kind: StatefulSet |
| 122 | +metadata: |
| 123 | + name: cedric-diggory |
| 124 | + namespace: network-policy-conformance-hufflepuff |
| 125 | +spec: |
| 126 | + selector: |
| 127 | + matchLabels: |
| 128 | + conformance-house: hufflepuff |
| 129 | + replicas: 2 |
| 130 | + template: |
| 131 | + metadata: |
| 132 | + labels: |
| 133 | + conformance-house: hufflepuff |
| 134 | + spec: |
| 135 | + containers: |
| 136 | + - name: cedric-diggory-client |
| 137 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 138 | + - name: cedric-diggory-80 |
| 139 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 140 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --tcp --http=false --port 80"] |
| 141 | + - name: cedric-diggory-8080 |
| 142 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 143 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --tcp --http=false --port 8080"] |
| 144 | + - name: cedric-diggory-5353 |
| 145 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 146 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --udp --http=false --port 5353"] |
| 147 | + - name: cedric-diggory-53 |
| 148 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 149 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --udp --http=false --port 53"] |
| 150 | + - name: cedric-diggory-9003 |
| 151 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 152 | + command: ["/bin/bash", "-c", "/agnhost porter"] |
| 153 | + env: |
| 154 | + - name: SERVE_SCTP_PORT_9003 |
| 155 | + value: "foo" |
| 156 | + - name: cedric-diggory-9005 |
| 157 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 158 | + command: ["/bin/bash", "-c", "/agnhost porter"] |
| 159 | + env: |
| 160 | + - name: SERVE_SCTP_PORT_9005 |
| 161 | + value: "foo" |
| 162 | +--- |
| 163 | +apiVersion: apps/v1 |
| 164 | +kind: StatefulSet |
| 165 | +metadata: |
| 166 | + name: luna-lovegood |
| 167 | + namespace: network-policy-conformance-ravenclaw |
| 168 | +spec: |
| 169 | + selector: |
| 170 | + matchLabels: |
| 171 | + conformance-house: ravenclaw |
| 172 | + replicas: 2 |
| 173 | + template: |
| 174 | + metadata: |
| 175 | + labels: |
| 176 | + conformance-house: ravenclaw |
| 177 | + spec: |
| 178 | + containers: |
| 179 | + - name: luna-lovegood-client |
| 180 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 181 | + - name: luna-lovegood-80 |
| 182 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 183 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --tcp --http=false --port 80"] |
| 184 | + - name: luna-lovegood-8080 |
| 185 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 186 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --tcp --http=false --port 8080"] |
| 187 | + - name: luna-lovegood-5353 |
| 188 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 189 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --udp --http=false --port 5353"] |
| 190 | + - name: luna-lovegood-53 |
| 191 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 192 | + command: ["/bin/bash", "-c", "/agnhost serve-hostname --udp --http=false --port 53"] |
| 193 | + - name: luna-lovegood-9003 |
| 194 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 195 | + command: ["/bin/bash", "-c", "/agnhost porter"] |
| 196 | + env: |
| 197 | + - name: SERVE_SCTP_PORT_9003 |
| 198 | + value: "foo" |
| 199 | + - name: luna-lovegood-9005 |
| 200 | + image: registry.k8s.io/e2e-test-images/agnhost:2.43 |
| 201 | + command: ["/bin/bash", "-c", "/agnhost porter"] |
| 202 | + env: |
| 203 | + - name: SERVE_SCTP_PORT_9005 |
| 204 | + value: "foo" |
0 commit comments