From b9b49e7df4e0f5ca481e4b60275d2d10b47ea11f Mon Sep 17 00:00:00 2001 From: sagar-mamdapure Date: Fri, 28 Nov 2025 16:29:18 +0530 Subject: [PATCH 1/2] feat(argus,csc): support for overriding registry and image details --- charts/argus/Chart.yaml | 8 +- charts/argus/templates/_helpers.tpl | 1 - charts/argus/templates/post-install.yaml | 3 +- charts/argus/values.schema.json | 107 +++++++++++++++++- charts/argus/values.yaml | 6 + charts/collectorset-controller/Chart.yaml | 8 +- .../templates/post-install.yaml | 3 +- .../values.schema.json | 102 ++++++++++++++++- charts/collectorset-controller/values.yaml | 6 + 9 files changed, 223 insertions(+), 21 deletions(-) diff --git a/charts/argus/Chart.yaml b/charts/argus/Chart.yaml index 79cea5ec..8d78e889 100644 --- a/charts/argus/Chart.yaml +++ b/charts/argus/Chart.yaml @@ -6,11 +6,11 @@ maintainers: - email: argus@logicmonitor.com name: LogicMonitor name: argus -version: 14.1.0-rt01 +version: 14.2.0-rc01 home: https://logicmonitor.github.io/helm-charts-qa appVersion: v17.3.1-rt01 dependencies: - name: lmutil - repository: https://logicmonitor.github.io/helm-charts-qa - # repository: file://../lmutil - version: 0.1.10-rt02 + # repository: https://logicmonitor.github.io/helm-charts-qa + repository: file://../lmutil + version: 0.1.11-rc02 diff --git a/charts/argus/templates/_helpers.tpl b/charts/argus/templates/_helpers.tpl index 44d05524..a91c9dcf 100644 --- a/charts/argus/templates/_helpers.tpl +++ b/charts/argus/templates/_helpers.tpl @@ -123,7 +123,6 @@ app: collector "{{ $repo }}/{{ .Values.collector.image.name }}" {{- end -}} - {{/* Collector Pod security context */}} diff --git a/charts/argus/templates/post-install.yaml b/charts/argus/templates/post-install.yaml index 2c96477a..adfffd01 100644 --- a/charts/argus/templates/post-install.yaml +++ b/charts/argus/templates/post-install.yaml @@ -16,7 +16,8 @@ spec: spec: containers: - name: patch-configmap - image: bitnamisecure/kubectl:latest + image: {{ include "lmutil.patchjob-image" . }} + imagePullPolicy: {{ .Values.patchJob.image.pullPolicy | default (.Values.global.image.pullPolicy | default "IfNotPresent") }} command: - /bin/sh - -c diff --git a/charts/argus/values.schema.json b/charts/argus/values.schema.json index 13cdd801..e9dc24ae 100644 --- a/charts/argus/values.schema.json +++ b/charts/argus/values.schema.json @@ -89,7 +89,14 @@ }, "filters": [], "patchJob": { - "ttlSecondsAfterFinished": 1800 + "ttlSecondsAfterFinished": 1800, + "image": { + "registry": "", + "repository": "", + "name": "kubectl", + "tag": "latest", + "pullPolicy": "" + } }, "selfMonitor": { "enable": false, @@ -1427,12 +1434,17 @@ "default": {}, "examples": [ { - "ttlSecondsAfterFinished": 1800 + "ttlSecondsAfterFinished": 1800, + "image": { + "registry": "public.ecr.aws/logicmonitor", + "name": "kubectl", + "tag": "latest" + } } ], "required": [], "properties": { - "ttlSecondsAfterFinished": { + "ttlSecondsAfterFinished": { "$comment": "tf:optional", "$id": "#/properties/patchJob/properties/ttlSecondsAfterFinished", "type": "integer", @@ -1440,10 +1452,93 @@ "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", "default": 1800, "examples": [ - 60, - 1800 + 60, + 1800 ] - } + }, + "image": { + "$id": "#/properties/patchJob/properties/image", + "$comment": "tf:optional", + "type": "object", + "title": "Patch Job Image Schema", + "description": "The kubectl image used by the post-install patch job. Allows customers to use their own registry.", + "default": {}, + "examples": [ + { + "registry": "public.ecr.aws", + "repository": "logicmonitor", + "name": "kubectl", + "tag": "v1.0.0", + "pullPolicy": "IfNotPresent" + } + ], + "properties": { + "registry": { + "$id": "#/properties/patchJob/properties/image/properties/registry", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Registry", + "description": "The Docker Registry for the kubectl image. Falls back to global.image.registry if not set.", + "default": "", + "examples": [ + "public.ecr.aws" + ] + }, + "repository": { + "$id": "#/properties/patchJob/properties/image/properties/repository", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Repository", + "description": "The Docker Repository for the kubectl image. Only used when registry is not set (defaults to 'logicmonitor'). When using a custom registry, leave empty unless you need an additional path segment.", + "default": "", + "examples": [ + "logicmonitor", + "" + ] + }, + "name": { + "$id": "#/properties/patchJob/properties/image/properties/name", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Name", + "description": "The Docker Image Name for kubectl.", + "default": "kubectl", + "examples": [ + "kubectl" + ] + }, + "tag": { + "$id": "#/properties/patchJob/properties/image/properties/tag", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Tag", + "description": "The Docker Image Tag for kubectl.", + "default": "latest", + "examples": [ + "latest", + "v1.0.0" + ] + }, + "pullPolicy": { + "$id": "#/properties/patchJob/properties/image/properties/pullPolicy", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Pull Policy", + "description": "The image pull policy for the kubectl image. Falls back to global.image.pullPolicy or IfNotPresent.", + "default": "", + "enum": [ + "Always", + "IfNotPresent", + "Never", + "" + ], + "examples": [ + "IfNotPresent" + ] + } + }, + "additionalProperties": false + } }, "additionalProperties": false }, diff --git a/charts/argus/values.yaml b/charts/argus/values.yaml index f3db948f..8d7f50cf 100644 --- a/charts/argus/values.yaml +++ b/charts/argus/values.yaml @@ -132,6 +132,12 @@ lm: filters: [] patchJob: ttlSecondsAfterFinished: 1800 # delete this job from cluster after 30 mins + image: + registry: "" # Optional: e.g., "public.ecr.aws/logicmonitor" + repository: "" # Optional: only needed if registry requires additional path segment. Defaults to "logicmonitor" when no registry is set. + name: "kubectl" + tag: "latest" + pullPolicy: "" # Defaults to global.image.pullPolicy or "IfNotPresent" selfMonitor: enable: false port: 2112 diff --git a/charts/collectorset-controller/Chart.yaml b/charts/collectorset-controller/Chart.yaml index 0868e7e8..e96ad291 100644 --- a/charts/collectorset-controller/Chart.yaml +++ b/charts/collectorset-controller/Chart.yaml @@ -6,14 +6,14 @@ maintainers: - email: argus@logicmonitor.com name: LogicMonitor name: collectorset-controller -version: 12.2.0-rt01 +version: 12.3.0-rc01 home: https://logicmonitor.github.io/helm-charts-qa appVersion: v13.3.0-rt01 dependencies: - name: lmutil - repository: https://logicmonitor.github.io/helm-charts-qa - # repository: file://../lmutil - version: 0.1.10-rt02 + # repository: https://logicmonitor.github.io/helm-charts-qa + repository: file://../lmutil + version: 0.1.11-rc02 annotations: artifacthub.io/crds: | - kind: CollectorSet diff --git a/charts/collectorset-controller/templates/post-install.yaml b/charts/collectorset-controller/templates/post-install.yaml index abf09ccd..6ddf4fc6 100644 --- a/charts/collectorset-controller/templates/post-install.yaml +++ b/charts/collectorset-controller/templates/post-install.yaml @@ -15,7 +15,8 @@ spec: spec: containers: - name: patch-configmap - image: bitnamisecure/kubectl:latest + image: {{ include "lmutil.patchjob-image" . }} + imagePullPolicy: {{ .Values.patchJob.image.pullPolicy | default (.Values.global.image.pullPolicy | default "IfNotPresent") }} command: - /bin/sh - -c diff --git a/charts/collectorset-controller/values.schema.json b/charts/collectorset-controller/values.schema.json index 22d8e4b7..dbd0ad2a 100644 --- a/charts/collectorset-controller/values.schema.json +++ b/charts/collectorset-controller/values.schema.json @@ -45,7 +45,14 @@ "annotations": {}, "ignoreSSL": false, "patchJob": { - "ttlSecondsAfterFinished": 1800 + "ttlSecondsAfterFinished": 1800, + "image": { + "registry": "", + "repository": "", + "name": "kubectl", + "tag": "latest", + "pullPolicy": "" + } }, "global": { "accessID": "", @@ -590,11 +597,15 @@ "default": {}, "examples": [ { - "ttlSecondsAfterFinished": 1800 + "ttlSecondsAfterFinished": 1800, + "image": { + "registry": "public.ecr.aws/logicmonitor", + "name": "kubectl", + "tag": "latest" + } } ], - "required": [ - ], + "required": [], "properties": { "ttlSecondsAfterFinished": { "$comment": "tf:optional", @@ -607,6 +618,89 @@ 60, 1800 ] + }, + "image": { + "$id": "#/properties/patchJob/properties/image", + "$comment": "tf:optional", + "type": "object", + "title": "Patch Job Image Schema", + "description": "The kubectl image used by the post-install patch job. Allows customers to use their own registry.", + "default": {}, + "examples": [ + { + "registry": "public.ecr.aws", + "repository": "logicmonitor", + "name": "kubectl", + "tag": "v1.0.0", + "pullPolicy": "IfNotPresent" + } + ], + "properties": { + "registry": { + "$id": "#/properties/patchJob/properties/image/properties/registry", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Registry", + "description": "The Docker Registry for the kubectl image. Falls back to global.image.registry if not set.", + "default": "", + "examples": [ + "public.ecr.aws" + ] + }, + "repository": { + "$id": "#/properties/patchJob/properties/image/properties/repository", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Repository", + "description": "The Docker Repository for the kubectl image. Only used when registry is not set (defaults to 'logicmonitor'). When using a custom registry, leave empty unless you need an additional path segment.", + "default": "", + "examples": [ + "logicmonitor", + "" + ] + }, + "name": { + "$id": "#/properties/patchJob/properties/image/properties/name", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Name", + "description": "The Docker Image Name for kubectl.", + "default": "kubectl", + "examples": [ + "kubectl" + ] + }, + "tag": { + "$id": "#/properties/patchJob/properties/image/properties/tag", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Tag", + "description": "The Docker Image Tag for kubectl.", + "default": "latest", + "examples": [ + "latest", + "v1.0.0" + ] + }, + "pullPolicy": { + "$id": "#/properties/patchJob/properties/image/properties/pullPolicy", + "$comment": "tf:optional", + "type": "string", + "title": "Patch Job Image Pull Policy", + "description": "The image pull policy for the kubectl image. Falls back to global.image.pullPolicy or IfNotPresent.", + "default": "", + "enum": [ + "Always", + "IfNotPresent", + "Never", + "" + ], + "examples": [ + "IfNotPresent" + ] + } + }, + "additionalProperties": false } }, "additionalProperties": false diff --git a/charts/collectorset-controller/values.yaml b/charts/collectorset-controller/values.yaml index 8d5ea79a..ef5de5d0 100644 --- a/charts/collectorset-controller/values.yaml +++ b/charts/collectorset-controller/values.yaml @@ -61,6 +61,12 @@ annotations: {} ignoreSSL: false patchJob: ttlSecondsAfterFinished: 1800 # delete this job from cluster after 30 mins + image: + registry: "" # Optional: e.g., "public.ecr.aws/logicmonitor" + repository: "" # Optional: only needed if registry requires additional path segment. Defaults to "logicmonitor" when no registry is set. + name: "kubectl" + tag: "latest" + pullPolicy: "" # Defaults to global.image.pullPolicy or "IfNotPresent" imagePullSecrets: [] global: From f99d25cbc359daeef0930415c3001a1cfbfa9102 Mon Sep 17 00:00:00 2001 From: sagar-mamdapure Date: Fri, 28 Nov 2025 16:31:35 +0530 Subject: [PATCH 2/2] feat(argus,csc): minor fix --- charts/argus/Chart.yaml | 6 +++--- charts/collectorset-controller/Chart.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/argus/Chart.yaml b/charts/argus/Chart.yaml index 8d78e889..cffdb839 100644 --- a/charts/argus/Chart.yaml +++ b/charts/argus/Chart.yaml @@ -11,6 +11,6 @@ home: https://logicmonitor.github.io/helm-charts-qa appVersion: v17.3.1-rt01 dependencies: - name: lmutil - # repository: https://logicmonitor.github.io/helm-charts-qa - repository: file://../lmutil - version: 0.1.11-rc02 + repository: https://logicmonitor.github.io/helm-charts-qa + # repository: file://../lmutil + version: 0.1.10-rt02 diff --git a/charts/collectorset-controller/Chart.yaml b/charts/collectorset-controller/Chart.yaml index e96ad291..e9d52715 100644 --- a/charts/collectorset-controller/Chart.yaml +++ b/charts/collectorset-controller/Chart.yaml @@ -11,9 +11,9 @@ home: https://logicmonitor.github.io/helm-charts-qa appVersion: v13.3.0-rt01 dependencies: - name: lmutil - # repository: https://logicmonitor.github.io/helm-charts-qa - repository: file://../lmutil - version: 0.1.11-rc02 + repository: https://logicmonitor.github.io/helm-charts-qa + # repository: file://../lmutil + version: 0.1.10-rt02 annotations: artifacthub.io/crds: | - kind: CollectorSet