-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Cannot view newly created flux 2 package from UX #4173 #4204
Fix for Cannot view newly created flux 2 package from UX #4173 #4204
Conversation
Cannot view newly created flux 2 package from UX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, Greg, thanks for the quick fix!
// '[TargetNamespace-]Name'. | ||
if helmReleaseName == "" { | ||
targetNamespace := rel.Spec.TargetNamespace | ||
// according to docs targetNamespace is optional and defaults to the namespace of the HelmRelease |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting, not necessary for this fix, but for the related #4189, that the behaviour flux shows is slightly different to below (see my notes from updating the flux CR on #4172, or your notes on #4189) but still consistent with the comment above: the namespace targeted by the HelmRelease
defaults to the namespace of the HelmRelease
, but flux doesn't set the targetNamespace
field with that value, it remains empty as specified. And when the targetNamespace
is empty/unset, the helm release name is just the HelmRelease.metadata.name
(ie. not prefixed by the namespace at all, and so different to below). This is why I was unsure why we were explicitly setting the targetNamespace
given flux's default behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting, not necessary for this fix, but for the related #4189, that the behaviour flux shows is slightly different to below (see my notes from updating the flux CR on #4172, or your notes on #4189) but still consistent with the comment above: the namespace targeted by the
HelmRelease
defaults to the namespace of theHelmRelease
, but flux doesn't set thetargetNamespace
field with that value, it remains empty as specified. And when thetargetNamespace
is empty/unset, the helm release name is just theHelmRelease.metadata.name
(ie. not prefixed by the namespace at all, and so different to below). This is why I was unsure why we were explicitly setting thetargetNamespace
given flux's default behaviour.
noted
if targetNamespace == "" { | ||
targetNamespace = key.Namespace | ||
} | ||
helmReleaseName = fmt.Sprintf("%s-%s", targetNamespace, key.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just leaving this here so I can refer to it on your related issue #4189, not suggesting the change for this PR
if targetNamespace == "" { | |
targetNamespace = key.Namespace | |
} | |
helmReleaseName = fmt.Sprintf("%s-%s", targetNamespace, key.Name) | |
helmReleaseName = key.Name | |
if targetNamespace != "" { | |
helmReleaseName = fmt.Sprintf("%s-%s", targetNamespace, key.Name) | |
} |
which would match the behaviour that I saw by default from flux, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, sounds good
No description provided.