document aliased imports
See original GitHub issueWhen importing two CRD’s that share the same group id, one needs to use aliased imports, otherwise the imports will override one another.
See https://github.com/prometheus-operator/kube-prometheus/tree/main/manifests/setup for an example of CRD’s that share group id.
That is, instead of having:
imports:
- https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/setup/0alertmanagerConfigCustomResourceDefinition.yaml
- https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/setup/0alertmanagerCustomResourceDefinition.yaml
We need to alias the imports like so:
imports:
- alertmanagerconfig:=https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/setup/0alertmanagerConfigCustomResourceDefinition.yaml
- alertmanager:=https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/setup/0alertmanagerCustomResourceDefinition.yaml
This functionality is not documented. We should add to our CRD’s section.
Side Note
It would be nice if the CLI could warn before overriding an import and suggest an alias import with a link to the new documentation section.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Using Import aliases in JavaScript | by Greg Byrne - Medium
Import aliases are where you take your standard import, but instead of using a pre-defined name by the exporting module, you use a...
Read more >Import-Alias - PowerShell - Microsoft Learn
The Import-Alias cmdlet imports an alias list from a file. Beginning in Windows PowerShell 3.0, as a security feature, Import-Alias does not overwrite ......
Read more >How can I alias a default import in JavaScript? - Stack Overflow
Import aliases are where you take your standard import, but instead of using a pre-defined name by the exporting module, you use a...
Read more >Module Resolution or Import Alias: The Final Guide - Raul Melo
Module resolution or import alias is a way we can emulate the same way we import node_modules but with our internal code.
Read more >About Alias Table Import and Export Files - Oracle Help Center
Alias table import files contain information that associates aliases with outline members. You can create an alias table import file in the following...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gkarthiks
I don’t think it’s related actually. I need to a closer look into what’s happening there.
Sure: cdk8s-team/cdk8s#885 🙇