Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Updrade to cert-manager 0.11.0
Browse files Browse the repository at this point in the history
We were pinned to cert-manager 0.10.0 before this update. There
has been a new release and we have upgraded to use 0.11.0 with its
new CRDs and new api namespace etc.
The 0.10.0 -> 0.11.0 update is a breaking change so the upgrade
instructions on the cert-manager website should be followed for
existing installs. New installs will use 0.11.0 by default

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
  • Loading branch information
Waterdrips authored and alexellis committed Oct 27, 2019
1 parent 00cb63e commit 9557a67
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ Flush out the staging certificates and orders

```sh
kubectl delete certificates --all -n openfaas
kubectl delete secret -n openfaas -l="certmanager.k8s.io/certificate-name"
kubectl delete secret -n openfaas -l="cert-manager.io/certificate-name"
kubectl delete order -n openfaas --all
```

Expand Down
3 changes: 0 additions & 3 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,3 @@ Status:

Add all remaining steps from [installation guide](https://github.com/openfaas/openfaas-cloud/tree/master/docs).

Caveats:

* JetStack's cert-manager is currently pinned to an earlier version due to issues with re-creating the CRD entries.
6 changes: 3 additions & 3 deletions pkg/tls/issuer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func Test_DigitalOcean_Issuer(t *testing.T) {

templateRes.Execute(&buf, &tlsTemplate)

wantTemplate := `apiVersion: certmanager.k8s.io/v1alpha1
wantTemplate := `apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
Expand Down Expand Up @@ -83,7 +83,7 @@ func Test_Route53_Issuer(t *testing.T) {
buf := bytes.Buffer{}
templateRes.Execute(&buf, &tlsTemplate)

wantTemplate := `apiVersion: certmanager.k8s.io/v1alpha1
wantTemplate := `apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
Expand Down Expand Up @@ -141,7 +141,7 @@ func Test_GoogleCloudDNS_Issuer(t *testing.T) {
buf := bytes.Buffer{}
templateRes.Execute(&buf, &tlsTemplate)

wantTemplate := `apiVersion: certmanager.k8s.io/v1alpha1
wantTemplate := `apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
Expand Down
5 changes: 1 addition & 4 deletions scripts/create-namespaces.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#!/bin/bash

# Install the CustomResourceDefinition resources separately
kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.10/deploy/manifests/00-crds.yaml
kubectl apply --validate=false -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.11/deploy/manifests/00-crds.yaml

kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml

# Create the namespace for cert-manager
kubectl create namespace cert-manager

# Label the cert-manager namespace to disable resource validation
kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true

kubectl get namespaces
2 changes: 1 addition & 1 deletion scripts/install-cert-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ helm repo update
helm install \
--name cert-manager \
--namespace cert-manager \
--version v0.10.0 \
--version v0.11.0 \
jetstack/cert-manager
4 changes: 2 additions & 2 deletions scripts/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ kubectl delete ns openfaas openfaas-fn
kubectl delete ns cert-manager

kubectl delete crd sealedsecrets.bitnami.com
kubectl delete \
-f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.6/deploy/manifests/00-crds.yaml
kubectl delete -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.11/deploy/manifests/00-crds.yaml


kubectl delete deploy/tiller-deploy -n kube-system
kubectl delete sa/tiller -n kube-system
Expand Down
2 changes: 1 addition & 1 deletion templates/issue-prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: certmanager.k8s.io/v1alpha1
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
Expand Down
2 changes: 1 addition & 1 deletion templates/k8s/tls/auth-domain-cert.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: certmanager.k8s.io/v1alpha1
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: auth-system-{{.RootDomain}}
Expand Down
2 changes: 1 addition & 1 deletion templates/k8s/tls/issuer-prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: certmanager.k8s.io/v1alpha1
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
Expand Down
2 changes: 1 addition & 1 deletion templates/k8s/tls/issuer-staging.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: certmanager.k8s.io/v1alpha1
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-staging
Expand Down
2 changes: 1 addition & 1 deletion templates/k8s/tls/wildcard-domain-cert.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: certmanager.k8s.io/v1alpha1
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: wildcard-{{.RootDomain}}
Expand Down

0 comments on commit 9557a67

Please sign in to comment.