redhat-developer-hub-must-gather

by joaquinito2051

Helm chartv2.1.0App 2.1.0

A Helm chart for running the RHDH Must-Gather diagnostic tool on Kubernetes

About this chart

Must Gather Chart for Red Hat Developer Hub (RHDH)

A Helm chart for running the RHDH Must-Gather diagnostic tool on Kubernetes

Homepage: https://github.com/redhat-developer/rhdh-must-gather

Maintainers

NameEmailUrl
Red Hathttps://redhat.com

Source Code

Requirements

Kubernetes: >= 1.27.0-0

TL;DR

helm upgrade --install my-rhdh-must-gather redhat-developer-hub-must-gather \
  --repo https://redhat-developer.github.io/rhdh-chart \
  --version 2.1.0 \
  [--wait --timeout=$duration]

Running the command again will automatically replace the previous pod and start a new gather.

Then follow the instructions that will be printed to retrieve the gathered data.

When using --wait, the helm command will return only when the gather init container has finished or the specified timeout has elapsed.

Note that the default Helm timeout when using --wait is 5m (5 minutes), which may be too short for the RHDH must-gather to finish collecting diagnostic data. Feel free to adjust accordingly.

Running on OpenShift

This chart works on both Kubernetes and OpenShift.

But for OpenShift, we recommend using the oc adm must-gather command, like so:

oc adm must-gather --image=quay.io/rhdh-community/rhdh-must-gather

See the must-gather tool README for more details.

Testing a Release

Once a Helm Release has been deployed, you can test it using the helm test command:

helm test <release_name>

This will run a simple Pod in the cluster to check that the required resources have been created.

You can control whether to disable this test pod or you can also customize the image it leverages. See the test.enabled and test.image parameters in the values.yaml file.

Tip: Disabling the test pod will not prevent the helm test command from passing later on. It will simply report that no test suite is available.

Below are a few examples:

helm install <release_name> <repo> \
  --set test.enabled=false
helm install <release_name> <repo> \
  --set test.image.registry=docker.io \
  --set test.image.repository=bitnami/kubectl \
  --set test.image.tag=1.30.0

Uninstalling the Chart

To uninstall/delete a Helm release named my-rhdh-must-gather:

helm uninstall my-rhdh-must-gather

The command removes all the Kubernetes resources associated with the chart and deletes the release.

Values

