Skip to content

Commit

Permalink
Merge pull request #1370 from ThatsMrTalbot/fix/revert-gateway-v1
Browse files Browse the repository at this point in the history
Revert "Update docs to reference gateway api v1"
  • Loading branch information
jetstack-bot authored Dec 20, 2023
2 parents 2d46841 + ffc73af commit 6091138
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 39 deletions.
10 changes: 5 additions & 5 deletions content/docs/configuration/acme/http01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ feature flag to the cert-manager controller.
To install v1.5.1 Gateway API bundle (Gateway CRDs and webhook), run the following command:

```sh
kubectl apply -f "https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml"
kubectl apply -f "https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.5.1/standard-install.yaml"
```

To enable the feature in cert-manager, turn on the `GatewayAPI` feature gate:
Expand Down Expand Up @@ -279,7 +279,7 @@ does not edit Gateway resources.
For example, the following Gateway will allow the Issuer to solve the challenge:

```yaml
apiVersion: gateway.networking.k8s.io/v1
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: traefik
Expand Down Expand Up @@ -324,7 +324,7 @@ spec:
You will see an HTTPRoute appear:

```yaml
apiVersion: gateway.networking.k8s.io/v1
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: HTTPRoute
metadata:
name: cm-acme-http-solver-gdhvg
Expand All @@ -337,9 +337,9 @@ spec:
hostnames:
- example.net
rules:
- backendRefs:
- forwardTo:
- port: 8089
name: cm-acme-http-solver-gdhvg
serviceName: cm-acme-http-solver-gdhvg
weight: 1
matches:
- path:
Expand Down
72 changes: 38 additions & 34 deletions content/docs/usage/gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Annotated Gateway resource
description: 'cert-manager usage: Kubernetes Gateways'
---

> **apiVersion:** gateway.networking.k8s.io/v1
> **apiVersion:** gateway.networking.k8s.io/v1alpha2
> **kind:** Gateway
<div style={{textAlign: "center"}}>
Expand All @@ -23,7 +23,7 @@ HTTP-01](../configuration/acme/http01/README.md).

<div className="info">

🚧 cert-manager 1.14+ is tested with v1 Kubernetes Gateway API. It should also work
🚧 cert-manager 1.8+ is tested with v1alpha2 Kubernetes Gateway API. It should also work
with v1beta1 because of resource conversion, but has not been tested with it.

</div>
Expand Down Expand Up @@ -51,7 +51,7 @@ feature flag to the cert-manager controller.
To install v1.5.1 Gateway API bundle (Gateway CRDs and webhook), run the following command:

```sh
kubectl apply -f "https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/standard-install.yaml"
kubectl apply -f "https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.5.1/standard-install.yaml"
```

To enable the feature in cert-manager, turn on the `GatewayAPI` feature gate:
Expand Down Expand Up @@ -89,7 +89,7 @@ following Gateway will trigger the creation of a Certificate with the name
`example-com-tls`:

```yaml
apiVersion: gateway.networking.k8s.io/v1
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: example
Expand Down Expand Up @@ -157,37 +157,27 @@ In the following example, the first four listener blocks will not be used to
generate Certificate resources:

```yaml
apiVersion: gateway.networking.k8s.io/v1
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: my-gateway
namespace: default
annotations:
cert-manager.io/issuer: my-issuer
spec:
gatewayClassName: foo
listeners:
# ❌ Missing "tls" block, the following listener is skipped.
- name: example-1
port: 80
protocol: HTTP
hostname: example.com
- hostname: example.com
# ❌ Missing "hostname", the following listener is skipped.
- name: example-2
port: 443
protocol: HTTPS
tls:
- tls:
certificateRefs:
- name: example-com-tls
kind: Secret
kind: Secret"
group: core
# ❌ "mode: Passthrough" is not supported, the following listener is skipped.
- name: example-3
hostname: example.com
port: 8443
protocol: HTTPS
- hostname: example.com
tls:
mode: Passthrough
certificateRefs:
Expand All @@ -196,9 +186,8 @@ spec:
group: core
# ❌ Cross-namespace secret references are not supported, the following listener is skipped.
- name: example-4
hostname: foo.example.com
port: 8443
- hostname: foo.example.com
port: 443
protocol: HTTPS
allowedRoutes:
namespaces:
Expand All @@ -212,9 +201,8 @@ spec:
namespace: other-namespace
# ✅ The following listener is valid.
- name: example-5
hostname: bar.example.com # ✅ Required.
port: 8443
- hostname: foo.example.com # ✅ Required.
port: 443
protocol: HTTPS
allowedRoutes:
namespaces:
Expand Down Expand Up @@ -251,7 +239,7 @@ The same Secret name can be re-used in multiple TLS blocks, regardless of the
hostname. Let us imagine that you have these two listeners:

```yaml
apiVersion: gateway.networking.k8s.io/v1
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
name: example
Expand All @@ -261,10 +249,14 @@ spec:
gatewayClassName: foo
listeners:
# Listener 1.
- name: example-1
hostname: example.com
- hostname: example.com
port: 443
protocol: HTTPS
routes:
kind: HTTPRoute
parentRefs:
- name: example
kind: Gateway
tls:
mode: Terminate
certificateRefs:
Expand All @@ -273,10 +265,14 @@ spec:
group: core
# Listener 2: Same Secret name as Listener 1, with a different hostname.
- name: example-2
hostname: "*.example.com"
- hostname: *.example.com
port: 443
protocol: HTTPS
routes:
kind: HTTPRoute
parentRefs:
- name: example
kind: Gateway
tls:
mode: Terminate
certificateRefs:
Expand All @@ -285,10 +281,14 @@ spec:
group: core
# Listener 3: also same Secret name, except the hostname is also the same.
- name: example-3
hostname: "*.example.com"
- hostname: *.example.com
port: 8443
protocol: HTTPS
routes:
kind: HTTPRoute
parentRefs:
- name: example
kind: Gateway
tls:
mode: Terminate
certificateRefs:
Expand All @@ -297,10 +297,14 @@ spec:
group: core
# Listener 4: different Secret name.
- name: example-4
hostname: site.org
- hostname: site.org
port: 443
protocol: HTTPS
routes:
kind: HTTPRoute
parentRefs:
- name: example
kind: Gateway
tls:
mode: Terminate
certificateRefs:
Expand Down

0 comments on commit 6091138

Please sign in to comment.