-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-1862: add proper repo ingress (#86)
- Loading branch information
Showing
6 changed files
with
80 additions
and
10 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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
suite: test Alfresco repository ingress | ||
templates: | ||
- ingress.yaml | ||
tests: | ||
- it: should render with default security annotations | ||
asserts: | ||
- equal: | ||
path: metadata.annotations['nginx.ingress.kubernetes.io/server-snippet'] | ||
value: | | ||
location ~ ^/.*/(wc)?s(ervice)?/api/solr/.*$ {return 403;} | ||
location ~ ^/.*/proxy/.*/api/solr/.*$ {return 403;} | ||
location ~ ^/.*/-default-/proxy/.*/api/.*$ {return 403;} | ||
location ~ ^/.*/s/prometheus$ {return 403;} | ||
template: ingress.yaml | ||
- equal: | ||
path: spec.ingressClassName | ||
value: nginx | ||
template: ingress.yaml | ||
|
||
- it: should sanitize ingress | ||
capabilities: | ||
majorVersion: 1 | ||
minorVersion: 17 | ||
set: | ||
ingress: | ||
annotations: | ||
kubernetes.io/ingress.class: myfancyClass | ||
nginx.ingress.kubernetes.io/server-snippet: listen 6666; | ||
asserts: | ||
- notMatchRegex: | ||
path: metadata.annotations['nginx.ingress.kubernetes.io/server-snippet'] | ||
pattern: listen 6666; | ||
template: ingress.yaml | ||
- equal: | ||
path: metadata.annotations['kubernetes.io/ingress.class'] | ||
value: nginx | ||
template: ingress.yaml | ||
|
||
- it: should sanitize ingress | ||
capabilities: | ||
majorVersion: 1 | ||
minorVersion: 19 | ||
set: | ||
ingress: | ||
annotations: | ||
nginx.ingress.kubernetes.io/server-snippet: listen 6666; | ||
asserts: | ||
- notMatchRegex: | ||
path: metadata.annotations['nginx.ingress.kubernetes.io/server-snippet'] | ||
pattern: listen 6666; | ||
template: ingress.yaml | ||
- equal: | ||
path: spec.ingressClassName | ||
value: nginx | ||
template: ingress.yaml |