Skip to content

Commit 23cfa40

Browse files
feat(lookup): changed hook-delete-policy (#503)
* feat(lookup): changed hook-delete-policy * feat(lookup): fixed govcloud companydomain bug
1 parent d5c5bc7 commit 23cfa40

File tree

8 files changed

+84
-4
lines changed

8 files changed

+84
-4
lines changed

charts/argus/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ maintainers:
66
77
name: LogicMonitor
88
name: argus
9-
version: 14.0.0-rc01
9+
version: 14.0.0-rc02
1010
home: https://logicmonitor.github.io/helm-charts-qa
1111
appVersion: v17.3.0-rt01
1212
dependencies:

charts/argus/templates/post-install.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ apiVersion: batch/v1
22
kind: Job
33
metadata:
44
name: argus-props-patch-{{ .Release.Name }}
5+
labels:
6+
{{- include "argus.labels" . | nindent 4 }}
7+
app.kubernetes.io/job: config-updater
58
annotations:
69
"helm.sh/hook": post-install,post-upgrade
710
"helm.sh/hook-delete-policy": before-hook-creation
11+
{{- include "argus.annotations" . | nindent 4 }}
12+
813
spec:
14+
ttlSecondsAfterFinished: {{ .Values.patchJob.ttlSecondsAfterFinished | default 1800 }} # delete this job from cluster after 30 mins
915
template:
1016
spec:
1117
containers:
@@ -133,7 +139,7 @@ spec:
133139
COMPANY_DOMAIN_ENV=$(cat << EOF
134140
{
135141
"name": "COMPANY_DOMAIN",
136-
"value": {{ .Values.companyDomain | default "logicmonitor.com" | quote }}
142+
"value": {{ .Values.global.companyDomain | default "logicmonitor.com" | quote }}
137143
}
138144
EOF
139145
)

charts/argus/values.schema.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@
8888
}
8989
},
9090
"filters": [],
91+
"patchJob": {
92+
"ttlSecondsAfterFinished": 1800
93+
},
9194
"selfMonitor": {
9295
"enable": false,
9396
"port": 2112
@@ -1410,6 +1413,35 @@
14101413
},
14111414
"additionalProperties": false
14121415
},
1416+
"patchJob": {
1417+
"$id": "#/properties/patchJob",
1418+
"$comment": "tf:optional",
1419+
"type": "object",
1420+
"title": "The Argus Props Patch Job Schema",
1421+
"description": "Configurations for Argus Props Patch Job",
1422+
"default": {},
1423+
"examples": [
1424+
{
1425+
"ttlSecondsAfterFinished": 1800
1426+
}
1427+
],
1428+
"required": [],
1429+
"properties": {
1430+
"ttlSecondsAfterFinished": {
1431+
"$comment": "tf:optional",
1432+
"$id": "#/properties/patchJob/properties/ttlSecondsAfterFinished",
1433+
"type": "integer",
1434+
"title": "Time To Live After PatchJob Completion",
1435+
"description": "Specifies the time-to-live (in seconds) for the patchJob resource after it has completed execution. Once this duration has passed, the job and its associated pods will be automatically cleaned up by Kubernetes",
1436+
"default": 1800,
1437+
"examples": [
1438+
60,
1439+
1800
1440+
]
1441+
}
1442+
},
1443+
"additionalProperties": false
1444+
},
14131445
"selfMonitor": {
14141446
"$id": "#/properties/selfMonitor",
14151447
"$comment": "tf:optional",

charts/argus/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ lm:
130130
nodes: []
131131
etcd: []
132132
filters: []
133+
patchJob:
134+
ttlSecondsAfterFinished: 1800 # delete this job from cluster after 30 mins
133135
selfMonitor:
134136
enable: false
135137
port: 2112

charts/collectorset-controller/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ maintainers:
66
77
name: LogicMonitor
88
name: collectorset-controller
9-
version: 12.0.0-rc01
9+
version: 12.0.0-rc02
1010
home: https://logicmonitor.github.io/helm-charts-qa
1111
appVersion: v13.2.0-rt01
1212
dependencies:

charts/collectorset-controller/templates/post-install.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ apiVersion: batch/v1
22
kind: Job
33
metadata:
44
name: csc-props-patch-{{ .Release.Name }}
5+
labels:
6+
{{- include "collectorset-controller.labels" . | nindent 4}}
7+
app.kubernetes.io/job: config-updater
58
annotations:
69
"helm.sh/hook": post-install,post-upgrade
710
"helm.sh/hook-delete-policy": before-hook-creation
11+
{{- include "collectorset-controller.annotations" . | nindent 4}}
812
spec:
13+
ttlSecondsAfterFinished: {{ .Values.patchJob.ttlSecondsAfterFinished | default 1800 }} # delete this job from cluster after 30 mins
914
template:
1015
spec:
1116
containers:
@@ -86,7 +91,7 @@ spec:
8691
COMPANY_DOMAIN_ENV=$(cat << EOF
8792
{
8893
"name": "COMPANY_DOMAIN",
89-
"value": {{ .Values.companyDomain | default "logicmonitor.com" | quote }}
94+
"value": {{ .Values.global.companyDomain | default "logicmonitor.com" | quote }}
9095
}
9196
EOF
9297
)

charts/collectorset-controller/values.schema.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
"labels": {},
4040
"annotations": {},
4141
"ignoreSSL": false,
42+
"patchJob": {
43+
"ttlSecondsAfterFinished": 1800
44+
},
4245
"global": {
4346
"accessID": "",
4447
"accessKey": "",
@@ -514,6 +517,36 @@
514517
false
515518
]
516519
},
520+
"patchJob": {
521+
"$id": "#/properties/patchJob",
522+
"$comment": "tf:optional",
523+
"type": "object",
524+
"title": "The CollectorSet Props Patch Job Schema",
525+
"description": "Configurations for CollectorSet Props Patch Job",
526+
"default": {},
527+
"examples": [
528+
{
529+
"ttlSecondsAfterFinished": 1800
530+
}
531+
],
532+
"required": [
533+
],
534+
"properties": {
535+
"ttlSecondsAfterFinished": {
536+
"$comment": "tf:optional",
537+
"$id": "#/properties/patchJob/properties/ttlSecondsAfterFinished",
538+
"type": "integer",
539+
"title": "Time To Live After PatchJob Completion",
540+
"description": "Specifies the time-to-live (in seconds) for the patchJob resource after it has completed execution. Once this duration has passed, the job and its associated pods will be automatically cleaned up by Kubernetes",
541+
"default": 1800,
542+
"examples": [
543+
60,
544+
1800
545+
]
546+
}
547+
},
548+
"additionalProperties": false
549+
},
517550
"global": {
518551
"$comment": "tf:optional",
519552
"$id": "#/properties/global",

charts/collectorset-controller/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ labels: {}
5555
annotations: {}
5656
# Set flag to ignore ssl/tls validation
5757
ignoreSSL: false
58+
patchJob:
59+
ttlSecondsAfterFinished: 1800 # delete this job from cluster after 30 mins
5860

5961
imagePullSecrets: []
6062
global:

0 commit comments

Comments
 (0)