Skip to content

Commit 7bfcc21

Browse files
committed
feat(extraobjects): resolved conflicts
2 parents cf961fa + 4bbf44d commit 7bfcc21

File tree

8 files changed

+86
-46
lines changed

8 files changed

+86
-46
lines changed

charts/argus/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ maintainers:
88
name: argus
99
version: 14.1.0-rc01
1010
home: https://logicmonitor.github.io/helm-charts-qa
11-
appVersion: v17.3.0-rt01
11+
appVersion: v17.3.1-rt01
1212
dependencies:
1313
- name: lmutil
1414
repository: https://logicmonitor.github.io/helm-charts-qa

charts/argus/templates/_helpers.tpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ Common labels
77
{{ include "lmutil.generic.labels" . }}
88
app.kubernetes.io/component: discovery-agent
99
{{/*
10+
The following label sets the monitoring mode for Argus resources:
11+
- If this is an upgrade scenario and .Values.monitoringMode is empty, use "Advanced".
12+
- If .Values.monitoringMode is set, use its value. Otherwise, default to "Essentials".
13+
*/}}
14+
{{- if or (has .Values.monitoringMode (list "Minimal" "Essentials" "Essential")) (and (eq .Values.monitoringMode "") (not (.Release.IsUpgrade))) }}
15+
argus.monitoring-mode: "Essentials"
16+
{{- else }}
17+
argus.monitoring-mode: "Advanced"
18+
{{- end}}
19+
{{/*
1020
Adding app property to make it backward compatible in trasition phase.
1121
New datasources or existing datasources should use app.kubernetes.io/name property in its appliesto script
1222
*/}}

charts/argus/templates/post-install.yaml

Lines changed: 46 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,60 +16,68 @@ spec:
1616
spec:
1717
containers:
1818
- name: patch-configmap
19-
image: bitnami/kubectl:latest
19+
image: bitnamisecure/kubectl:latest
2020
command:
2121
- /bin/sh
2222
- -c
2323
args:
2424
- |
2525
set -e
2626
echo "Patching config.yaml inside ConfigMap..."
27-
kubectl get configmap {{ include "lmutil.fullname" . }} -n {{ .Release.Namespace }} -o json | jq -r '.data["config.yaml"]' | yq e -P - >> /tmp/new-config.yaml
27+
kubectl get configmap {{ include "lmutil.fullname" . }} -n {{ .Release.Namespace }} -o yaml | yq '.data["config.yaml"]' >> /tmp/new-config.yaml
2828
29-
echo "🔍 Checking for kube-state-metrics in namespace {{ .Release.Namespace }}..."
29+
KSM_URL="{{ .Values.ksmUrl }}"
30+
if [ -n "$KSM_URL" ] && [ "$KSM_URL" != "null" ]; then
31+
echo "Using user-provided kube-state-metrics URL: $KSM_URL"
32+
else
33+
echo "🔍 Checking for kube-state-metrics in namespace {{ .Release.Namespace }}..."
34+
35+
# First, check in the current namespace
36+
KSM_SVC=$(kubectl get svc -n {{ .Release.Namespace }} -l app.kubernetes.io/name=kube-state-metrics -o json | jq -r '.items[0]')
3037

31-
# First, check in the current namespace
32-
KSM_SVC=$(kubectl get svc -n {{ .Release.Namespace }} -l app.kubernetes.io/name=kube-state-metrics -o json | jq -r '.items[0]')
38+
if [ -n "$KSM_SVC" ] && [ "$KSM_SVC" != "null" ]; then
39+
echo "✅ Found kube-state-metrics in namespace {{ .Release.Namespace }}"
40+
else
41+
echo "⚠️ Not found in {{ .Release.Namespace }}, searching all namespaces..."
3342

34-
if [ -n "$KSM_SVC" ] && [ "$KSM_SVC" != "null" ]; then
35-
echo "✅ Found kube-state-metrics in namespace {{ .Release.Namespace }}"
36-
else
37-
echo "⚠️ Not found in {{ .Release.Namespace }}, searching all namespaces..."
43+
# Search all namespaces
44+
KSM_SVC=$(kubectl get svc --all-namespaces -l app.kubernetes.io/name=kube-state-metrics -o json | jq -r '.items[0]')
3845

