[dnsmade-easy] Add tests (#1054)

* Add tests

Co-authored-by: angelnu <git@angelnucom>
This commit is contained in:
Angel Nunez Mencias 2021-06-23 09:58:54 +02:00 committed by GitHub
parent 8b4eaf4242
commit 2ef0c8d04e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 69 additions and 3 deletions

View File

@ -6,7 +6,6 @@ chart-dirs:
- charts/stable
excluded-charts:
- charts/stable/alertmanager-bot
- charts/stable/dnsmadeeasy-webhook
- charts/stable/multus
- charts/stable/promcord
- charts/stable/reg
@ -19,3 +18,4 @@ chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
- k8s-at-home-libraries=https://library-charts.k8s-at-home.com
- k8s-at-home=https://k8s-at-home.com/charts
- jetstack=https://charts.jetstack.io

View File

@ -9,3 +9,4 @@ chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
- k8s-at-home-libraries=https://library-charts.k8s-at-home.com
- k8s-at-home=https://k8s-at-home.com/charts
- jetstack=https://charts.jetstack.io

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 1.2.0
description: Cert-Manager Webhook for DNSMadeEasy
name: dnsmadeeasy-webhook
version: 3.2.0
version: 3.3.0
keywords:
- cert-manager
- dnsmadeeasy
@ -19,3 +19,7 @@ dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 3.2.0
- name: cert-manager
repository: https://charts.jetstack.io
version: v1.4.0
condition: cert-manager.enabled

View File

@ -1,6 +1,6 @@
# dnsmadeeasy-webhook
![Version: 3.2.0](https://img.shields.io/badge/Version-3.2.0-informational?style=flat-square) ![AppVersion: 1.2.0](https://img.shields.io/badge/AppVersion-1.2.0-informational?style=flat-square)
![Version: 3.3.0](https://img.shields.io/badge/Version-3.3.0-informational?style=flat-square) ![AppVersion: 1.2.0](https://img.shields.io/badge/AppVersion-1.2.0-informational?style=flat-square)
Cert-Manager Webhook for DNSMadeEasy
@ -17,6 +17,7 @@ Cert-Manager Webhook for DNSMadeEasy
| Repository | Name | Version |
|------------|------|---------|
| https://charts.jetstack.io | cert-manager | v1.4.0 |
| https://library-charts.k8s-at-home.com | common | 3.2.0 |
## TL;DR
@ -74,8 +75,10 @@ N/A
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| cert-manager.enabled | bool | `false` | Install cert-manager chart as dependency. Usually this is already installed in the cluster and not needed. |
| certManager.namespace | string | `"cert-manager"` | Namespace where the cert-manager operator was installed to |
| certManager.serviceAccountName | string | `"cert-manager"` | Service account used by the cert-manager |
| generateCerts | bool | `true` | Generate dedicated certs instead of re-using the cert-manager webhook certificate. |
| groupName | string | `"acme.mycompany.com"` | The GroupName here is used to identify your company or business unit that created this webhook. This name will need to be referenced in each Issuer's `webhook` stanza to inform cert-manager of where to send ChallengePayload resources in order to solve the DNS01 challenge. This group name should be **unique**, hence using your own company's domain here is recommended. |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| image.repository | string | `"ghcr.io/k8s-at-home/dnsmadeeasy-webhook"` | Image repository |
@ -88,6 +91,20 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [3.3.0]
#### Added
- Testcases
#### Changed
- N/A
#### Removed
- N/A
### [3.1.0]
#### Added

View File

@ -9,6 +9,20 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [3.3.0]
#### Added
- Testcases
#### Changed
- N/A
#### Removed
- N/A
### [3.1.0]
#### Added

View File

@ -0,0 +1,15 @@
# Until cert-manager moves CRD in the crd folder we
# cannot use cert-manager CRDs within the chart
# See: https://github.com/jetstack/cert-manager/issues/3377
generateCerts: false
cert-manager:
enabled: true
installCRDs: true
webhook:
enabled: true
extraArgs:
- --dns01-recursive-nameservers=1.1.1.1:53
- --dns01-recursive-nameservers-only
cainjector:
replicaCount: 1

View File

@ -14,7 +14,11 @@
{{- end -}}
{{- define "dnsmadeeasy-webhook.servingCertificate" -}}
{{- if .Values.generateCerts }}
{{ printf "%s-webhook-tls" (include "common.names.fullname" .) }}
{{- else -}}
{{ printf "%s-cert-manager-webhook-ca" (include "common.names.fullname" .) }}
{{- end -}}
{{- end -}}

View File

@ -1,3 +1,4 @@
{{- if .Values.generateCerts }}
---
# Create a selfsigned Issuer, in order to create a root CA certificate for
# signing webhook serving certificates
@ -64,3 +65,4 @@ spec:
- {{ include "common.names.fullname" . }}
- {{ include "common.names.fullname" . }}.{{ .Release.Namespace }}
- {{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.svc
{{- end }}

View File

@ -27,3 +27,12 @@ image:
pullPolicy: IfNotPresent
# -- Image tag
tag: v1.2.0
# -- Generate dedicated certs instead of re-using the cert-manager
# webhook certificate.
generateCerts: true
cert-manager:
# -- Install cert-manager chart as dependency.
# Usually this is already installed in the cluster and not needed.
enabled: false