Skip to content

Commit ba5ab00

Browse files
authored
feat: prettier in READMEs (cloudposse/terraform-aws-components#998)
1 parent fdcd334 commit ba5ab00

File tree

2 files changed

+54
-55
lines changed

2 files changed

+54
-55
lines changed

src/CHANGELOG.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
## Changes in PR #893, components version ~v1.337.0
22

3-
- Moved `eks/echo-server` v1.147.0 to `/deprecated/eks/echo-server` for those
4-
who still need it and do not want to switch. It may later become the basis
5-
for an example app or something similar.
3+
- Moved `eks/echo-server` v1.147.0 to `/deprecated/eks/echo-server` for those who still need it and do not want to
4+
switch. It may later become the basis for an example app or something similar.
65
- Removed dependency on and connection to the `eks/alb-controller-ingress-group` component
7-
- Added liveness probe, and disabled logging of probe requests. Probe request
8-
logging can be restored by setting `livenessProbeLogging: true` in `chart_values`
9-
- This component no longer configures automatic redirects from HTTP to HTTPS. This
10-
is because for ALB controller, setting that on one ingress sets it for all
11-
ingresses in the same IngressGroup, and it is a design goal that deploying
12-
this component does not affect other Ingresses (with the obvious exception
13-
of possibly being the first to create the Application Load Balancer).
14-
- Removed from `chart_values`:`ingress.nginx.class` (was set to "nginx") and
15-
`ingress.alb.class` (was set to "alb"). IngressClass should usually not be set,
16-
as this component is intended to be used to test the defaults, including the
17-
default IngressClass. However, if you do want to set it, you can do so by
18-
setting `ingress.class` in `chart_values`.
19-
- Removed the deprecated `kubernetes.io/ingress.class` annotation by default.
20-
It can be restored by setting `ingress.use_ingress_class_annotation: true` in `chart_values`.
21-
IngressClass is now set using the preferred `ingressClassName` field of the
22-
Ingress resource.
6+
- Added liveness probe, and disabled logging of probe requests. Probe request logging can be restored by setting
7+
`livenessProbeLogging: true` in `chart_values`
8+
- This component no longer configures automatic redirects from HTTP to HTTPS. This is because for ALB controller,
9+
setting that on one ingress sets it for all ingresses in the same IngressGroup, and it is a design goal that deploying
10+
this component does not affect other Ingresses (with the obvious exception of possibly being the first to create the
11+
Application Load Balancer).
12+
- Removed from `chart_values`:`ingress.nginx.class` (was set to "nginx") and `ingress.alb.class` (was set to "alb").
13+
IngressClass should usually not be set, as this component is intended to be used to test the defaults, including the
14+
default IngressClass. However, if you do want to set it, you can do so by setting `ingress.class` in `chart_values`.
15+
- Removed the deprecated `kubernetes.io/ingress.class` annotation by default. It can be restored by setting
16+
`ingress.use_ingress_class_annotation: true` in `chart_values`. IngressClass is now set using the preferred
17+
`ingressClassName` field of the Ingress resource.

src/README.md

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
11
# Component: `eks/echo-server`
22

3-
This is copied from [cloudposse/terraform-aws-components](https://github.com/cloudposse/terraform-aws-components/tree/main/modules/echo-server).
3+
This is copied from
4+
[cloudposse/terraform-aws-components](https://github.com/cloudposse/terraform-aws-components/tree/main/modules/echo-server).
45

5-
This component installs the [Ealenn/Echo-Server](https://github.com/Ealenn/Echo-Server) to EKS clusters.
6-
The echo server is a server that sends it back to the client a JSON representation of all the data
7-
the server received, which is a combination of information sent by the client and information sent
8-
by the web server infrastructure. For further details, please consult the [Echo-Server documentation](https://ealenn.github.io/Echo-Server/).
6+
This component installs the [Ealenn/Echo-Server](https://github.com/Ealenn/Echo-Server) to EKS clusters. The echo server
7+
is a server that sends it back to the client a JSON representation of all the data the server received, which is a
8+
combination of information sent by the client and information sent by the web server infrastructure. For further
9+
details, please consult the [Echo-Server documentation](https://ealenn.github.io/Echo-Server/).
910

1011
## Prerequisites
1112

12-
Echo server is intended to provide end-to-end testing of everything needed
13-
to deploy an application or service with a public HTTPS endpoint. It uses
14-
defaults where possible, such as using the default IngressClass, in order
15-
to verify that the defaults are sufficient for a typical application.
13+
Echo server is intended to provide end-to-end testing of everything needed to deploy an application or service with a
14+
public HTTPS endpoint. It uses defaults where possible, such as using the default IngressClass, in order to verify that
15+
the defaults are sufficient for a typical application.
1616

17-
In order to minimize the impact of the echo server on the rest of the cluster,
18-
it does not set any configuration that would affect other ingresses, such
19-
as WAF rules, logging, or redirecting HTTP to HTTPS. Those settings should
20-
be configured in the IngressClass where possible.
17+
In order to minimize the impact of the echo server on the rest of the cluster, it does not set any configuration that
18+
would affect other ingresses, such as WAF rules, logging, or redirecting HTTP to HTTPS. Those settings should be
19+
configured in the IngressClass where possible.
2120

2221
Therefore, it requires several other components. At the moment, it supports 2 configurations:
2322

2423
1. ALB with ACM Certificate
25-
- AWS Load Balancer Controller (ALB) version 2.2.0 or later, with ACM certificate auto-discovery enabled
26-
- A default IngressClass, which can be provisioned by the `alb-controller` component as part of deploying
27-
the controller, or can be provisioned separately, for example by the `alb-controller-ingress-class` component.
28-
- Pre-provisioned ACM TLS certificate covering the provisioned host name (typically a wildcard certificate covering all hosts in the domain)
24+
25+
- AWS Load Balancer Controller (ALB) version 2.2.0 or later, with ACM certificate auto-discovery enabled
26+
- A default IngressClass, which can be provisioned by the `alb-controller` component as part of deploying the
27+
controller, or can be provisioned separately, for example by the `alb-controller-ingress-class` component.
28+
- Pre-provisioned ACM TLS certificate covering the provisioned host name (typically a wildcard certificate covering all
29+
hosts in the domain)
30+
2931
2. Nginx with Cert Manager Certificate
30-
- Nginx (via `kubernetes/ingress-nginx` controller). We recommend `ingress-nginx` v1.1.0 or later, but `echo-server`
31-
should work with any version that supports Ingress API version `networking.k8s.io/v1`.
32-
- `jetstack/cert-manager` configured to automatically (via Ingress Shim, installed by default) generate TLS certificates via a Cluster Issuer
33-
(by default, named `letsEncrypt-prod`).
32+
33+
- Nginx (via `kubernetes/ingress-nginx` controller). We recommend `ingress-nginx` v1.1.0 or later, but `echo-server`
34+
should work with any version that supports Ingress API version `networking.k8s.io/v1`.
35+
- `jetstack/cert-manager` configured to automatically (via Ingress Shim, installed by default) generate TLS certificates
36+
via a Cluster Issuer (by default, named `letsEncrypt-prod`).
3437

3538
In both configurations, it has these common requirements:
39+
3640
- EKS component deployed, with component name specified in `eks_component_name` (defaults to "eks/cluster")
3741
- Kubernetes version 1.19 or later
3842
- Ingress API version `networking.k8s.io/v1`
@@ -42,10 +46,9 @@ In both configurations, it has these common requirements:
4246
## Warnings
4347

4448
A Terraform plan may fail to apply, giving a Kubernetes authentication failure. This is due to a known issue with
45-
Terraform and the Kubernetes provider. During the "plan" phase Terraform gets a short-lived Kubernetes
46-
authentication token and caches it, and then tries to use it during "apply". If the token has expired by
47-
the time you try to run "apply", the "apply" will fail. The workaround is to run `terraform apply -auto-approve` without
48-
a "plan" file.
49+
Terraform and the Kubernetes provider. During the "plan" phase Terraform gets a short-lived Kubernetes authentication
50+
token and caches it, and then tries to use it during "apply". If the token has expired by the time you try to run
51+
"apply", the "apply" will fail. The workaround is to run `terraform apply -auto-approve` without a "plan" file.
4952

5053
## Usage
5154

@@ -57,6 +60,7 @@ Set `ingress_type` to "alb" if using `alb-controller` or "nginx" if using `ingre
5760

5861
Normally, you should not set the IngressClass or IngressGroup, as this component is intended to test the defaults.
5962
However, if you need to, set them in `chart_values`:
63+
6064
```yaml
6165
chart_values:
6266
ingress:
@@ -66,13 +70,11 @@ chart_values:
6670
group_name: "other-ingress-group"
6771
```
6872
69-
Note that if you follow recommendations and do not set the ingress class name,
70-
the deployed Ingress will have the ingressClassName setting injected by the
71-
Ingress controller, set to the then-current default. This means that if later
72-
you change the default IngressClass, the Ingress will be NOT be updated to use
73-
the new default. Furthermore, because of limitations in the Helm provider, this
74-
will not be detected as drift. You will need to destroy and re-deploy the
75-
echo server to update the Ingress to the new default.
73+
Note that if you follow recommendations and do not set the ingress class name, the deployed Ingress will have the
74+
ingressClassName setting injected by the Ingress controller, set to the then-current default. This means that if later
75+
you change the default IngressClass, the Ingress will be NOT be updated to use the new default. Furthermore, because of
76+
limitations in the Helm provider, this will not be detected as drift. You will need to destroy and re-deploy the echo
77+
server to update the Ingress to the new default.
7678
7779
```yaml
7880
components:
@@ -97,10 +99,10 @@ components:
9799
hostname_template: "echo.%[3]v.%[2]v.%[1]v.sample-domain.net"
98100
```
99101
100-
In rare cases where some ingress controllers do not support the `ingressClassName` field,
101-
you can restore the old `kubernetes.io/ingress.class` annotation by setting
102-
`ingress.use_ingress_class_annotation: true` in `chart_values`.
102+
In rare cases where some ingress controllers do not support the `ingressClassName` field, you can restore the old
103+
`kubernetes.io/ingress.class` annotation by setting `ingress.use_ingress_class_annotation: true` in `chart_values`.
103104

105+
<!-- prettier-ignore-start -->
104106
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
105107
## Requirements
106108

@@ -188,6 +190,8 @@ you can restore the old `kubernetes.io/ingress.class` annotation by setting
188190
| <a name="output_hostname"></a> [hostname](#output\_hostname) | Hostname of the deployed echo server |
189191
| <a name="output_metadata"></a> [metadata](#output\_metadata) | Block status of the deployed release |
190192
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
193+
<!-- prettier-ignore-end -->
191194

192195
## References
193-
* https://github.com/Ealenn/Echo-Server
196+
197+
- https://github.com/Ealenn/Echo-Server

0 commit comments

Comments
 (0)