39-
# Search all namespaces
40-
KSM_SVC=$(kubectl get svc --all-namespaces -l app.kubernetes.io/name=kube-state-metrics -o json | jq -r '.items[0]')
46+
if [ -z "$KSM_SVC" ] || [ "$KSM_SVC" = "null" ]; then
47+
echo "❌ kube-state-metrics service not found anywhere."
48+
# exit 1
49+
fi
50+
fi
4151

42-
if [ -z "$KSM_SVC" ] || [ "$KSM_SVC" = "null" ]; then
43-
echo "❌ kube-state-metrics service not found anywhere."
44-
# exit 1
45-
fi
46-
fi
52+
# Extract namespace, ClusterIP, and port
53+
SERVICE_NAME=$(echo "$KSM_SVC" | jq -r '.metadata.name')
54+
KSM_NAMESPACE=$(echo "$KSM_SVC" | jq -r '.metadata.namespace')
55+
CLUSTER_IP=$(echo "$KSM_SVC" | jq -r '.spec.clusterIP')
56+
PORT=$(echo "$KSM_SVC" | jq -r '.spec.ports[0].port')
4757

48-
# Extract namespace, ClusterIP, and port
49-
SERVICE_NAME=$(echo "$KSM_SVC" | jq -r '.metadata.name')
50-
KSM_NAMESPACE=$(echo "$KSM_SVC" | jq -r '.metadata.namespace')
51-
CLUSTER_IP=$(echo "$KSM_SVC" | jq -r '.spec.clusterIP')
52-
PORT=$(echo "$KSM_SVC" | jq -r '.spec.ports[0].port')
58+
# Validate all required variables are populated
59+
if [ -z "$SERVICE_NAME" ] || [ -z "$KSM_NAMESPACE" ] || [ -z "$CLUSTER_IP" ] || [ -z "$PORT" ]; then
60+
echo "❌ One or more kube-state-metrics service variables are empty."
61+
echo "SERVICE_NAME: $SERVICE_NAME"
62+
echo "KSM_NAMESPACE: $KSM_NAMESPACE"
63+
echo "CLUSTER_IP: $CLUSTER_IP"
64+
echo "PORT: $PORT"
65+
fi
5366

54-
# Validate all required variables are populated
55-
if [ -z "$SERVICE_NAME" ] || [ -z "$KSM_NAMESPACE" ] || [ -z "$CLUSTER_IP" ] || [ -z "$PORT" ]; then
56-
echo "❌ One or more kube-state-metrics service variables are empty."
57-
echo "SERVICE_NAME: $SERVICE_NAME"
58-
echo "KSM_NAMESPACE: $KSM_NAMESPACE"
59-
echo "CLUSTER_IP: $CLUSTER_IP"
60-
echo "PORT: $PORT"
61-
fi
67+
# Construct metrics endpoint
68+
METRICS_ENDPOINT="http://${SERVICE_NAME}.${KSM_NAMESPACE}.svc.cluster.local:${PORT}/metrics"
69+
echo "📡 kube-state-metrics endpoint: $METRICS_ENDPOINT"
6270

63-
# Construct metrics endpoint
64-
METRICS_ENDPOINT="http://${SERVICE_NAME}.${KSM_NAMESPACE}.svc.cluster.local:${PORT}/metrics"
65-
echo "📡 kube-state-metrics endpoint: $METRICS_ENDPOINT"
71+
yq e -i ".ksmUrl = \"${METRICS_ENDPOINT}\"" /tmp/new-config.yaml
6672

67-
yq e ".ksmUrl = \"${METRICS_ENDPOINT}\"" /tmp/new-config.yaml
73+
# Use yq to create clean patch without quote escaping issues
74+
yq eval -n '{"data": {"config.yaml": strload("/tmp/new-config.yaml")}}' -o json > /tmp/patch.json
75+
kubectl patch configmap {{ include "lmutil.fullname" . }} -n {{ .Release.Namespace }} --type merge --patch-file /tmp/patch.json
6876

69-
kubectl patch configmap {{ include "lmutil.fullname" . }} -n {{ .Release.Namespace }} --type merge -p "$(jq -n --arg cfg "$(cat /tmp/new-config.yaml | sed 's/"/\\"/g')" '{data: {"config.yaml": $cfg}}')"
70-
UPDATED=$(kubectl get configmap {{ include "lmutil.fullname" . }} -n {{ .Release.Namespace }} -o json | jq -r '.data["config.yaml"]')
77+
UPDATED=$(kubectl get configmap {{ include "lmutil.fullname" . }} -n {{ .Release.Namespace }} -o yaml | yq '.data["config.yaml"]')
7178

