https://pulumi.com logo
m

millions-judge-24978

10/05/2019, 5:39 PM
I’m seeing an issue with the new k8s auto aliasing. I have a resource of type
kubernetes:autoscaling/v2beta2:HorizontalPodAutoscaler
being created, it’s getting the following aliases that seem to be coming from a different resource altogether:
Copy code
"aliases": [
                        "urn:pulumi:mirror::mirror::kubernetes:apps/v1:Deployment::traffic-mirror",
                      "urn:pulumi:mirror::mirror::kubernetes:apps/v1beta1:Deployment::traffic-mirror",
                        "urn:pulumi:mirror::mirror::kubernetes:apps/v1beta2:Deployment::traffic-mirror",
                        "urn:pulumi:mirror::mirror::kubernetes:extensions/v1beta1:Deployment::traffic-mirror"
                    ]
resulting in an error like this:
Copy code
panic: fatal: An assertion has failed: Two resources ('urn:pulumi:mirror::mirror::kubernetes:apps/v1:Deployment::traffic-mirror' and 'urn:pulumi:mirror::mirror::kubernetes:autoscaling/v2beta2:HorizontalPodAutoscaler::traffic-mirror') aliased to the same: 'urn:pulumi:mirror::mirror::kubernetes:apps/v1:Deployment::traffic-mirror'
c

creamy-potato-29402

10/05/2019, 5:46 PM
@millions-judge-24978 working on this now
👍 1
@millions-judge-24978 I don’t think I understand this, actually
where are those aliases coming from?
m

millions-judge-24978

10/05/2019, 6:52 PM
Me either honestly haha. This happens with the new pulumi kubernetes 1.2
c

creamy-potato-29402

10/05/2019, 6:53 PM
I mean, what code did you write that causes this
in the code for HPA, it is clear that those aliases aren’t in the alias list
so they must be coming from outside. your code? somewhere else?
m

millions-judge-24978

10/05/2019, 6:54 PM
I just boarded a plane unfortunately. I am not using the alias functionality at all in my code. It seems to be a bug in the new auto API version aliasing
The resource it happens on is just chance based on whatever is last or something
c

creamy-potato-29402

10/05/2019, 6:55 PM
are you using python or TS
m

millions-judge-24978

10/05/2019, 6:55 PM
Not necessarily the HPA if I get rid of something else. TS
c

creamy-potato-29402

10/05/2019, 6:55 PM
I don’t see where we could be introducing those aliases. no code you can share until you land, I guess?
m

millions-judge-24978

10/05/2019, 6:56 PM
I probably can share in a bit on the flight. Flying to Japan lol
c

creamy-potato-29402

10/05/2019, 6:56 PM
ok, sounds good
if I can reproduce the issue I can fix it really quick
m

millions-judge-24978

10/05/2019, 6:57 PM
It's basically just a mixed bag of k8s resources though.
c

creamy-potato-29402

10/05/2019, 6:58 PM
yeah, I just mean, if I have the code I can run it and sett the problem, which usually means i can debug in ~15 minute
m

millions-judge-24978

10/05/2019, 6:58 PM
Yeah ofc, will share when I can, thanks!
g

gorgeous-egg-16927

10/07/2019, 5:49 PM
I can’t tell for sure what the problem is from the info you provided, but my best guess would be that you have two
traffic-mirror
Deployments in the stack that have different apiVersions. This change effectively means that the apiVersion isn’t part of the URN anymore, so it would cause a conflict in that case.
m

millions-judge-24978

10/08/2019, 10:25 AM
Sorry travel got a bit crazy, this is the code: https://gist.github.com/timmyers/7ffbb5856c8337725bff43626e2f0ab2
There’s only one deployment