Skip to content
Snippets Groups Projects
Commit 2fc0a363 authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-3184-ConditionalCertIssuer' (#22) from...

Merge pull request 'OZG-3184-ConditionalCertIssuer' (#22) from OZG-3184-ConditionalCertIssuer into master

Reviewed-on: https://git.ozg-sh.de/mgm/intelliform-adapter/pulls/22
parents 532dfb8d bff70b17
Branches
Tags
No related merge requests found
# Helm
## Linter
`helm lint -f test-values.yaml`
## Unit-Tests
Für Unit-Tests wird das helm [helm-unittest](https://github.com/quintush/helm-unittest) plugin benötigt. Die Unit-Tests liegen im Verzeichnis src/test/helm
`helm unittest -f '../../test/helm/*.yaml' .`
## SyntaxCheck
`helm template --debug -f test-values.yaml .`
## Package
`helm package --version=[version] .`
## Versionierung
Jenkins verwendet die Version aus der pom.xml
### Master Branch
Im master Branch werden die ersten 7 Zeichen vom git commit hash an die Version gehangen.
### Release Branch
Ist nur die Version aus der pom.xml
### Feature Branch
In einem feature Branch wird der Branchname an die Version gehangen.
\ No newline at end of file
......@@ -27,7 +27,11 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
{{- if (.Values.ingress).use_staging_cert }}
cert-manager.io/cluster-issuer: letsencrypt-staging
{{- else }}
cert-manager.io/cluster-issuer: letsencrypt-prod
{{- end }}
name: {{ include "app.name" . }}
namespace: {{ include "app.namespace" . }}
spec:
......
......@@ -79,3 +79,24 @@ tests:
- equal:
path: spec.tls[0].hosts[0]
value: helm-fs.test.sh.ozg-cloud.de
- it: should use letsencrypt-prod cluster-issuer as default
asserts:
- equal:
path: metadata.annotations.[cert-manager.io/cluster-issuer]
value: letsencrypt-prod
- it: should use letsencrypt-staging cluster-issuer if use_staging_cert is true
set:
ingress.use_staging_cert: true
asserts:
- equal:
path: metadata.annotations.[cert-manager.io/cluster-issuer]
value: letsencrypt-staging
- it: should use letsencrypt-prod cluster-issuer if use_staging_cert is false
set:
ingress.use_staging_cert: false
asserts:
- equal:
path: metadata.annotations.[cert-manager.io/cluster-issuer]
value: letsencrypt-prod
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment