This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
[RHIDP-2246] Fix reconciliation issue when referenced ConfigMap/Secret has a dot (.
) in its name
#363
Merged
openshift-merge-bot
merged 3 commits into
janus-idp:main
from
rm3l:RHIDP-2246--cannot-mount-a-secret-configmap-with-a-.-in-its-name
May 28, 2024
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm3l
changed the title
fix: Fix reconciliation issue when referenced ConfigMap/Secret has a dot (
[RHIDP-2246] Fix reconciliation issue when referenced ConfigMap/Secret has a dot (May 21, 2024
.
) in its name [RHIDP-2246].
) in its name
gazarenkov
suggested changes
May 27, 2024
Co-authored-by: Gennady Azarenkov <gazarenkov@gmail.com>
Quality Gate passedIssues Measures |
gazarenkov
approved these changes
May 28, 2024
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gazarenkov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
openshift-ci
bot
added
the
approved
PR has been approved by an approver from all required OWNERS files. Required by Prow.
label
May 28, 2024
rm3l
deleted the
RHIDP-2246--cannot-mount-a-secret-configmap-with-a-.-in-its-name
branch
May 28, 2024 08:29
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue when a ConfigMap or Secret is referenced in the CR and contains a dot (
.
) in its name. The operator would use the ConfigMap/Secret name as is as the volume name in the Deployment Spec, which could be reported as invalid by Kubernetes.This PR makes sure to sanitize volume names, such that they are RFC 1123-compliant, as depicted in https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.
Which issue(s) does this PR fix or relate to
PR acceptance criteria
rhdh-operator.csv.yaml
file accordinglyHow to test changes / Special notes to the reviewer
See the updated example in examples/rhdh-cr-with-app-configs.yaml.
Prior to the changes here, this example would not be reconciled properly. Now it works as expected.