Skip to content

Commit

Permalink
Merge pull request #24 from maelvls/document-release
Browse files Browse the repository at this point in the history
Document release process and update the versions of the GitHub Actions workflows
  • Loading branch information
jetstack-bot authored Oct 5, 2023
2 parents d401251 + 15a4d6f commit 0f81ec9
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 29 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ jobs:
- name: Fetch all tags
run: git fetch --force --tags
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: "^1.20"
- uses: docker/login-action@v1
# The reason we don't use `go-version: go.mod` is because go.mod's
# version is the minimal required version. But for building the
# binaries, we want to use a Go version that is still supported.
go-version: "^1.21"
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser (PR)
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
if: "!startsWith(github.ref, 'refs/tags')" # runs on a PR
with:
distribution: goreleaser
Expand All @@ -40,7 +43,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser (Publish Release)
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
if: "startsWith(github.ref, 'refs/tags')" # runs on a Tag being pushed
with:
distribution: goreleaser
Expand Down
68 changes: 44 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,43 @@ OpenShift routes from any cert-manager Issuer.

## Prerequisites:

1) Ensure you have [cert-manager](https://github.com/cert-manager/cert-manager) installed
through the method of your choice. But make sure you install cert-manager and openshift-routes-deployment in the same namespace. By default this is in the namespace **cert-manager**.
For example, with the regular manifest:
1. Ensure you have [cert-manager](https://github.com/cert-manager/cert-manager) installed
through the method of your choice. But make sure you install cert-manager and openshift-routes-deployment in the same namespace. By default this is in the namespace **cert-manager**.
For example, with the regular manifest:

```sh
oc apply -f https://github.com/jetstack/cert-manager/releases/download/v1.12.1/cert-manager.yaml
```

Both **ClusterIssuer** and namespace based **Issuer** are possible. Here a **ClusterIssuer** is used:

2) For example, create the ClusterIssuer (no additional ingress class is needed for the openshift-ingress router. The example.com email must be replaced by another one):
2. For example, create the ClusterIssuer (no additional ingress class is needed for the openshift-ingress router. The example.com email must be replaced by another one):

```yaml
apiVersion: v1
items:
- apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
annotations:
name: letsencrypt-prod
spec:
acme:
email: [email protected]
preferredChain: ""
privateKeySecretRef:
name: letsencrypt-prod
server: https://acme-v02.api.letsencrypt.org/directory
solvers:
- http01:
ingress: {}
- apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
annotations:
name: letsencrypt-prod
spec:
acme:
email: [email protected]
preferredChain: ""
privateKeySecretRef:
name: letsencrypt-prod
server: https://acme-v02.api.letsencrypt.org/directory
solvers:
- http01:
ingress: {}
```
```sh
oc apply -f clusterissuer.yaml
```

3) Make sure that there is an A record on the load balancer IP or a CNAME record on the load balancer hostname in your DNS system for the HTTP-01 subdomain.
3. Make sure that there is an A record on the load balancer IP or a CNAME record on the load balancer hostname in your DNS system for the HTTP-01 subdomain.

```
CNAME:
Expand All @@ -60,19 +62,18 @@ oc apply -f https://github.com/cert-manager/openshift-routes/releases/latest/dow
```

If you follow the above prerequisites, use this annotations below

```yaml
...
---
metadata:
annotations:
cert-manager.io/issuer-kind: ClusterIssuer
cert-manager.io/issuer-name: letsencrypt-prod
...
---
spec:
host: app.service.clustername.domain.com
...
```

Annotate your routes:
```yaml
Expand Down Expand Up @@ -128,3 +129,22 @@ to be imported as a module. It has a large number of transitive dependencies tha
amount of maintenance to whichever project we submitted it to. In the future, we would like to split
the cert-manager APIs and typed clients out of the main cert-manager repo, at which point it would be
easier for other people to consume in their projects.

# Release Process

You must have write access to this repository to perform a release.

1. ```bash
git checkout main
git pull origin main
```

2. Create a tag and push it:

```bash
git tag v0.2.0
git push origin v0.2.0
```

3. Once the GitHub Action has completed, you will see a new GitHub Release for
that version. Edit the release description if needed.

0 comments on commit 0f81ec9

Please sign in to comment.