How to Customize Rails Secrets

Set the following environment variables first:

export NEW_GITLAB_NAMESPACE=<namespace of the new GitLab instance>
export NEW_GITLAB_NAME=<name of the new GitLab instance>

Save the Rails secrets in a local secrets.yml file.

Example:

# Create the file
cat > secrets.yml <<EOF
production:
  secret_key_base: ...
  otp_key_base: ...
  ...
EOF

Save the Rails secrets to a Kubernetes Secret:

kubectl create secret generic rails-secret -n ${NEW_GITLAB_NAMESPACE} --from-file=secrets.yml

Update the GitLab instance configuration:

kubectl edit gitlabofficial ${NEW_GITLAB_NAME} -n ${NEW_GITLAB_NAMESPACE}

Add the following spec configuration to the CR:

spec:
  helmValues:
    global:
      railsSecrets:
        secret: rails-secret

Wait for the instance to complete redeployment.


GitLab is a trademark of GitLab Inc.

Alauda is an independent vendor. This product is not affiliated with, endorsed by, or sponsored by GitLab Inc. All trademarks are the property of their respective owners and are used here for identification purposes only.