Skip to content

Commit 6b980a5

Browse files
committed
mitigate runtime panic when adopting cluster
1 parent a9fe5b9 commit 6b980a5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/resource/cluster/sdk.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/hooks/cluster/sdk_read_one_post_set_output.go.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
if r.ko.Spec.ResourcesVPCConfig.SubnetRefs != nil {
1+
if r.ko.Spec.ResourcesVPCConfig != nil && r.ko.Spec.ResourcesVPCConfig.SubnetRefs != nil {
22
ko.Spec.ResourcesVPCConfig.SubnetRefs = r.ko.Spec.ResourcesVPCConfig.SubnetRefs
33
}
44

5-
if r.ko.Spec.ResourcesVPCConfig.SecurityGroupRefs != nil {
5+
if r.ko.Spec.ResourcesVPCConfig != nil && r.ko.Spec.ResourcesVPCConfig.SecurityGroupRefs != nil {
66
ko.Spec.ResourcesVPCConfig.SecurityGroupRefs = r.ko.Spec.ResourcesVPCConfig.SecurityGroupRefs
77
}
88

0 commit comments

Comments
 (0)