Skip to content

Commit 61b9caa

Browse files
authored
Merge branch 'main' into feat/update-ttl-seconds-on-job-to-work-with-argocd
2 parents 1737039 + 05828f4 commit 61b9caa

File tree

14 files changed

+1505
-284
lines changed

14 files changed

+1505
-284
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
- name: Build binary
172172
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
173173
with:
174-
version: v2.9.0 # renovate: datasource=github-tags depName=goreleaser/goreleaser
174+
version: v2.10.2 # renovate: datasource=github-tags depName=goreleaser/goreleaser
175175
args: ${{ github.ref_type == 'tag' && 'release' || 'build --snapshot' }} --clean
176176
env:
177177
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/conformance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
- name: Build binary
8080
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
8181
with:
82-
version: v2.9.0 # renovate: datasource=github-tags depName=goreleaser/goreleaser
82+
version: v2.10.2 # renovate: datasource=github-tags depName=goreleaser/goreleaser
8383
args: build --single-target --snapshot --clean
8484
env:
8585
TELEMETRY_ENDPOINT: "" # disables sending telemetry

.github/workflows/functional.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
- name: Build binary
7474
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
7575
with:
76-
version: v2.9.0 # renovate: datasource=github-tags depName=goreleaser/goreleaser
76+
version: v2.10.2 # renovate: datasource=github-tags depName=goreleaser/goreleaser
7777
args: build --single-target --snapshot --clean
7878
env:
7979
TELEMETRY_ENDPOINT: otel-collector-opentelemetry-collector.collector.svc.cluster.local:4317

build/Dockerfile.nginx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ ADD --link --chown=101:1001 https://cs.nginx.com/static/keys/nginx_signing.rsa.p
66

77
FROM nginx:1.28.0-alpine-otel
88

9-
# renovate: datasource=github-tags depName=nginx/agent extractVersion=^v?(?<version>.*)$
10-
ARG NGINX_AGENT_VERSION=3.0.0
9+
# renovate: datasource=github-tags depName=nginx/agent
10+
ARG NGINX_AGENT_VERSION=v3.0.1
1111
ARG NJS_DIR
1212
ARG NGINX_CONF_DIR
1313
ARG BUILD_AGENT
1414

