-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Keyfactor/helmdeps-53460
v1.3.2: Upgrade packages, implement metrics.metricsAddress and containerPorts in Helm chart, refactor release process
- Loading branch information
Showing
11 changed files
with
143 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,68 @@ | ||
name: helm_release | ||
name: Build and Release Helm Chart | ||
on: | ||
pull_request: | ||
branches: | ||
- 'v*' | ||
types: | ||
# action should run when the pull request is closed | ||
# (regardless of whether it was merged or just closed) | ||
- closed | ||
# Make sure the action runs every time new commits are | ||
# pushed to the pull request's branch | ||
- synchronize | ||
|
||
jobs: | ||
helm: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true | ||
steps: | ||
- name: Extract Version Tag | ||
id: extract_version | ||
run: /bin/bash -c 'echo ::set-output name=VERSION::$(echo ${GITHUB_REF##*/} | cut -c2-)' | ||
- name: Set IMAGE_NAME | ||
run: | | ||
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | ||
# Checkout code | ||
# https://github.com/actions/checkout | ||
- name: Checkout code | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
# Extract metadata (tags, labels) to use in Helm chart | ||
# https://github.com/docker/metadata-action | ||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
# Set version from DOCKER_METADATA_OUTPUT_VERSION as environment variable | ||
- name: Set Version | ||
run: | | ||
echo "VERSION=${DOCKER_METADATA_OUTPUT_VERSION:1}" >> $GITHUB_ENV | ||
# Change version and appVersion in Chart.yaml to the tag in the closed PR | ||
- name: Update Helm App/Chart Version | ||
shell: bash | ||
run: | | ||
sed -i "s/^version: .*/version: ${{ steps.extract_version.outputs.VERSION }}/g" deploy/charts/ejbca-cert-manager-issuer/Chart.yaml | ||
sed -i "s/^appVersion: .*/appVersion: \"${{ steps.extract_version.outputs.VERSION }}\"/g" deploy/charts/ejbca-cert-manager-issuer/Chart.yaml | ||
sed -i "s/^version: .*/version: ${{ env.VERSION }}/g" deploy/charts/ejbca-cert-manager-issuer/Chart.yaml | ||
sed -i "s/^appVersion: .*/appVersion: \"${{ env.DOCKER_METADATA_OUTPUT_VERSION }}\"/g" deploy/charts/ejbca-cert-manager-issuer/Chart.yaml | ||
# Setup Helm | ||
# https://github.com/Azure/setup-helm | ||
- name: Install Helm | ||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Helm requires an ident name to be set for chart-releaser to work | ||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
# Build and release Helm chart to GitHub Pages | ||
# https://github.com/helm/chart-releaser-action | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0 | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
pages_branch: gh-pages | ||
charts_dir: deploy/charts | ||
mark_as_latest: true | ||
packages_with_index: true | ||
charts_dir: deploy/charts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: test | ||
on: [workflow_dispatch, push, pull_request] | ||
jobs: | ||
build: | ||
name: Build and Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
# Checkout code | ||
# https://github.com/actions/checkout | ||
- name: Checkout code | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
# Setup GoLang build environment | ||
# https://github.com/actions/setup-go | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
|
||
# Download dependencies | ||
- run: go mod download | ||
|
||
# Build Go binary | ||
- run: go build -v . | ||
|
||
# Run Go linters | ||
# https://github.com/golangci/golangci-lint-action | ||
- name: Run linters | ||
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 | ||
with: | ||
version: latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{- if .Values.secureMetrics.enabled }} | ||
{{- if .Values.metrics.secure }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<a href="https://kubernetes.io"> | ||
<img src="https://raw.githubusercontent.com/cert-manager/cert-manager/d53c0b9270f8cd90d908460d69502694e1838f5f/logo/logo-small.png" alt="Terraform logo" title="K8s" align="left" height="50" /> | ||
</a> | ||
|
||
# Keyfactor EJBCA Issuer for cert-manager | ||
|
||
[![Go Report Card](https://goreportcard.com/badge/github.com/Keyfactor/ejbca-cert-manager-issuer)](https://goreportcard.com/report/github.com/Keyfactor/ejbca-cert-manager-issuer) | ||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://img.shields.io/badge/License-Apache%202.0-blue.svg) | ||
|
||
The EJBCA external issuer for cert-manager allows users to enroll certificates from Keyfactor EJBCA using cert-manager. | ||
|
||
Cert-manager is a native Kubernetes certificate management controller which allows applications to get their certificates from a variety of CAs (Certification Authorities). It ensures certificates are valid and up to date, it also attempts to renew certificates at a configured time before expiration. | ||
|
||
## EJBCA API Usage | ||
The EJBCA Issuer for cert-manager requires the following API endpoints: | ||
* `/ejbca-rest-api/v1/certificate/pkcs10enroll` | ||
* `/ejbca/ejbca-rest-api/v1/certificate/status` | ||
|
||
## Docs | ||
|
||
* [Installation](docs/install.md) | ||
* Usage | ||
* [Usage](docs/config_usage.md) | ||
* [Customization](docs/annotations.md) | ||
* [End Entity Name Selection](docs/endentitynamecustomization.md) | ||
* [Testing the Source](docs/testing.md) | ||
* [License](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters