Skip to content

Commit

Permalink
Adding vanity route + cert OCP template (#416)
Browse files Browse the repository at this point in the history
* Adding vanity route + cert OCP template

* Adding vanity route + cert OCP template

* Updating apiVersion for OCP Templates

* Adding additional params to OCP template
  • Loading branch information
oybed committed Oct 20, 2020
1 parent 546f928 commit a3fd316
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cert-manager-configs/.openshift/cert-manager.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
kind: Template
apiVersion: v1
apiVersion: template.openshift.io/v1
metadata:
annotations:
description: Cert Manager Deployment to support Acme Certificates
Expand Down
2 changes: 1 addition & 1 deletion cert-manager-configs/.openshift/cert-utils-operator.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
kind: Template
apiVersion: v1
apiVersion: template.openshift.io/v1
metadata:
annotations:
description: Cert Manager Deployment to support Acme Certificates
Expand Down
2 changes: 1 addition & 1 deletion cert-manager-configs/.openshift/ocpv4-certs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
kind: Template
apiVersion: v1
apiVersion: template.openshift.io/v1
metadata:
annotations:
description: OCP v4 Certificate and Configuration to load the certs
Expand Down
60 changes: 60 additions & 0 deletions cert-manager-configs/.openshift/route-with-cert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
kind: Template
apiVersion: template.openshift.io/v1
metadata:
annotations:
description: Vanity Certificate and Configuration to manage a vanity route with a valid cert
name: "vanity-route-certificate"
labels:
template: "vanity-route-certificate"
objects:
- kind: Certificate
apiVersion: cert-manager.io/v1alpha2
metadata:
name: "${NAME}-certificate"
namespace: ${NAMESPACE}
spec:
secretName: "${NAME}-certificate"
issuerRef:
name: "${ISSUER_REF_NAME}"
kind: "${ISSUER_REF_KIND}"
dnsNames:
- "${FQDN}"
- kind: Route
apiVersion: route.openshift.io/v1
metadata:
annotations:
cert-utils-operator.redhat-cop.io/certs-from-secret: "${NAME}-certificate"
labels:
app: "${NAME}"
name: "${NAME}"
namespace: "${NAMESPACE}"
spec:
host: "${FQDN}"
tls:
insecureEdgeTerminationPolicy: Redirect
termination: edge
port:
targetPort: "${TARGET_PORT}"
to:
kind: Service
name: "${NAME}"
weight: 100
wildcardPolicy: None
parameters:
- name: NAME
description: Name of the Deployment/Route
required: true
- name: NAMESPACE
description: The namespace used for the route and certificate
required: true
- name: FQDN
description: The FQDN to use for the route and certificate
required: true
- name: TARGET_PORT
description: The target port for the route
value: 8080-tcp
- name: ISSUER_REF_NAME
value: letsencrypt-production
- name: ISSUER_REF_KIND
value: ClusterIssuer

0 comments on commit a3fd316

Please sign in to comment.