72-
echo "ConfigMap patched successfully. $UPDATED"
79+
echo "ConfigMap patched successfully. $UPDATED"
80+
fi
7381

7482
# Initialize variables with global scope (use export to make them available to subshells)
7583
export SECRET_DATA=""
@@ -273,5 +281,7 @@ spec:
273281
env:
274282
- name: HOME
275283
value: /tmp
284+
- name: GODEBUG
285+
value: boringcrypto=1
276286
restartPolicy: Never
277287
serviceAccountName: {{ include "lmutil.serviceAccountName" . }}

charts/argus/values.schema.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@
153153
"create": true
154154
},
155155
"serviceAccount": {
156-
"create": true
156+
"create": true,
157+
"name": ""
157158
}
158159
}
159160
],
@@ -2610,7 +2611,12 @@
26102611
"default": {},
26112612
"examples": [
26122613
{
2613-
"create": true
2614+
"create": true,
2615+
"name": ""
2616+
},
2617+
{
2618+
"create": true,
2619+
"name": "custom-service-account"
26142620
}
26152621
],
26162622
"required": [
@@ -2626,6 +2632,17 @@
26262632
"examples": [
26272633
true
26282634
]
2635+
},
2636+
"name": {
2637+
"$comment": "tf:optional",
2638+
"$id": "#/properties/serviceAccount/properties/name",
2639+
"type": "string",
2640+
"title": "The name schema",
2641+
"description": "Custom service account name. If not specified, defaults to the fullname of the release.",
2642+
"default": "",
2643+
"examples": [
2644+
"custom-service-account"
2645+
]
26292646
}
26302647
},
26312648
"additionalProperties": false

charts/argus/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ rbac:
236236
create: true
237237
serviceAccount:
238238
create: true
239+
# name: "" # Optional: specify a custom service account name
239240

240241
probe:
241242
enabled: true

charts/collectorset-controller/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ maintainers:
66
77
name: LogicMonitor
88
name: collectorset-controller
9-
version: 12.0.0-rc02
9+
version: 12.1.1-rt01
1010
home: https://logicmonitor.github.io/helm-charts-qa
11-
appVersion: v13.2.0-rt01
11+
appVersion: v13.3.0-rt01
1212
dependencies:
1313
- name: lmutil
1414
repository: https://logicmonitor.github.io/helm-charts-qa

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
spec:
1616
containers:
1717
- name: patch-configmap
18-
image: bitnami/kubectl:latest
18+
image: bitnamisecure/kubectl:latest
1919
command:
2020
- /bin/sh
2121
- -c
@@ -215,5 +215,7 @@ spec:
215215
env:
216216
- name: HOME
217217
value: /tmp
218+
- name: GODEBUG
219+
value: boringcrypto=1
218220
restartPolicy: Never
219221
serviceAccountName: {{ include "lmutil.serviceAccountName" . }}

charts/lm-container/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: lm-container
33
description: A Helm chart for Logicmonitor's Kubernetes monitoring solutions
44
type: application
5-
version: 12.0.0-rc03
5+
version: 12.0.2-rt01
66
maintainers:
77
- name: LogicMonitor
88
@@ -11,7 +11,7 @@ kubeVersion: ">= 1.16.0-0"
1111
dependencies:
1212
- name: argus
1313
# need to explicitly quote to make it string, else json schema fails
14-
version: "14.0.0-rc03"
14+
version: "14.0.2-rt01"
1515
repository: https://logicmonitor.github.io/helm-charts-qa
1616
# uncomment to test umbrella chart in while developing
1717
# repository: file://../argus
@@ -22,7 +22,7 @@ dependencies:
2222
- monitoring
2323
- name: collectorset-controller
2424
# need to explicitly quote to make it string, else json schema fails
25-
version: "12.0.0-rc02"
25+
version: "12.1.1-rt01"
2626
repository: https://logicmonitor.github.io/helm-charts-qa
2727
# uncomment to test umbrella chart in while developing
2828
# repository: file://../collectorset-controller
@@ -58,7 +58,7 @@ dependencies:
5858
- condition: kube-state-metrics.enabled
5959
name: kube-state-metrics
6060
repository: https://prometheus-community.github.io/helm-charts
61-
version: 6.1.5
61+
version: 6.3.0
6262
- name: lmutil
6363
repository: https://logicmonitor.github.io/helm-charts-qa
6464
# uncomment to test umbrella chart in while developing

0 commit comments

Comments
 (0)