Skip to content
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
2 changes: 1 addition & 1 deletion charts/must-gather/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ maintainers:
# Versions are expected to follow Semantic Versioning (https://semver.org/)
# Note that when this chart is published to https://github.com/openshift-helm-charts/charts
# it will follow the RHDH versioning 1.y.z
version: 0.1.0
version: 0.2.0
7 changes: 4 additions & 3 deletions charts/must-gather/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Must Gather Chart for Red Hat Developer Hub (RHDH)

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for deploying the RHDH Must-Gather diagnostic tool on Kubernetes
Expand All @@ -27,7 +27,7 @@ Kubernetes: `>= 1.27.0-0`
```console
helm upgrade --install my-rhdh-must-gather rhdh-must-gather \
--repo https://redhat-developer.github.io/rhdh-chart \
--version 0.1.0
--version 0.2.0
```

Running the command again will automatically replace the previous pod and start a new gather.
Expand Down Expand Up @@ -105,9 +105,10 @@ The command removes all the Kubernetes resources associated with the chart and d
| dataHolder | Runs alongside the gather container and stays alive so you can exec in and retrieve the output. | object | `{"resources":{"limits":{"cpu":"100m","ephemeral-storage":"64Mi","memory":"128Mi"},"requests":{"cpu":"50m","ephemeral-storage":"32Mi","memory":"64Mi"}}}` |
| dataHolder.resources | Resource requests and limits for the data-holder container | object | `{"limits":{"cpu":"100m","ephemeral-storage":"64Mi","memory":"128Mi"},"requests":{"cpu":"50m","ephemeral-storage":"32Mi","memory":"64Mi"}}` |
| fullnameOverride | | string | `""` |
| gather | Gather script configuration | object | `{"clusterInfo":false,"cmdTimeout":"30","extraArgs":[],"logLevel":"info","namespaces":[],"since":"","sinceTime":"","withHeapDumps":false,"withHelm":true,"withIngress":true,"withNamespaceInspect":true,"withOperator":true,"withOrchestrator":true,"withPlatform":true,"withRoute":true,"withSecrets":false}` |
| gather | Gather script configuration | object | `{"clusterInfo":false,"cmdTimeout":"30","extraArgs":[],"extraEnvVars":[],"logLevel":"info","namespaces":[],"since":"","sinceTime":"","withHeapDumps":false,"withHelm":true,"withIngress":true,"withNamespaceInspect":true,"withOperator":true,"withOrchestrator":true,"withPlatform":true,"withRoute":true,"withSecrets":false}` |
| gather.cmdTimeout | Command timeout for individual kubectl/helm commands (seconds) | string | `"30"` |
| gather.extraArgs | Additional custom arguments to pass to the gather script | list | `[]` |
| gather.extraEnvVars | Additional environment variables to pass to the gather init container.<br/> See [Define Environment variables for a container](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#define-an-environment-variable-for-a-container). | list | `[]` |
| gather.logLevel | Log level: info, INFO, debug, DEBUG, trace, TRACE | string | `"info"` |
| gather.namespaces | Example: ["rhdh-prod", "rhdh-staging"] | list | `[]` |
| gather.since | Relative time for log collection (e.g., "2h", "30m") | string | `""` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
gather:
withSecrets: true
clusterInfo: true
logLevel: "DEBUG"
logLevel: "INFO"
extraEnvVars:
- name: CMD_TIMEOUT
value: "5"
- name: LOG_LEVEL
value: "debug"
3 changes: 3 additions & 0 deletions charts/must-gather/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ spec:
- name: MUST_GATHER_SINCE_TIME
value: {{ .Values.gather.sinceTime | quote }}
{{- end }}
{{- with .Values.gather.extraEnvVars }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- $nsScope := ne .Values.rbac.scope "cluster" }}
{{- $effectiveNamespaces := .Values.gather.namespaces }}
{{- if $nsScope }}
Expand Down
118 changes: 118 additions & 0 deletions charts/must-gather/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,124 @@
"title": "Additional custom arguments to pass to the gather script.",
"type": "array"
},
"extraEnvVars": {
"default": [],
"items": {
"description": "EnvVar represents an environment variable present in a Container.",
"properties": {
"name": {
"description": "Name of the environment variable. Must be a C_IDENTIFIER.",
"type": "string"
},
"value": {
"description": "Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".",
"type": "string"
},
"valueFrom": {
"description": "EnvVarSource represents a source for the value of an EnvVar.",
"properties": {
"configMapKeyRef": {
"description": "Selects a key from a ConfigMap.",
"properties": {
"key": {
"description": "The key to select.",
"type": "string"
},
"name": {
"description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
"type": "string"
},
"optional": {
"description": "Specify whether the ConfigMap or its key must be defined",
"type": "boolean"
}
},
"required": [
"key"
],
"type": "object",
"x-kubernetes-map-type": "atomic"
},
"fieldRef": {
"description": "ObjectFieldSelector selects an APIVersioned field of an object.",
"properties": {
"apiVersion": {
"description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".",
"type": "string"
},
"fieldPath": {
"description": "Path of the field to select in the specified API version.",
"type": "string"
}
},
"required": [
"fieldPath"
],
"type": "object",
"x-kubernetes-map-type": "atomic"
},
"resourceFieldRef": {
"description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
"properties": {
"containerName": {
"description": "Container name: required for volumes, optional for env vars",
"type": "string"
},
"divisor": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"resource": {
"description": "Required: resource to select",
"type": "string"
}
},
"required": [
"resource"
],
"type": "object",
"x-kubernetes-map-type": "atomic"
},
"secretKeyRef": {
"description": "SecretKeySelector selects a key of a Secret.",
"properties": {
"key": {
"description": "The key of the secret to select from. Must be a valid secret key.",
"type": "string"
},
"name": {
"description": "Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
"type": "string"
},
"optional": {
"description": "Specify whether the Secret or its key must be defined",
"type": "boolean"
}
},
"required": [
"key"
],
"type": "object",
"x-kubernetes-map-type": "atomic"
}
},
"type": "object"
}
},
"required": [
"name"
],
"type": "object"
},
"title": "Additional environment variables to pass to the gather init container.",
"type": "array"
},
"logLevel": {
"default": "info",
"enum": [
Expand Down
8 changes: 8 additions & 0 deletions charts/must-gather/values.schema.tmpl.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@
"type": "string"
},
"default": []
},
"extraEnvVars": {
"title": "Additional environment variables to pass to the gather init container.",
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.33.4/_definitions.json#/definitions/io.k8s.api.core.v1.EnvVar"
},
"default": []
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions charts/must-gather/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ gather:
# -- Additional custom arguments to pass to the gather script
extraArgs: []

# -- Additional environment variables to pass to the gather init container.<br/>
# See [Define Environment variables for a container](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#define-an-environment-variable-for-a-container).
extraEnvVars: []

# -- Resource requests and limits for the gather container
resources:
requests:
Expand Down
Loading