Skip to content
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

[DO NOT MERGE] transport server template #5903

Closed
wants to merge 182 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
66397d8
added transportserver-template config
ssrahul96 Mar 4, 2024
d9a8c36
updated docs
ssrahul96 Mar 4, 2024
6af859b
fixed trasnportserver spelling
ssrahul96 Apr 27, 2024
2d1c1fb
Merge branch 'main' into trasnport-server-template
ssrahul96 Apr 27, 2024
53cee1e
Update docs/content/configuration/global-configuration/configmap-reso…
ssrahul96 May 7, 2024
828971e
Update examples/shared-examples/custom-templates/README.md
ssrahul96 May 7, 2024
3b3eae4
Merge branch 'main' into trasnport-server-template
ssrahul96 May 8, 2024
47c6cab
Bump the actions group across 1 directory with 3 updates (#5510)
dependabot[bot] May 8, 2024
024cff6
Bump redhat/ubi9 from `770cf07` to `ed84f34` in /build (#5514)
dependabot[bot] May 8, 2024
0fddb32
Rewrite "Security recommendations" page. (#5342)
ADubhlaoich May 8, 2024
1822420
fix syntax error in helm release workflow (#5521)
pdabelf5 May 9, 2024
4fd588d
3.5.1 docs update (#5520)
pdabelf5 May 9, 2024
1f27c45
Bump redhat/ubi9-minimal from `b6ec3ea` to `2636170` in /build (#5512)
dependabot[bot] May 9, 2024
e57e52e
Revert "add local helm schema validation" (#5528)
oseoin May 9, 2024
c7cd82f
Add Ingress Annotation List to Telemetry (#5516)
AlexFenlon May 14, 2024
a792b2d
Bump Go version to fix vulnerability in std lib (#5540)
jjngx May 14, 2024
43479e0
Remove unused var (#5541)
jjngx May 14, 2024
de2535e
Revert "enable logging in tests" (#5543)
oseoin May 14, 2024
e6eb885
Add missing dependency hash (#5531)
oseoin May 14, 2024
d45484b
Fix error messages (#5542)
jjngx May 14, 2024
683ca4a
Bump redhat/ubi8 from `edc34f8` to `83068ea` in /build (#5535)
dependabot[bot] May 15, 2024
f819044
Bump kindest/node from v1.29.2 to v1.30.0 in /tests in the docker-tes…
dependabot[bot] May 15, 2024
62c5d71
Bump the actions group across 1 directory with 8 updates (#5548)
dependabot[bot] May 15, 2024
d97ee98
[pre-commit.ci] pre-commit autoupdate (#5539)
pre-commit-ci[bot] May 15, 2024
b369277
Bump the go group across 1 directory with 4 updates (#5537)
dependabot[bot] May 15, 2024
c53f7e4
Bump golang from `cdc86d9` to `2a88224` in /build (#5522)
dependabot[bot] May 15, 2024
713ac6f
Bump golang from `2a88224` to `f1fe698` in /build (#5558)
dependabot[bot] May 16, 2024
105250e
Bump nginx from `ca16009` to `ef587d1` in /build (#5515)
dependabot[bot] May 16, 2024
170da25
Bump the go group with 6 updates (#5557)
dependabot[bot] May 16, 2024
25e8ad7
add files for upgrade tests (#5553)
vepatel May 16, 2024
e59673b
Bump nginxcontrib/nginx from `d3b4797` to `3cb2535` in /build (#5513)
dependabot[bot] May 16, 2024
0d46b41
Add AppProtectVersion to Telemetry (#5554)
AlexFenlon May 16, 2024
4f98ec0
update telemetry export version (#5532)
pdabelf5 May 16, 2024
28f55eb
update operator version (#5564)
vepatel May 16, 2024
4cf0950
Fix incorrect errors showing in Telemetry (#5561)
AlexFenlon May 16, 2024
279e74f
Forced SHA update workflow (#5560)
oseoin May 16, 2024
6adcd6f
Docker image update d41d8cd9 (#5570)
nginx-bot May 17, 2024
3d1b7bb
Bump the go group with 4 updates (#5568)
dependabot[bot] May 17, 2024
210e26b
Add IsPlus to Telemetry (#5571)
AlexFenlon May 17, 2024
84eb268
Fix workflow PR labels (#5574)
oseoin May 17, 2024
83a5a83
Remove deprecated Go code (#5559)
jjngx May 20, 2024
3aef50d
exclude upgrade files from nightly regression tests (#5581)
vepatel May 20, 2024
de45ae8
add cherry-pick action (#5575)
vepatel May 20, 2024
6ad91bd
remove cert-gen script (#5583)
vepatel May 20, 2024
7aef14a
Fix error msg to comply with a Go linter (#5582)
jjngx May 20, 2024
e95e59c
add top level permission to gh action (#5584)
vepatel May 20, 2024
817095d
Bump the actions group across 1 directory with 5 updates (#5587)
dependabot[bot] May 20, 2024
c8affb7
Bump the go group with 2 updates (#5577)
dependabot[bot] May 20, 2024
34a10d6
pick latest release branch for cherry picks (#5595)
pdabelf5 May 21, 2024
b62d621
fix test artifact name and test marker (#5596)
vepatel May 21, 2024
816ede2
Bump the python group across 1 directory with 4 updates (#5597)
dependabot[bot] May 21, 2024
50a62c1
[pre-commit.ci] pre-commit autoupdate (#5593)
pre-commit-ci[bot] May 21, 2024
a85d02c
add PAT to cp jobs (#5599)
vepatel May 21, 2024
f73af92
Add Installation Flags to Telemetry (#5586)
AlexFenlon May 22, 2024
71d73c4
Fix codeblock languages, prefix instances (#5604)
ADubhlaoich May 22, 2024
20475d4
NAP link fixes & improvements to troubleshooting documentation (#5605)
ADubhlaoich May 23, 2024
5e05cde
Scale ratelimit with ingress pods (#5113)
dbaumgarten May 23, 2024
569e825
update google marketplace links (#5615)
vepatel May 24, 2024
0e3e865
Added missing "cd" command (#5614)
fabriziofiorucci May 24, 2024
8d89ffd
Bump aquasecurity/trivy-action from 0.20.0 to 0.21.0 in the actions g…
dependabot[bot] May 24, 2024
1c33e3b
add azure marketplace link (#5619)
vepatel May 24, 2024
b4ac227
Bump golang from `f1fe698` to `b8ded51` in /build (#5612)
dependabot[bot] May 27, 2024
d9297b0
Add [cherry-pick] to title of dependabot cherry-pick prs (#5626)
oseoin May 27, 2024
fc79984
Bump redhat/ubi8 from `83068ea` to `a424544` in /build (#5611)
dependabot[bot] May 28, 2024
aa82e83
Add Granular Ingress Counts to Telemetry (#5608)
AlexFenlon May 28, 2024
95639a7
[pre-commit.ci] pre-commit autoupdate (#5629)
pre-commit-ci[bot] May 29, 2024
6ba7b16
Bump the go group across 1 directory with 4 updates (#5622)
dependabot[bot] May 29, 2024
e7ea054
Docker image update d41d8cd9 (#5637)
nginx-bot May 29, 2024
c91d849
Update Community Call Dates (#5639)
AlexFenlon May 29, 2024
bf7b4b5
Fix repo references in version-bump (#5640)
oseoin May 29, 2024
cb6612a
NGINX Plus R32 (#5649)
oseoin May 30, 2024
e6f2cc9
add wait to dos test (#5656)
vepatel May 30, 2024
21cda88
skip dos log test (#5658)
vepatel May 30, 2024
17ccaee
Upgrade prometheus exporter to 1.1.2 (#5655)
pdabelf5 May 30, 2024
778214e
Update debian build stages to use `gpg` over `sq` (#5664)
shaun-nx May 30, 2024
c3981ef
Bump the python group in /tests with 2 updates (#5628)
dependabot[bot] May 30, 2024
9eee3de
Bump golang from `421bc7f` to `7e78833` in /build (#5667)
dependabot[bot] May 31, 2024
af21628
Docker image update d41d8cd9 (#5668)
nginx-bot May 31, 2024
c862f81
fail smoke test job if we get a cache miss on fetching the binary (#5…
pdabelf5 May 31, 2024
ccfee93
assign write permissions when publishing ghcr images (#5663)
pdabelf5 May 31, 2024
37633f8
update opentracing images to 1.27.0 (#5674)
pdabelf5 May 31, 2024
7c57bbc
Bump the actions group across 1 directory with 4 updates (#5677)
dependabot[bot] Jun 3, 2024
f064423
Add Granular Services Counts to Telemetry (#5627)
AlexFenlon Jun 4, 2024
99faf6c
Release 3.5.2 (#5678)
pdabelf5 Jun 4, 2024
8961d51
update release 3.5.2 docs (#5684)
vepatel Jun 4, 2024
c77513d
address bug where base & head ref are not always correct (#5681)
pdabelf5 Jun 4, 2024
08b9ac0
make helm-publish workflow re-usable (#5682)
pdabelf5 Jun 4, 2024
91e5dc0
address "Invalid Semantic Version" error when building helm chart for…
pdabelf5 Jun 4, 2024
24313ad
Bump the python group in /tests with 2 updates (#5683)
dependabot[bot] Jun 4, 2024
fcdf583
Upgrade Go v1.22.4 with security fixes (#5693)
jjngx Jun 5, 2024
efe1ab9
Bump redhat/ubi8 from `f4292f4` to `2a5d234` in /build (#5690)
dependabot[bot] Jun 6, 2024
abdd84a
Add grpc example (#5699)
vepatel Jun 6, 2024
ccd1814
helm: add knob to control cluster level rbac rendering (#5229)
hafe Jun 6, 2024
a3bed6d
update to gorelease 2.0 config syntax (#5700)
pdabelf5 Jun 6, 2024
5e253b4
Bump golang from `7e78833` to `9bdd569` in /build (#5696)
dependabot[bot] Jun 6, 2024
172a4a2
Bump telemetry-exporter version to v0.1.0 (#5709)
jjngx Jun 7, 2024
fbcef10
Bump the actions group across 1 directory with 4 updates (#5708)
dependabot[bot] Jun 7, 2024
2741a59
assign packages write permission to ghcr push (#5711)
pdabelf5 Jun 7, 2024
4ccfaf6
Bump the go group across 1 directory with 8 updates (#5704)
dependabot[bot] Jun 7, 2024
9b27f38
Bump nginxcontrib/nginx from `8354754` to `2075c93` in /build (#5713)
dependabot[bot] Jun 10, 2024
388c7b6
Bump redhat/ubi9-minimal from `ef6fb6b` to `0d6b09f` in /build (#5714)
dependabot[bot] Jun 10, 2024
c852487
Reduce size of final built images (#5613)
oseoin Jun 10, 2024
fc50dd5
Bump redhat/ubi8 from `2a5d234` to `143123d` in /build (#5715)
dependabot[bot] Jun 10, 2024
ff1eda6
[pre-commit.ci] pre-commit autoupdate (#5724)
pre-commit-ci[bot] Jun 11, 2024
425bad6
Bump docker/build-push-action from 5.3.0 to 5.4.0 in the actions grou…
dependabot[bot] Jun 11, 2024
31c0dc8
Bump the go group with 2 updates (#5721)
dependabot[bot] Jun 11, 2024
4d9f680
Fix ratelimit-scaling for mergable ingresses (#5728)
dbaumgarten Jun 11, 2024
2a848c7
Fix test_dos_sec_logs_on (#5725)
pasmant Jun 12, 2024
41f5868
enable external service args (#5736)
vepatel Jun 12, 2024
0dea2e5
Integrate NAP WAF v5 (#5698)
shaun-nx Jun 12, 2024
6cfed78
Bump github/codeql-action from 3.25.8 to 3.25.9 in the actions group …
dependabot[bot] Jun 13, 2024
898bd86
Mount config and deployments dirs to smoke containers (#5740)
oseoin Jun 13, 2024
4a544a9
Add F5 prefix to configuration opening paragraphs, style consistency …
ADubhlaoich Jun 13, 2024
1298622
Docker image update d41d8cd9 (#5743)
nginx-bot Jun 13, 2024
be05f6e
add release workflow (#5742)
pdabelf5 Jun 14, 2024
a2fc52b
Bump the python group in /tests with 10 updates (#5723)
dependabot[bot] Jun 14, 2024
b0fdf90
Don't count Custom Resources if not enabled at NIC startup (#5749)
jjngx Jun 14, 2024
8277ca6
Bump the go group with 4 updates (#5748)
dependabot[bot] Jun 14, 2024
3be4117
add slack notifications to release workflow (#5751)
pdabelf5 Jun 14, 2024
ffc13a1
Update top level documentation pages for style consistency (#5754)
ADubhlaoich Jun 14, 2024
282a2da
replace skopeo action with skopeo image (#5760)
pdabelf5 Jun 14, 2024
7ff9005
Support APIKey authentication (#5580)
haywoodsh Jun 17, 2024
c5b91bd
API Key Auth Policy Docs (#5752)
j1m-ryan Jun 17, 2024
e307c3a
add functional tests for rate-limit scaling (#5758)
vepatel Jun 17, 2024
c1b7cd8
Bump nginxcontrib/nginx from `2075c93` to `69de271` in /build (#5763)
dependabot[bot] Jun 17, 2024
2601224
Bump nginx from `69f8c2c` to `69f8c2c` in /build (#5764)
dependabot[bot] Jun 18, 2024
0dd9359
ensure wafv5 base images are created (#5771)
pdabelf5 Jun 18, 2024
d5ae348
check pod readiness in ingress scale test (#5774)
vepatel Jun 18, 2024
6d06c26
update values schema from 1.29 to 1.30 (#5772)
j1m-ryan Jun 18, 2024
8e531b3
Workflow refactor (#5766)
pdabelf5 Jun 19, 2024
b39c033
Pipeline fixes (#5785)
pdabelf5 Jun 19, 2024
49762f8
Add examples for app protect waf v5 (#5784)
shaun-nx Jun 19, 2024
357e352
Change results order to allow auto-merge (#5788)
oseoin Jun 19, 2024
1778407
update debian nap waf/dos image to debian:12 (#5780)
pdabelf5 Jun 19, 2024
d94a59f
Snapshot testing for templates (#5735)
oseoin Jun 19, 2024
b7fbc3b
Re-add docs string to telemetry schema file (#5775)
shaun-nx Jun 19, 2024
26060cd
add docker scout scan to pipelines (#5759)
pdabelf5 Jun 19, 2024
8a16ea1
Remove duplicate repo owner and fix smoke test requirement (#5791)
pdabelf5 Jun 19, 2024
b6b02ad
Add name to image promotion and always run promotion (#5793)
oseoin Jun 19, 2024
25d21bc
Merge branch 'main' into trasnport-server-template
ssrahul96 Jun 20, 2024
fa03ce0
added config map resources for transportserver
ssrahul96 Jun 20, 2024
baf9c76
Merge branch 'main' into trasnport-server-template
jjngx Jun 21, 2024
e894449
Docker image update d41d8cd9 (#5822)
nginx-bot Jun 24, 2024
6e5b9c5
Run Trivy & DockerScout on main & release branches (#5818)
pdabelf5 Jun 24, 2024
55eb031
Bump nginx from `d68d230` to `5c0c227` in /build (#5819)
dependabot[bot] Jun 24, 2024
c5a80e9
Skip upload test results on skipped tests (#5827)
oseoin Jun 24, 2024
b213369
Change test upload logic to match test run logic (#5829)
oseoin Jun 24, 2024
a9dc38f
Fix branch prefix for docker sha updates (#5830)
oseoin Jun 24, 2024
42350eb
add permissions to update released images (#5831)
pdabelf5 Jun 24, 2024
9831e1a
Version Bump for 3.7.0 (#5828)
nginx-bot Jun 24, 2024
a89656c
Bump the go group with 1 update (#5821)
dependabot[bot] Jun 24, 2024
3a02710
Forked workflow build (#5835)
oseoin Jun 24, 2024
aab1e7d
Bump the actions group across 1 directory with 5 updates (#5825)
dependabot[bot] Jun 24, 2024
329f527
Add actionlint pre commit plugin (#5839)
pdabelf5 Jun 25, 2024
fec66af
[pre-commit.ci] pre-commit autoupdate (#5841)
pre-commit-ci[bot] Jun 25, 2024
9c86aab
WAF v5 docs update (#5719)
jjngx Jun 25, 2024
91cb4e5
fix v5 path (#5847)
vepatel Jun 25, 2024
8e367b6
Fix build arg for templates (#5844)
oseoin Jun 25, 2024
2dc6c1b
fix api key policy undefined routes (#5838)
j1m-ryan Jun 25, 2024
4357b9b
check for non 50x 404 response (#5851)
vepatel Jun 25, 2024
939dff4
remove sarif artifact upload for images in feature branches (#5850)
pdabelf5 Jun 25, 2024
4de40ae
ensure example versions are updated (#5853)
pdabelf5 Jun 25, 2024
4143a1f
change telemetry to telemetryReporting in docs (#5855)
j1m-ryan Jun 25, 2024
6cd931d
add permissions for gcr login to base image build (#5860)
pdabelf5 Jun 26, 2024
9591864
Chore/python clean up, and unused variable check to pre commit (#5866)
j1m-ryan Jun 26, 2024
cc225ea
Bump docker/build-push-action from 6.1.0 to 6.2.0 in the actions grou…
dependabot[bot] Jun 27, 2024
67d56c1
update docs to 3.6.0 & pipeline fixes for release (#5874)
pdabelf5 Jun 27, 2024
1e423d7
Exclude files from stable tag which don't impact build or test (#5875)
oseoin Jun 27, 2024
afc9753
add run-name to ci & update docker sha workflows (#5876)
pdabelf5 Jun 27, 2024
27660da
Bump the go group with 1 update (#5870)
dependabot[bot] Jun 27, 2024
d15d12b
[removes] `include-year` and `includeYear` flag (#5817)
harsha-mangena Jun 27, 2024
cbb7f07
Docker image update d41d8cd9 (#5881)
nginx-bot Jun 28, 2024
92ea4bc
Bump the go group with 2 updates (#5880)
dependabot[bot] Jun 28, 2024
c0ccb03
Split VSR matrix in 3 (#5883)
j1m-ryan Jun 28, 2024
baf0a81
Add default telemetry endpoint (#5885)
shaun-nx Jun 28, 2024
c3de814
Move some python tests from vs1 to vs2 (#5888)
j1m-ryan Jun 28, 2024
907cf89
add nap-v5 images to image patch workflow (#5894)
pdabelf5 Jul 1, 2024
19c39a1
Change always references to not cancelled (#5898)
oseoin Jul 1, 2024
b6d4412
ensure release draft occurs (#5900)
pdabelf5 Jul 1, 2024
816f6e3
Merge branch 'main' into trasnport-server-template
AlexFenlon Jul 1, 2024
c746cc3
Merge branch 'main' into trasnport-server-template
AlexFenlon Jul 1, 2024
47b6dee
Merge branch 'main' into trasnport-server-template
AlexFenlon Jul 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ For more information, view the [VirtualServer and VirtualServerRoute resources](
|*main-template* | Sets the main NGINX configuration template. | By default the template is read from the file in the container. | [Custom Templates](/nginx-ingress-controller/configuration/global-configuration/custom-templates). |
|*ingress-template* | Sets the NGINX configuration template for an Ingress resource. | By default the template is read from the file on the container. | [Custom Templates](/nginx-ingress-controller/configuration/global-configuration/custom-templates). |
|*virtualserver-template* | Sets the NGINX configuration template for an VirtualServer resource. | By default the template is read from the file on the container. | [Custom Templates](/nginx-ingress-controller/configuration/global-configuration/custom-templates). |
|*transportserver-template* | Sets the NGINX configuration template for a TransportServer resource. | By default the template is read from the file on the container. | [Custom Templates](/nginx-ingress-controller/configuration/global-configuration/custom-templates). |
{{</bootstrap-table>}}

---
Expand Down
7 changes: 7 additions & 0 deletions examples/shared-examples/custom-templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ via the following keys:
- `main-template` - Sets the main NGINX configuration template.
- `ingress-template` - Sets the Ingress NGINX configuration template for an Ingress resource.
- `virtualserver-template` - Sets the NGINX configuration template for an VirtualServer resource.
- `transportserver-template` - Sets the NGINX configuration template for a TransportServer resource.

## Example

Expand Down Expand Up @@ -35,6 +36,12 @@ data:
...
}
{{ end }}
transportserver-template: |
{{- range $u := .Upstreams }}
upstream {{ $u.Name }} {
zone {{ $u.Name }} 256k;
...
}
```

**Notes:**
Expand Down
7 changes: 4 additions & 3 deletions internal/configs/config_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ type ConfigParams struct {
MainServerSSLPreferServerCiphers bool
MainServerSSLProtocols string

IngressTemplate *string
VirtualServerTemplate *string
MainTemplate *string
IngressTemplate *string
VirtualServerTemplate *string
MainTemplate *string
TransportServerTemplate *string

JWTKey string
JWTLoginURL string
Expand Down
4 changes: 4 additions & 0 deletions internal/configs/configmaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ func ParseConfigMap(cfgm *v1.ConfigMap, nginxPlus bool, hasAppProtect bool, hasA
cfgParams.VirtualServerTemplate = &virtualServerTemplate
}

if transportServerTemplate, exists := cfgm.Data["transportserver-template"]; exists {
cfgParams.TransportServerTemplate = &transportServerTemplate
}

if mainStreamSnippets, exists := GetMapKeyAsStringSlice(cfgm.Data, "stream-snippets", cfgm, "\n"); exists {
cfgParams.MainStreamSnippets = mainStreamSnippets
}
Expand Down
7 changes: 7 additions & 0 deletions internal/configs/configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,13 @@ func (cnf *Configurator) UpdateConfig(cfgParams *ConfigParams, resources Extende
}
}

if cfgParams.TransportServerTemplate != nil {
err := cnf.templateExecutorV2.UpdateTransportServerTemplate(cfgParams.TransportServerTemplate)
if err != nil {
return allWarnings, fmt.Errorf("error when parsing the TransportServer template: %w", err)
}
}

mainCfg := GenerateNginxMainConfig(cnf.staticCfgParams, cfgParams)
mainCfgContent, err := cnf.templateExecutor.ExecuteMainConfigTemplate(mainCfg)
if err != nil {
Expand Down
11 changes: 11 additions & 0 deletions internal/configs/version2/template_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ func (te *TemplateExecutor) UpdateVirtualServerTemplate(templateString *string)
return nil
}

// UpdateTransportServerTemplate updates the TransportServer template.
func (te *TemplateExecutor) UpdateTransportServerTemplate(templateString *string) error {
newTemplate, err := template.New("transportServerTemplate").Funcs(helperFunctions).Parse(*templateString)
if err != nil {
return err
}
te.transportServerTemplate = newTemplate

return nil
}

// ExecuteVirtualServerTemplate generates the content of an NGINX configuration file for a VirtualServer resource.
func (te *TemplateExecutor) ExecuteVirtualServerTemplate(cfg *VirtualServerConfig) ([]byte, error) {
var configBuffer bytes.Buffer
Expand Down