Skip to content

Trim new lines when reading password_file for Redis password.

Release notes

Problem to solve

We have a customer where they upgraded the GitLab that is installed via helm chart. In newer versions of the GitLab Helm chart, gitlab-kas will use password_file to specify the Redis password.

When they defined the Redis password in the secret, the customer didn't trim the new line.

While webservice pods and sidekiq pods are starting correctly (which means it trimmed the new line when trying to connect to Redis), gitlab-kas is failing to start due to an invalid password.

Proposal

Looking at cmd/kas/kasapp/configured_app.go, it looks like we are not trimming the password read from the password file.

It would be better to trim this so that the same Redis secret that works with the webservice and sidekiq pods, would also work for gitlab-kas pods.

Intended users

Feature Usage Metrics

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by Julian Paul Dasmarinas