mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-09 05:06:29 +10:00
[bitnami/node-exporter] Add tests and publishing using VIB (#12727)
* [bitnami/node-exporter] Add tests and publishing using VIB Signed-off-by: FraPazGal <fdepaz@vmware.com> * update CD pipeline Signed-off-by: FraPazGal <fdepaz@vmware.com> * Modify missing resourceName for cluster-wide resource Signed-off-by: FraPazGal <fdepaz@vmware.com> Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
@@ -49,6 +49,7 @@ on: # rebuild any PRs and main branch changes
|
||||
- 'bitnami/nginx-intel/**'
|
||||
- 'bitnami/nginx/**'
|
||||
- 'bitnami/node/**'
|
||||
- 'bitnami/node-exporter/**'
|
||||
- 'bitnami/odoo/**'
|
||||
- 'bitnami/opencart/**'
|
||||
- 'bitnami/osclass/**'
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"baseUrl": "http://localhost/"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
it('can check cluster health', () => {
|
||||
cy.request({
|
||||
method: 'GET',
|
||||
url: '/metrics',
|
||||
form: true,
|
||||
}).then((response) => {
|
||||
expect(response.status).to.eq(200);
|
||||
expect(response.body).to.contain('node_network_info gauge');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
file:
|
||||
/host/proc:
|
||||
exists: true
|
||||
filetype: directory
|
||||
mode: "0555"
|
||||
owner: root
|
||||
/host/sys:
|
||||
exists: true
|
||||
filetype: directory
|
||||
mode: "0555"
|
||||
owner: root
|
||||
/var/run/secrets/kubernetes.io/serviceaccount:
|
||||
exists: {{ .Vars.serviceAccount.automountServiceAccountToken }}
|
||||
filetype: directory
|
||||
mode: "3777"
|
||||
command:
|
||||
check-user-info:
|
||||
exec: id
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- uid={{ .Vars.containerSecurityContext.runAsUser }}
|
||||
- /groups=.*{{ .Vars.podSecurityContext.fsGroup }}/
|
||||
@@ -0,0 +1,9 @@
|
||||
serviceAccount:
|
||||
automountServiceAccountToken: true
|
||||
podSecurityContext:
|
||||
fsGroup: 1002
|
||||
containerSecurityContext:
|
||||
runAsUser: 1002
|
||||
service:
|
||||
ports:
|
||||
metrics: 80
|
||||
@@ -22,11 +22,11 @@
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "/bitnami/node-exporter"
|
||||
},
|
||||
"runtime_parameters": "InNlcnZpY2UiOgogICJwb3J0cyI6IAogICAgIm1ldHJpY3MiOiA4MAogICJ0eXBlIjogIkxvYWRCYWxhbmNlciIK",
|
||||
"runtime_parameters": "cmJhYzoKICBjcmVhdGU6IHRydWUKICBwc3BFbmFibGVkOiB0cnVlCnNlcnZpY2VBY2NvdW50OgogIGNyZWF0ZTogdHJ1ZQogIGF1dG9tb3VudFNlcnZpY2VBY2NvdW50VG9rZW46IHRydWUKY29udGFpbmVyUG9ydHM6CiAgbWV0cmljczogOTEwMQpwb2RTZWN1cml0eUNvbnRleHQ6CiAgZW5hYmxlZDogdHJ1ZQogIGZzR3JvdXA6IDEwMDIKY29udGFpbmVyU2VjdXJpdHlDb250ZXh0OgogIGVuYWJsZWQ6IHRydWUKICBydW5Bc1VzZXI6IDEwMDIKc2VydmljZToKICBwb3J0czogCiAgICBtZXRyaWNzOiA4MAogIHR5cGU6IExvYWRCYWxhbmNlcg==",
|
||||
"target_platform": {
|
||||
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
|
||||
"size": {
|
||||
"name": "S4"
|
||||
"name": "L4"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -37,6 +37,28 @@
|
||||
"endpoint": "lb-node-exporter-metrics",
|
||||
"app_protocol": "HTTP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/node-exporter/goss"
|
||||
},
|
||||
"remote": {
|
||||
"workload": "ds-node-exporter"
|
||||
},
|
||||
"vars_file": "vars.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "cypress",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/node-exporter/cypress"
|
||||
},
|
||||
"endpoint": "lb-node-exporter-metrics",
|
||||
"app_protocol": "HTTP"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "/bitnami/node-exporter"
|
||||
},
|
||||
"runtime_parameters": "InNlcnZpY2UiOgogICJwb3J0cyI6IAogICAgIm1ldHJpY3MiOiA4MAogICJ0eXBlIjogIkxvYWRCYWxhbmNlciIK",
|
||||
"runtime_parameters": "cmJhYzoKICBjcmVhdGU6IHRydWUKICBwc3BFbmFibGVkOiB0cnVlCnNlcnZpY2VBY2NvdW50OgogIGNyZWF0ZTogdHJ1ZQogIGF1dG9tb3VudFNlcnZpY2VBY2NvdW50VG9rZW46IHRydWUKY29udGFpbmVyUG9ydHM6CiAgbWV0cmljczogOTEwMQpwb2RTZWN1cml0eUNvbnRleHQ6CiAgZW5hYmxlZDogdHJ1ZQogIGZzR3JvdXA6IDEwMDIKY29udGFpbmVyU2VjdXJpdHlDb250ZXh0OgogIGVuYWJsZWQ6IHRydWUKICBydW5Bc1VzZXI6IDEwMDIKc2VydmljZToKICBwb3J0czogCiAgICBtZXRyaWNzOiA4MAogIHR5cGU6IExvYWRCYWxhbmNlcg==",
|
||||
"target_platform": {
|
||||
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
|
||||
"size": {
|
||||
"name": "S4"
|
||||
"name": "L4"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -37,6 +37,28 @@
|
||||
"endpoint": "lb-node-exporter-metrics",
|
||||
"app_protocol": "HTTP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/node-exporter/goss"
|
||||
},
|
||||
"remote": {
|
||||
"workload": "ds-node-exporter"
|
||||
},
|
||||
"vars_file": "vars.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "cypress",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/node-exporter/cypress"
|
||||
},
|
||||
"endpoint": "lb-node-exporter-metrics",
|
||||
"app_protocol": "HTTP"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -24,4 +24,4 @@ sources:
|
||||
- https://github.com/bitnami/containers/tree/main/bitnami/node-exporter
|
||||
- https://github.com/prometheus/node_exporter
|
||||
- https://prometheus.io/
|
||||
version: 3.1.4
|
||||
version: 3.2.0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
kind: ClusterRole
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}-psp
|
||||
name: {{ printf "%s-%s" (include "common.names.fullname.namespace" .) "psp" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
@@ -17,7 +17,7 @@ rules:
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
resourceNames:
|
||||
- {{ template "common.names.fullname" . }}
|
||||
- {{ template "common.names.fullname.namespace" . }}
|
||||
{{- if .Values.rbac.rules }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}-psp
|
||||
name: {{ printf "%s-%s" (include "common.names.fullname.namespace" .) "psp" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
@@ -15,7 +15,7 @@ metadata:
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "common.names.fullname" . }}-psp
|
||||
name: {{ printf "%s-%s" (include "common.names.fullname.namespace" .) "psp" }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "node-exporter.serviceAccountName" . }}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
name: {{ template "common.names.fullname.namespace" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
Reference in New Issue
Block a user