Skip to content

Commit 4bc5ef5

Browse files
committed
add documentation for multi-cert feature
1 parent 2de8e2e commit 4bc5ef5

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

docs/guide/ingress/annotation.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ You can add kubernetes annotations to ingress and service objects to customize t
2323
|[alb.ingress.kubernetes.io/auth-session-timeout](#auth-session-timeout)|integer|604800|ingress,service|
2424
|[alb.ingress.kubernetes.io/auth-type](#auth-type)|none\|oidc\|cognito|none|ingress,service|
2525
|[alb.ingress.kubernetes.io/backend-protocol](#backend-protocol)|HTTP \| HTTPS|HTTP|ingress,service|
26-
|[alb.ingress.kubernetes.io/certificate-arn](#certificate-arn)|string|N/A|ingress|
26+
|[alb.ingress.kubernetes.io/certificate-arn](#certificate-arn)|stringList|N/A|ingress|
2727
|[alb.ingress.kubernetes.io/healthcheck-interval-seconds](#healthcheck-interval-seconds)|integer|'15'|ingress,service|
2828
|[alb.ingress.kubernetes.io/healthcheck-path](#healthcheck-path)|string|/|ingress,service|
2929
|[alb.ingress.kubernetes.io/healthcheck-port](#healthcheck-port)|integer \| traffic-port|traffic-port|ingress,service|
@@ -324,12 +324,21 @@ Health check on target groups can be controlled with following annotations:
324324
## SSL
325325
SSL support can be controlled with following annotations:
326326

327-
- <a name="certificate-arn">`alb.ingress.kubernetes.io/certificate-arn`</a> specifies the ARN of certificate managed by [AWS Certificate Manager](https://aws.amazon.com/certificate-manager)
328-
327+
- <a name="certificate-arn">`alb.ingress.kubernetes.io/certificate-arn`</a> specifies the ARN of one or more certificate managed by [AWS Certificate Manager](https://aws.amazon.com/certificate-manager)
328+
329+
!!!tip ""
330+
The first certificate in the list will be added as default certificate. And remaining certificate will be added to the optional certificate list.
331+
See [SSL Certificates](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#https-listener-certificates) for more details.
332+
329333
!!!example
330-
```
331-
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxxx:certificate/xxxxxxx
332-
```
334+
- single certificate
335+
```
336+
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxxx:certificate/xxxxxxx
337+
```
338+
- multiple certificates
339+
```
340+
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxxx:certificate/cert1,arn:aws:acm:us-west-2:xxxxx:certificate/cert2,arn:aws:acm:us-west-2:xxxxx:certificate/cert3
341+
```
333342

334343
- <a name="ssl-policy">`alb.ingress.kubernetes.io/ssl-policy`</a> specifies the [Security Policy](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) that should be assigned to the ALB, allowing you to control the protocol and ciphers.
335344

internal/alb/ls/listener_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ func TestDefaultController_Reconcile(t *testing.T) {
472472
Namespace: "namespace",
473473
Annotations: map[string]string{
474474
"alb.ingress.kubernetes.io/ssl-policy": "sslPolicy",
475-
"alb.ingress.kubernetes.io/certificate-arn": "certificateArn1,certificateArn2,certificateArn3,certificateArn4,certificateArn5",
475+
"alb.ingress.kubernetes.io/certificate-arn": "certificateArn,certificateArn4,certificateArn5",
476476
},
477477
},
478478
Spec: extensions.IngressSpec{
@@ -507,7 +507,7 @@ func TestDefaultController_Reconcile(t *testing.T) {
507507
Protocol: aws.String(elbv2.ProtocolEnumHttps),
508508
Certificates: []*elbv2.Certificate{
509509
{
510-
CertificateArn: aws.String("certificateArn1"),
510+
CertificateArn: aws.String("certificateArn"),
511511
},
512512
},
513513
SslPolicy: aws.String("sslPolicy"),
@@ -523,7 +523,7 @@ func TestDefaultController_Reconcile(t *testing.T) {
523523
LSArn: "lsArn",
524524
Certificates: []*elbv2.Certificate{
525525
{
526-
CertificateArn: aws.String("certificateArn1"),
526+
CertificateArn: aws.String("certificateArn"),
527527
IsDefault: aws.Bool(true),
528528
},
529529
{

0 commit comments

Comments
 (0)