KeyDescriptionTypeDefault
affinityAffinity rules for pod schedulingobject{}
dataHolderRuns 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.resourcesResource requests and limits for the data-holder containerobject{"limits":{"cpu":"100m","ephemeral-storage":"64Mi","memory":"128Mi"},"requests":{"cpu":"50m","ephemeral-storage":"32Mi","memory":"64Mi"}}
fullnameOverridestring""
gatherGather script configurationobject{"clusterInfo":false,"cmdTimeout":"30","extraArgs":[],"extraEnvVars":[],"heapDump":{"bufferSize":"","enabled":false,"instances":"","method":"","remoteDir":"","timeout":""},"logLevel":"info","namespaces":[],"since":"","sinceTime":"","withHelm":true,"withIngress":true,"withNamespaceInspect":true,"withOperator":true,"withOrchestrator":true,"withPlatform":true,"withRoute":true,"withSecrets":false}
gather.cmdTimeoutCommand timeout for individual kubectl/helm commands (seconds)string"30"
gather.extraArgsAdditional custom arguments to pass to the gather scriptlist[]
gather.extraEnvVarsAdditional environment variables to pass to the gather init container. See Define Environment variables for a container.list[]
gather.heapDumpHeap dump collection configurationobject{"bufferSize":"","enabled":false,"instances":"","method":"","remoteDir":"","timeout":""}
gather.heapDump.bufferSizeWebSocket buffer size in bytes for inspector methodstring""
gather.heapDump.enabledEnable collection of heap dumps (disabled by default)boolfalse
gather.heapDump.instancesFilter for specific heap dump instances (comma-separated pod names or patterns)string""
gather.heapDump.methodMethod for heap dump collection: "inspector" or "sigusr2"string""
gather.heapDump.remoteDirDirectory in container where heap dumps are written for SIGUSR2 method. Must be writable inside the gather container.string""
gather.heapDump.timeoutTimeout in seconds for heap dump collectionstring""
gather.logLevelLog level: info, INFO, debug, DEBUG, trace, TRACEstring"info"
gather.namespacesExample: ["rhdh-prod", "rhdh-staging"]list[]
gather.sinceRelative time for log collection (e.g., "2h", "30m")string""
gather.sinceTimeAbsolute timestamp for log collection (RFC3339 format)string""
gather.withOperatorCollection features (enabled by default; set to false to skip)booltrue
gather.withSecretsOptional collection features (disabled by default)boolfalse
imageContainer image configurationobject{"digest":"sha256:46122c2fef691f48a747ef8f9863b039535b8b88c0ed8cb770e6476e7c6d7acf","pullPolicy":"","registry":"registry.access.redhat.com","repository":"rhdh/rhdh-must-gather-rhel10","tag":""}
image.digestImage digest (e.g., sha256:abc123...). Can be used with or without tag.string"sha256:46122c2fef691f48a747ef8f9863b039535b8b88c0ed8cb770e6476e7c6d7acf"
image.tagOverrides the image tag whose default is the chart appVersion.string""
imagePullSecretsSecrets for pulling images from a private registrylist[]
nameOverrideOverride the chart namestring""
nodeSelectorNode selector for pod schedulingobject{}
persistencePersistent volume configuration for storing gathered dataobject{"accessMode":"ReadWriteOnce","size":"1Gi","storageClass":""}
persistence.accessModeAccess modestring"ReadWriteOnce"
persistence.sizeStorage sizestring"1Gi"
persistence.storageClassStorage class (empty = use cluster default)string""
podAnnotationsPod annotationsobject{}
podLabelsPod labelsobject{}
podSecurityContextPod security contextobject{"runAsNonRoot":true,"seccompProfile":{"type":"RuntimeDefault"}}
rbacRBAC configurationobject{"create":true,"rules":{"backstages":true,"ingresses":true,"knative":true,"monitoring":true,"olm":true,"platform":true,"routes":true,"sonataflow":true},"scope":"cluster"}
rbac.createCreate RBAC resources (Role/ClusterRole and bindings)booltrue
rbac.rulesa rule here does not require disabling the corresponding gather.with* flag.object{"backstages":true,"ingresses":true,"knative":true,"monitoring":true,"olm":true,"platform":true,"routes":true,"sonataflow":true}
rbac.rules.backstagesrhdh.redhat.com — Backstage custom resourcesbooltrue
rbac.rules.ingressesnetworking.k8s.io — Ingresses, NetworkPoliciesbooltrue
rbac.rules.knativeoperator.knative.dev, operator.serverless.openshift.io — Knative/Serverlessbooltrue
rbac.rules.monitoringmonitoring.coreos.com — ServiceMonitors (Prometheus Operator)booltrue
rbac.rules.olmoperators.coreos.com — OLM resources (subscriptions, CSVs, etc.)booltrue
rbac.rules.platformconfig.openshift.io — ClusterVersions, Infrastructures (cluster scope only)booltrue
rbac.rules.routesroute.openshift.io — OpenShift Routesbooltrue
rbac.rules.sonataflowsonataflow.org — SonataFlow custom resourcesbooltrue
resourcesResource requests and limits for the gather containerobject{"limits":{"cpu":"500m","ephemeral-storage":"128Mi","memory":"512Mi"},"requests":{"cpu":"100m","ephemeral-storage":"64Mi","memory":"128Mi"}}
securityContextContainer security contextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]}}
serviceAccountService account configurationobject{"annotations":{},"name":"","tokenExpirationSeconds":3600}
serviceAccount.annotationsAnnotations to add to the service accountobject{}
serviceAccount.nameIf not set, a name is generated using the fullname template.string""
serviceAccount.tokenExpirationSecondsinto the gather init container (minimum 600).int3600
strategyDeployment strategyobject{"type":"Recreate"}
testHelm test configurationobject{"enabled":true,"image":{"digest":"sha256:87f66688da4e206d5a1877088626c542288a5ccd97898cf363b588d57817e6be","pullPolicy":"","registry":"registry.access.redhat.com","repository":"ubi9","tag":"latest"}}
test.enabledEnable the Helm testbooltrue
test.imageImage for the test podobject{"digest":"sha256:87f66688da4e206d5a1877088626c542288a5ccd97898cf363b588d57817e6be","pullPolicy":"","registry":"registry.access.redhat.com","repository":"ubi9","tag":"latest"}
tolerationsTolerations for pod schedulinglist[]

Deploy redhat-developer-hub-must-gather with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has redhat-developer-hub-must-gather on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartredhat-developer-hub-must-gather is pinned at v2.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply