-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helm chart #72
Merged
Merged
Helm chart #72
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6cd4aa4
Add github actions to test and lint charts
maruina 8f409a5
Add helm chart
maruina c6f7a35
Fix linting in helm action
maruina b2abbe9
Add maintainers
maruina 4cafbf2
Update ct
maruina 1fbf17b
Add ci values
maruina f94a1f6
Add chart scheleton
maruina e5fd658
Fix template
maruina e6aa616
Fix RBAC roles
maruina d55fc92
Add README
maruina cf04a79
Fix linting
maruina 0c52da2
Add release workflow
maruina 2bd166d
Use controller-get to generate CRDs for the chart
maruina 1519a0e
Remove unused config
maruina 3859a62
Make RBAC proxy configurable
maruina ef75d6a
Fix rbac roles for metrics
maruina a1261bd
Add CI values to test the RBAC proxy
maruina 30e0d0b
Alway enable the metric service
maruina ff067dd
Update README
maruina e459a85
Remove hardcoded value for readiness and liveness port
maruina 2368c8f
Keep leader election always enabled
maruina cc29ffc
Allow to disable cert-manager approve RBAC
maruina 8c69a22
Add AWS_REGION env var
maruina 4ff6d39
Add pdb
maruina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
IMG: skyscanner/kms-issuer:dev | ||
CERT_MANAGER_VERSION: v1.8.0 | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
|
@@ -36,7 +37,7 @@ jobs: | |
run: kubectl wait --for=condition=Ready -l app=local-kms -n local-kms pod | ||
|
||
- name: Install cert-manager | ||
run: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.yaml | ||
run: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml | ||
|
||
- name: Install kms-issuer CRDs | ||
run: make install | ||
|
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,82 @@ | ||
name: Helm Chart Tests | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test-build: | ||
name: test-helm-chart | ||
runs-on: ubuntu-latest | ||
env: | ||
IMG: skyscanner/kms-issuer:dev | ||
CERT_MANAGER_VERSION: v1.8.0 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.5.2 | ||
|
||
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and | ||
# yamllint (https://github.com/adrienverge/yamllint) which require Python | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
with: | ||
version: v3.6.0 | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --config ct.yaml) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint --config ct.yaml | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
with: | ||
cluster_name: kind | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Install cert-manager | ||
run: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Build the testing kms-issuer docker image | ||
run: docker build -t ${IMG} . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we do a lot of building the docker image, creating kind clusters, etc. Might be nice if we could share some of this in a single workflow. Using caches between jobs? |
||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Load test docker image into the kind cluster | ||
run: kind load docker-image ${IMG} | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install --config ct.yaml --helm-extra-set-args "--set=img.repository=${REPOSITORY},--set=img.tag=${TAG}" | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
helm-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Run helm-docs | ||
uses: docker://jnorwood/helm-docs:v1.10.0 |
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,17 @@ | ||
name: Release artifacts | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Publish Helm charts | ||
uses: stefanprodan/helm-gh-pages@master | ||
Smirl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -24,3 +24,4 @@ testbin/* | |
*.swo | ||
*~ | ||
.vscode | ||
ct_previous* |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,31 @@ | ||
apiVersion: v2 | ||
name: kms-issuer | ||
description: A Helm chart to install kms-issuer | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 1.0.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "v2.0.0" | ||
|
||
keywords: | ||
- cert-manager | ||
- kubernetes | ||
- kms | ||
maintainers: | ||
- name: maruina |
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,41 @@ | ||
# kms-issuer | ||
|
||
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.0.0](https://img.shields.io/badge/AppVersion-v2.0.0-informational?style=flat-square) | ||
|
||
A Helm chart to install kms-issuer | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| affinity | object | `{}` | | | ||
| args.enableApprovedCheck | bool | `true` | Enable waiting for CertificateRequests to have an approved condition before signing | | ||
| args.healthProbeBindAddress | string | `":8081"` | The address the probe endpoint binds to | | ||
| args.leaderElect | bool | `true` | Enable leader election for controller manager. | | ||
| args.localAwsEndpoint | string | `""` | The address of a local-kms endpoint for testing | | ||
| args.metricsBindAddress | string | `":8080"` | The address the metric endpoint binds to. | | ||
| certManagerApprovalRBAC.enable | bool | `true` | Enable a ClusterRoleBinding for cert-manager to approve CSR | | ||
| certManagerApprovalRBAC.namespace | string | `"cert-manager"` | The namespace where cert-manager service account is deployed | | ||
| certManagerApprovalRBAC.serviceAccountName | string | `"cert-manager"` | The service account name that cert-manager is using | | ||
| enableMetricsRbacProxy | bool | `false` | Enable an RBAC proxy to protect the metrics endpoint | | ||
| env[0] | object | `{"name":"AWS_REGION","value":""}` | The AWS region the controller is deployed to | | ||
| fullnameOverride | string | `""` | | | ||
| image.pullPolicy | string | `"IfNotPresent"` | | | ||
| image.repository | string | `"ghcr.io/skyscanner/kms-issuer"` | | | ||
| image.tag | string | `""` | | | ||
| imagePullSecrets | list | `[]` | | | ||
| nameOverride | string | `""` | | | ||
| nodeSelector | object | `{}` | | | ||
| podAnnotations | object | `{}` | | | ||
| podDisruptionBudget.enable | bool | `false` | | | ||
| podDisruptionBudget.maxUnavailable | string | `""` | | | ||
| podDisruptionBudget.minAvailable | int | `1` | | | ||
| replicaCount | int | `1` | | | ||
| resources | object | `{}` | | | ||
| serviceAccount.annotations | object | `{}` | | | ||
| serviceAccount.create | bool | `true` | | | ||
| serviceAccount.name | string | `""` | | | ||
| tolerations | list | `[]` | | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.10.0](https://github.com/norwoodj/helm-docs/releases/v1.10.0) |
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,9 @@ | ||
# {{ template "chart.name" . }} | ||
|
||
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} | ||
|
||
{{ template "chart.description" . }} | ||
|
||
{{ template "chart.valuesSection" . }} | ||
|
||
{{ template "helm-docs.versionFooter" . }} |
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,11 @@ | ||
# Keep in sync with the IMG variable in .github/workflows/helm.yml | ||
image: | ||
repository: skyscanner/kms-issuer | ||
tag: dev | ||
|
||
env: | ||
- name: AWS_REGION | ||
value: test-region | ||
|
||
podDisruptionBudget: | ||
enable: true |
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,6 @@ | ||
# Keep in sync with the IMG variable in .github/workflows/helm.yml | ||
image: | ||
repository: skyscanner/kms-issuer | ||
tag: dev | ||
|
||
replicaCount: 2 |
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,6 @@ | ||
# Keep in sync with the IMG variable in .github/workflows/helm.yml | ||
image: | ||
repository: skyscanner/kms-issuer | ||
tag: dev | ||
|
||
enableMetricsRbacProxy: true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the concept of environments in github actions. We could perhaps put this shared value there?