1515
RUN --mount=type=bind,from=nginx-files,src=nginx_signing.rsa.pub,target=/etc/apk/keys/nginx_signing.rsa.pub \
1616
printf "%s\n" "https://packages.nginx.org/nginx-agent/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
17-
&& apk add --no-cache nginx-agent=${NGINX_AGENT_VERSION}
17+
&& apk add --no-cache nginx-agent=${NGINX_AGENT_VERSION#v}
1818

1919
RUN apk add --no-cache libcap bash \
2020
&& mkdir -p /usr/lib/nginx/modules \

build/Dockerfile.nginxplus

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ ADD --link --chown=101:1001 https://cs.nginx.com/static/keys/nginx_signing.rsa.p
77
FROM alpine:3.21
88

99
ARG NGINX_PLUS_VERSION=R34
10-
# renovate: datasource=github-tags depName=nginx/agent extractVersion=^v?(?<version>.*)$
11-
ARG NGINX_AGENT_VERSION=3.0.0
10+
# renovate: datasource=github-tags depName=nginx/agent
11+
ARG NGINX_AGENT_VERSION=v3.0.1
1212
ARG NJS_DIR
1313
ARG NGINX_CONF_DIR
1414
ARG BUILD_AGENT
@@ -20,7 +20,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/apk/cert.pem,mode=0644 \
2020
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
2121
&& printf "%s\n" "https://pkgs.nginx.com/plus/${NGINX_PLUS_VERSION}/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
2222
&& printf "%s\n" "https://pkgs.nginx.com/nginx-agent/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
23-
&& apk add --no-cache nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-agent=${NGINX_AGENT_VERSION}
23+
&& apk add --no-cache nginx-plus nginx-plus-module-njs nginx-plus-module-otel nginx-agent=${NGINX_AGENT_VERSION#v}
2424

2525
RUN apk add --no-cache libcap bash \
2626
&& mkdir -p /usr/lib/nginx/modules \

charts/nginx-gateway-fabric/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,15 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
252252

253253
| Key | Description | Type | Default |
254254
|-----|-------------|------|---------|
255-
| `certGenerator` | The certGenerator section contains the configuration for the cert-generator Job. | object | `{"agentTLSSecretName":"agent-tls","annotations":{},"overwrite":false,"serverTLSSecretName":"server-tls","ttlSecondsAfterFinished":0}` |
255+
| `certGenerator` | The certGenerator section contains the configuration for the cert-generator Job. | object | `{"affinity":{},"agentTLSSecretName":"agent-tls","annotations":{},"nodeSelector":{},"overwrite":false,"serverTLSSecretName":"server-tls","tolerations":[],"topologySpreadConstraints":[]}` |
256+
| `certGenerator.affinity` | The affinity of the cert-generator pod. | object | `{}` |
256257
| `certGenerator.agentTLSSecretName` | The name of the base Secret containing TLS CA, certificate, and key for the NGINX Agent to securely communicate with the NGINX Gateway Fabric control plane. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `"agent-tls"` |
257258
| `certGenerator.annotations` | The annotations of the cert-generator Job. | object | `{}` |
259+
| `certGenerator.nodeSelector` | The nodeSelector of the cert-generator pod. | object | `{}` |
258260
| `certGenerator.overwrite` | Overwrite existing TLS Secrets on startup. | bool | `false` |
259261
| `certGenerator.serverTLSSecretName` | The name of the Secret containing TLS CA, certificate, and key for the NGINX Gateway Fabric control plane to securely communicate with the NGINX Agent. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `"server-tls"` |
262+
| `certGenerator.tolerations` | Tolerations for the cert-generator pod. | list | `[]` |
263+
| `certGenerator.topologySpreadConstraints` | The topology spread constraints for the cert-generator pod. | list | `[]` |
260264
| `clusterDomain` | The DNS cluster domain of your Kubernetes cluster. | string | `"cluster.local"` |
261265
| `gateways` | A list of Gateway objects. View https://gateway-api.sigs.k8s.io/reference/spec/#gateway for full Gateway reference. | list | `[]` |
262266
| `nginx` | The nginx section contains the configuration for all NGINX data plane deployments installed by the NGINX Gateway Fabric control plane. | object | `{"config":{},"container":{},"debug":false,"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric/nginx","tag":"edge"},"imagePullSecret":"","imagePullSecrets":[],"kind":"deployment","plus":false,"pod":{},"replicas":1,"service":{"externalTrafficPolicy":"Local","loadBalancerClass":"","loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePorts":[],"type":"LoadBalancer"},"usage":{"caSecretName":"","clientSSLSecretName":"","endpoint":"","resolver":"","secretName":"nplus-license","skipVerify":false}}` |

charts/nginx-gateway-fabric/templates/certs-job.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,19 @@ spec:
154154
fsGroup: 1001
155155
runAsNonRoot: true
156156
ttlSecondsAfterFinished: {{ .Values.certGenerator.ttlSecondsAfterFinished }}
157+
{{- if .Values.certGenerator.topologySpreadConstraints }}
158+
topologySpreadConstraints:
159+
{{- toYaml .Values.certGenerator.topologySpreadConstraints | nindent 6 }}
160+
{{- end }}
161+
{{- if .Values.certGenerator.affinity }}
162+
affinity:
163+
{{- toYaml .Values.certGenerator.affinity | nindent 8 }}
164+
{{- end }}
165+
{{- if .Values.certGenerator.tolerations }}
166+
tolerations:
167+
{{- toYaml .Values.certGenerator.tolerations | nindent 6 }}
168+
{{- end }}
169+
{{- if .Values.certGenerator.nodeSelector }}
170+
nodeSelector:
171+
{{- toYaml .Values.certGenerator.nodeSelector | nindent 8 }}
172+
{{- end }}

charts/nginx-gateway-fabric/values.schema.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
"certGenerator": {
55
"description": "The certGenerator section contains the configuration for the cert-generator Job.",
66
"properties": {
7+
"affinity": {
8+
"description": "The affinity of the cert-generator pod.",
9+
"required": [],
10+
"title": "affinity",
11+
"type": "object"
12+
},
713
"agentTLSSecretName": {
814
"default": "agent-tls",
915
"description": "The name of the base Secret containing TLS CA, certificate, and key for the NGINX Agent to securely\ncommunicate with the NGINX Gateway Fabric control plane. Must exist in the same namespace that the\nNGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway).",
@@ -17,6 +23,12 @@
1723
"title": "annotations",
1824
"type": "object"
1925
},
26+
"nodeSelector": {
27+
"description": "The nodeSelector of the cert-generator pod.",
28+
"required": [],
29+
"title": "nodeSelector",
30+
"type": "object"
31+
},
2032
"overwrite": {
2133
"default": false,
2234
"description": "Overwrite existing TLS Secrets on startup.",
@@ -36,6 +48,23 @@
3648
"required": [],
3749
"title": "ttlSecondsAfterFinished",
3850
"type": "integer"
51+
"tolerations": {
52+
"description": "Tolerations for the cert-generator pod.",
53+
"items": {
54+
"required": []
55+
},
56+
"required": [],
57+
"title": "tolerations",
58+
"type": "array"
59+
},
60+
"topologySpreadConstraints": {
61+
"description": "The topology spread constraints for the cert-generator pod.",
62+
"items": {
63+
"required": []
64+
},
65+
"required": [],
66+
"title": "topologySpreadConstraints",
67+
"type": "array"
3968
}
4069
},
4170
"required": [],

charts/nginx-gateway-fabric/values.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,19 @@ certGenerator:
479479
# -- Overwrite existing TLS Secrets on startup.
480480
overwrite: false
481481

482-
ttlSecondsAfterFinished: 0
482+
# -- How long to wait after the cert generato job has finished before it is reaped by the job controller
483+
ttlSecondsAfterFinished: 90
484+
# -- Tolerations for the cert-generator pod.
485+
tolerations: []
486+
487+
# -- The nodeSelector of the cert-generator pod.
488+
nodeSelector: {}
489+
490+
# -- The affinity of the cert-generator pod.
491+
affinity: {}
492+
493+
# -- The topology spread constraints for the cert-generator pod.
494+
topologySpreadConstraints: []
483495

484496
# -- A list of Gateway objects. View https://gateway-api.sigs.k8s.io/reference/spec/#gateway for full Gateway reference.
485497
gateways: []

0 commit comments

Comments
 (0)