Skip to content

Commit 837a961

Browse files
committed
Defaulting job's ttlSecondsAfterFinished to work with argocd
1 parent 5e77415 commit 837a961

File tree

13 files changed

+21
-12
lines changed

13 files changed

+21
-12
lines changed

charts/nginx-gateway-fabric/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ 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"}` |
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}` |
256256
| `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"` |
257257
| `certGenerator.annotations` | The annotations of the cert-generator Job. | object | `{}` |
258258
| `certGenerator.overwrite` | Overwrite existing TLS Secrets on startup. | bool | `false` |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ spec:
153153
securityContext:
154154
fsGroup: 1001
155155
runAsNonRoot: true
156-
ttlSecondsAfterFinished: 0
156+
ttlSecondsAfterFinished: {{ .Values.certGenerator.ttlSecondsAfterFinished }}

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@
3030
"required": [],
3131
"title": "serverTLSSecretName",
3232
"type": "string"
33-
}
33+
},
34+
"ttlSecondsAfterFinished": {
35+
"default": 0,
36+
"description": "The number of seconds after which the cert-generator Job will be deleted after it has finished.\nThis is useful to avoid having a large number of completed Jobs in the cluster. And for allowing argocd to complete pre and post sync hooks.",
37+
"required": [],
38+
"title": "ttlSecondsAfterFinished",
39+
"type": "integer"
40+
}
3441
},
3542
"required": [],
3643
"title": "certGenerator",

charts/nginx-gateway-fabric/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ certGenerator:
479479
# -- Overwrite existing TLS Secrets on startup.
480480
overwrite: false
481481

482+
ttlSecondsAfterFinished: 0
483+
482484
# -- A list of Gateway objects. View https://gateway-api.sigs.k8s.io/reference/spec/#gateway for full Gateway reference.
483485
gateways: []
484486

deploy/azure/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ spec:
367367
fsGroup: 1001
368368
runAsNonRoot: true
369369
serviceAccountName: nginx-gateway-cert-generator
370-
ttlSecondsAfterFinished: 0
370+
ttlSecondsAfterFinished: 90
371371
---
372372
apiVersion: gateway.networking.k8s.io/v1
373373
kind: GatewayClass

deploy/default/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ spec:
365365
fsGroup: 1001
366366
runAsNonRoot: true
367367
serviceAccountName: nginx-gateway-cert-generator
368-
ttlSecondsAfterFinished: 0
368+
ttlSecondsAfterFinished: 90
369369
---
370370
apiVersion: gateway.networking.k8s.io/v1
371371
kind: GatewayClass

deploy/experimental-nginx-plus/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ spec:
373373
fsGroup: 1001
374374
runAsNonRoot: true
375375
serviceAccountName: nginx-gateway-cert-generator
376-
ttlSecondsAfterFinished: 0
376+
ttlSecondsAfterFinished: 90
377377
---
378378
apiVersion: gateway.networking.k8s.io/v1
379379
kind: GatewayClass

deploy/experimental/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ spec:
370370
fsGroup: 1001
371371
runAsNonRoot: true
372372
serviceAccountName: nginx-gateway-cert-generator
373-
ttlSecondsAfterFinished: 0
373+
ttlSecondsAfterFinished: 90
374374
---
375375
apiVersion: gateway.networking.k8s.io/v1
376376
kind: GatewayClass

deploy/nginx-plus/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ spec:
368368
fsGroup: 1001
369369
runAsNonRoot: true
370370
serviceAccountName: nginx-gateway-cert-generator
371-
ttlSecondsAfterFinished: 0
371+
ttlSecondsAfterFinished: 90
372372
---
373373
apiVersion: gateway.networking.k8s.io/v1
374374
kind: GatewayClass

deploy/nodeport/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ spec:
365365
fsGroup: 1001
366366
runAsNonRoot: true
367367
serviceAccountName: nginx-gateway-cert-generator
368-
ttlSecondsAfterFinished: 0
368+
ttlSecondsAfterFinished: 90
369369
---
370370
apiVersion: gateway.networking.k8s.io/v1
371371
kind: GatewayClass

deploy/openshift/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ spec:
387387
fsGroup: 1001
388388
runAsNonRoot: true
389389
serviceAccountName: nginx-gateway-cert-generator
390-
ttlSecondsAfterFinished: 0
390+
ttlSecondsAfterFinished: 90
391391
---
392392
apiVersion: gateway.networking.k8s.io/v1
393393
kind: GatewayClass

deploy/snippets-filters-nginx-plus/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ spec:
371371
fsGroup: 1001
372372
runAsNonRoot: true
373373
serviceAccountName: nginx-gateway-cert-generator
374-
ttlSecondsAfterFinished: 0
374+
ttlSecondsAfterFinished: 90
375375
---
376376
apiVersion: gateway.networking.k8s.io/v1
377377
kind: GatewayClass

deploy/snippets-filters/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ spec:
368368
fsGroup: 1001
369369
runAsNonRoot: true
370370
serviceAccountName: nginx-gateway-cert-generator
371-
ttlSecondsAfterFinished: 0
371+
ttlSecondsAfterFinished: 90
372372
---
373373
apiVersion: gateway.networking.k8s.io/v1
374374
kind: GatewayClass

0 commit comments

Comments
 (0)