-
Notifications
You must be signed in to change notification settings - Fork 229
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
Feature Request: Enable namespaceAnnotations (and namespaceLabels) as targetCustomizations #2441
Comments
Possible duplicate of #2262 |
@manno I'm interested in namespaceAnnotations as a targetCustomization, but it is very similar to the namespaceLabels one! |
Additional QAProblem
SolutionBoth TestingEngineering TestingManual TestingN/A Automated TestingEnd-to-end tests have been added to cover merging of namespace labels and annotations specified at the root of
QA Testing ConsiderationsN/A Regressions ConsiderationsN/A |
System Information
QA Observations:
GitRepo UsedapiVersion: fleet.cattle.io/v1alpha1
kind: GitRepo
metadata:
name: test-ns-annot
namespace: fleet-default
spec:
branch: main
paths:
- target-customization
repo: https://github.com/sbulage/test-fleet
targets:
- clusterName: imported-0 Logs From the fleet-controller pod.
|
The issue mentioned in the previous comment should be fixed by #3052. |
System Information
Below Steps Performed
GitRepo UsedapiVersion: fleet.cattle.io/v1alpha1
kind: GitRepo
metadata:
name: test-ns-annot
namespace: fleet-default
spec:
branch: main
paths:
- target-customization-ns-label-annotation
repo: https://github.com/sbulage/test-fleet
targets:
- clusterName: imported-0 |
Is your feature request related to a problem?
#1627 introduced the ability to have namespaceLabels and namespaceAnnotations as part of the bundle deployment options.
This doesn't quite go far enough, as a single set of values can only be applied to all clusters, which means annotations and labels have to be identical across all environments.
I am specifically after namespaceAnnotations in the targetCustomizations, however I think it makes sense to look at both of these elements together to also resolve #2262 in the same feature given the similarities.
I believe this could also provide a quick path for enabling #304 via static configuration as an interim step too (which is my immediate use-case for this right now)
Solution you'd like
Adding the necessary elements to the fleet.yaml doesn't appear to incur complaint, and from deeper analysis in the codebase, I believe the only missing piece of the jigsaw to enable this is in the merge function? as well as the necessary testing and documentation.
This is only the second time ever that I've attempted to write anything in Go, but this feels close to what the missing code should be?
Alternatives you've considered
I've tried to have my helm chart create the namespace with the appropriate annotations to place in a Rancher project via helm values and
takeOwnership: true
, however whilst the namespace lands correctly, Rancher doesn't assign appropriate permissions for non-administrative users to see everything else in the namespace, which puts me in a tricky spot!I also considered using kustomize, but this suggests it won't work when using helm charts for the applications to be deployed.
For now, I think I'm going to end up with the plethora of
fleet.yaml
files in multiple directories to force split things across my different clusters and work with the top level bundle deployment options.Anything else?
@raulcabello as you did the original work on namespaceLabels/namespaceAnnotations support - I'd value your thoughts and input!
The text was updated successfully, but these errors were encountered: