Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xta-test-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
lib
xta-test-server
Commits
ad4c8b1f
Commit
ad4c8b1f
authored
4 months ago
by
Jan Zickermann
Browse files
Options
Downloads
Patches
Plain Diff
#2
OZG-7121 helm: Use letsencrypt for ingress
parent
5ea265ff
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!3
Resolve "xta-test-server helm-chart mit Deployment und Keystore-Secrets/Certificate-Resources"
Pipeline
#1319
passed
4 months ago
Stage: publish
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+3
-0
3 additions, 0 deletions
.gitlab-ci.yml
src/main/helm/templates/ingress.yaml
+16
-3
16 additions, 3 deletions
src/main/helm/templates/ingress.yaml
src/test/helm/ingress_test.yaml
+21
-7
21 additions, 7 deletions
src/test/helm/ingress_test.yaml
with
40 additions
and
10 deletions
.gitlab-ci.yml
+
3
−
0
View file @
ad4c8b1f
...
...
@@ -97,6 +97,9 @@ push-merge-request-helm-nexus:
rules
:
-
if
:
$CI_PIPELINE_SOURCE == 'merge_request_event'
when
:
manual
artifacts
:
paths
:
-
"
*.tgz"
# Snapshot jobs
push-snapshot-image-gitlab
:
...
...
This diff is collapsed.
Click to expand it.
src/main/helm/templates/ingress.yaml
+
16
−
3
View file @
ad4c8b1f
...
...
@@ -4,6 +4,15 @@ metadata:
name
:
{{
.Release.Name
}}
namespace
:
{{
include "app.namespace" .
}}
annotations
:
{{
- if (.Values.ingress).certManagerAnnotations -
}}
{{
- range (.Values.ingress).certManagerAnnotations
}}
{{
. | indent 4
}}
{{
- end
}}
{{
- else if (.Values.ingress).use_staging_cert
}}
cert-manager.io/cluster-issuer
:
letsencrypt-staging
{{
- else
}}
cert-manager.io/cluster-issuer
:
letsencrypt-prod
{{
- end
}}
nginx.ingress.kubernetes.io/auth-tls-verify-client
:
"
on"
nginx.ingress.kubernetes.io/auth-tls-secret
:
{{
include "app.namespace" .
}}
-ca-cert
nginx.ingress.kubernetes.io/auth-tls-pass-certificate-to-upstream
:
"
true"
...
...
@@ -22,8 +31,12 @@ spec:
port
:
number
:
8443
host
:
{{
include "app.baseDomain" .
}}
host
:
"
{{
.Release.Name
}}-
{{
include
"app.baseDomain" . }}
"
tls
:
-
hosts
:
-
{{
include "app.baseDomain" .
}}
secretName
:
{{
.Release.Name
}}
-tls-secret
\ No newline at end of file
-
"
{{
.Release.Name
}}-{{
include
"app.baseDomain" . }}"
{{
- if (.Values.ingress).tlsSecretName
}}
secretName
:
{{
(.Values.ingress).tlsSecretName
}}
{{
- else
}}
secretName
:
{{
.Values.ozgcloud.bezeichner
}}
-{{ .Release.Name }}-tls
{{
- end
}}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/test/helm/ingress_test.yaml
+
21
−
7
View file @
ad4c8b1f
...
...
@@ -38,11 +38,14 @@ tests:
asserts
:
-
isKind
:
of
:
Ingress
-
it
:
should use same tls secret as in cluster
-
it
:
should set ingress tls
set
:
ingress
:
tlsSecretName
:
client-tls
asserts
:
-
equal
:
path
:
spec.tls[0].secretName
value
:
matabase-tls-secret
value
:
client-tls
-
it
:
should not create ingress tls/ingressClass by default
asserts
:
...
...
@@ -56,13 +59,25 @@ tests:
-
equal
:
path
:
spec.ingressClassName
value
:
ingress
-
it
:
should use default letsencrypt-prod cluster-issuer
asserts
:
-
equal
:
path
:
metadata.annotations["cert-manager.io/cluster-issuer"]
value
:
letsencrypt-prod
-
it
:
should use letsencrypt-staging cluster-issuer
set
:
ingress.use_staging_cert
:
true
asserts
:
-
equal
:
path
:
metadata.annotations["cert-manager.io/cluster-issuer"]
value
:
letsencrypt-staging
-
it
:
should enable client verification
asserts
:
-
equal
:
path
:
metadata.annotations["nginx.ingress.kubernetes.io/auth-tls-verify-client"]
value
:
"
on"
-
it
:
should use CA of namespace to verify certificates
asserts
:
-
equal
:
...
...
@@ -74,12 +89,11 @@ tests:
-
equal
:
path
:
metadata.annotations["nginx.ingress.kubernetes.io/auth-tls-pass-certificate-to-upstream"]
value
:
"
true"
-
it
:
should create tls hosts name correctly
asserts
:
-
equal
:
path
:
spec.tls[0].hosts[0]
value
:
helm.test.by.ozg-cloud.de
value
:
matabase-
helm.test.by.ozg-cloud.de
-
it
:
should create rules correctly
asserts
:
...
...
@@ -98,4 +112,4 @@ tests:
asserts
:
-
equal
:
path
:
spec.rules[0].host
value
:
helm.test.by.ozg-cloud.de
value
:
matabase-
helm.test.by.ozg-cloud.de
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment