|
14 | 14 | ingressAcls: |
15 | 15 | cidrs: |
16 | 16 | - 0.0.0.0/0 |
17 | | - port: 443 |
18 | 17 | tags: [] |
19 | 18 | # Values required by this blueprint without defaults: |
20 | 19 | # providerConfigName: "example-crossplane-provider-name" |
@@ -115,6 +114,33 @@ spec: |
115 | 114 | {{- toYaml .Values.tags | nindent 6 }} |
116 | 115 | {{ end }} |
117 | 116 | targetType: ip |
| 117 | + LBListenerRedirHttps: | |
| 118 | + apiVersion: elbv2.aws.upbound.io/v1beta1 |
| 119 | + kind: LBListener |
| 120 | + metadata: |
| 121 | + labels: |
| 122 | + tv2.dk/gw: {{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }} |
| 123 | + name: gw-{{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }}-redir |
| 124 | + spec: |
| 125 | + providerConfigRef: |
| 126 | + name: {{ .Values.providerConfigName }} |
| 127 | + forProvider: |
| 128 | + region: {{ .Values.region }} |
| 129 | + port: 80 |
| 130 | + protocol: HTTP |
| 131 | + defaultAction: |
| 132 | + - type: redirect |
| 133 | + redirect: |
| 134 | + - port: "443" |
| 135 | + protocol: HTTPS |
| 136 | + statusCode: HTTP_301 |
| 137 | + loadBalancerArnSelector: |
| 138 | + matchLabels: |
| 139 | + tv2.dk/gw: {{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }} |
| 140 | + {{ if .Values.tags }} |
| 141 | + tags: |
| 142 | + {{- toYaml .Values.tags | nindent 6 }} |
| 143 | + {{ end }} |
118 | 144 | LBListener: | |
119 | 145 | apiVersion: elbv2.aws.upbound.io/v1beta1 |
120 | 146 | kind: LBListener |
@@ -221,29 +247,53 @@ spec: |
221 | 247 | tv2.dk/gw: {{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }} |
222 | 248 | toPort: 15021 |
223 | 249 | type: egress |
224 | | - SecurityGroupRuleIngress: | |
| 250 | + SecurityGroupRuleIngress80: | |
| 251 | + apiVersion: ec2.aws.upbound.io/v1beta1 |
| 252 | + kind: SecurityGroupRule |
| 253 | + metadata: |
| 254 | + labels: |
| 255 | + tv2.dk/gw: {{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }} |
| 256 | + name: gw-{{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }}-ingress80 |
| 257 | + spec: |
| 258 | + providerConfigRef: |
| 259 | + name: {{ .Values.providerConfigName }} |
| 260 | + forProvider: |
| 261 | + description: "External traffic towards ALB port 80" |
| 262 | + cidrBlocks: |
| 263 | + {{ range .Values.ingressAcls.cidrs -}} |
| 264 | + - {{ . }} |
| 265 | + {{ end }} |
| 266 | + fromPort: 80 |
| 267 | + protocol: tcp |
| 268 | + region: {{ .Values.region }} |
| 269 | + securityGroupIdSelector: |
| 270 | + matchLabels: |
| 271 | + tv2.dk/gw: {{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }} |
| 272 | + toPort: 80 |
| 273 | + type: ingress |
| 274 | + SecurityGroupRuleIngress443: | |
225 | 275 | apiVersion: ec2.aws.upbound.io/v1beta1 |
226 | 276 | kind: SecurityGroupRule |
227 | 277 | metadata: |
228 | 278 | labels: |
229 | 279 | tv2.dk/gw: {{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }} |
230 | | - name: gw-{{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }}-ingress |
| 280 | + name: gw-{{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }}-ingress443 |
231 | 281 | spec: |
232 | 282 | providerConfigRef: |
233 | 283 | name: {{ .Values.providerConfigName }} |
234 | 284 | forProvider: |
235 | | - description: "External traffic towards ALB" |
| 285 | + description: "External traffic towards ALB port 443" |
236 | 286 | cidrBlocks: |
237 | 287 | {{ range .Values.ingressAcls.cidrs -}} |
238 | 288 | - {{ . }} |
239 | 289 | {{ end }} |
240 | | - fromPort: {{ .Values.ingressAcls.port }} |
| 290 | + fromPort: 443 |
241 | 291 | protocol: tcp |
242 | 292 | region: {{ .Values.region }} |
243 | 293 | securityGroupIdSelector: |
244 | 294 | matchLabels: |
245 | 295 | tv2.dk/gw: {{ .Gateway.metadata.namespace }}-{{ .Gateway.metadata.name }} |
246 | | - toPort: {{ .Values.ingressAcls.port }} |
| 296 | + toPort: 443 |
247 | 297 | type: ingress |
248 | 298 | SecurityGroupRuleUpstreamIngress80: | |
249 | 299 | apiVersion: ec2.aws.upbound.io/v1beta1 |
|
0 commit comments