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

chore: create one time jobs with unix epoch #49

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions cis-k8s-job/templates/cis-job.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apiVersion: batch/v1
kind: Job
metadata:
name: cis-k8s-job
name: cis-k8s-job-{{ now | unixEpoch }}
namespace: {{ .Release.Namespace }}
spec:
# keep the job for 2 hours after successful completion
ttlSecondsAfterFinished: 7200
template:
metadata:
name: cis-k8s-job
name: cis-k8s-job-{{ now | unixEpoch }}
labels:
app: cis-k8s-job
app: cis-k8s-job-{{ now | unixEpoch }}
spec:
{{- if or (or (contains "master" .Values.toolConfig.nodeType) (contains "controlplane" .Values.toolConfig.nodeType)) (or (contains "master" .Values.toolConfig.targets) (contains "controlplane" .Values.toolConfig.targets)) }}
{{- include "masterConfig" .Values.toolConfig | trim | nindent 6 }}
Expand Down
4 changes: 2 additions & 2 deletions k8s-risk-assessment-job/templates/job.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: batch/v1
kind: Job
metadata:
name: k8s-risk-assessment-job
name: k8s-risk-assessment-job-{{ now | unixEpoch }}
namespace: {{ .Release.Namespace }}
spec:
# keep the job for 2 hours after successful completion
ttlSecondsAfterFinished: 7200
template:
metadata:
labels:
app: k8s-risk-assessment-job
app: k8s-risk-assessment-job-{{ now | unixEpoch }}
spec:
{{- if .Values.imagePullSecrets.name }}
imagePullSecrets:
Expand Down
4 changes: 2 additions & 2 deletions k8tls-job/templates/k8tls-job.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: batch/v1
kind: Job
metadata:
name: k8tls-job
name: k8tls-job-{{ now | unixEpoch }}
namespace: {{ .Release.Namespace }}
spec:
# keep the job for 2 hours after successful completion
ttlSecondsAfterFinished: 7200
template:
metadata:
name: k8tls-job
name: k8tls-job-{{ now | unixEpoch }}
spec:
{{- if .Values.imagePullSecrets.name }}
imagePullSecrets:
Expand Down
4 changes: 2 additions & 2 deletions kiem-job/templates/job.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: batch/v1
kind: Job
metadata:
name: kiem-job
name: kiem-job-{{ now | unixEpoch }}
namespace: {{ .Release.Namespace }}
spec:
# keep the job for 2 hours after successful completion
ttlSecondsAfterFinished: 7200
template:
metadata:
labels:
app: kiem-job
app: kiem-job-{{ now | unixEpoch }}
spec:
{{- if .Values.imagePullSecrets.name }}
imagePullSecrets:
Expand Down
Loading