From 21aa7eed28449c855a9ac2f8376ed51653168c1b Mon Sep 17 00:00:00 2001 From: Fulton Byrne Date: Fri, 7 Sep 2018 09:28:22 -0400 Subject: [PATCH] doc: add minimal ingress-shim example Signed-off-by: Fulton Byrne --- docs/reference/ingress-shim.rst | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/reference/ingress-shim.rst b/docs/reference/ingress-shim.rst index 1934d720a..cec03e6b4 100644 --- a/docs/reference/ingress-shim.rst +++ b/docs/reference/ingress-shim.rst @@ -13,7 +13,31 @@ How it works ingress-shim watches Ingress resources across your cluster. If it observes an Ingress with *any* of the annotations described in the 'Usage' section, it will ensure a Certificate resource with the same name as the Ingress, and configured -as described on the Ingress exists. +as described on the Ingress exists. For example: + +.. code-block:: yaml + apiVersion: extensions/v1beta1 + kind: Ingress + metadata: + annotations: + # add an annotation indicating the issuer to use. + certmanager.k8s.io/cluster-issuer: nameOfClusterIssuer + name: myIngress + namespace: myIngress + spec: + rules: + - host: myingress.com + http: + paths: + - backend: + serviceName: myservice + servicePort: 80 + path: / + tls: # < placing a host in the TLS config will indicate a cert should be created + - hosts: + - myingress.com + secretName: myingress-cert # < cert-manager will store the created certificate in this secret. + As of the time of writing, it **will not** update Certificate resources if your Ingress resource changes. It is up to yourself to ensure the corresponding