Skip to content

Commit 8cd7ad4

Browse files
authored
set license snapshot support status during installation (#544)
1 parent 9f5960e commit 8cd7ad4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/addons/embeddedclusteroperator/embeddedclusteroperator.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ func (e *EmbeddedClusterOperator) Outro(ctx context.Context, cli client.Client)
200200
Config: cfgspec,
201201
EndUserK0sConfigOverrides: euOverrides,
202202
BinaryName: defaults.BinaryName(),
203+
LicenseInfo: &embeddedclusterv1beta1.LicenseInfo{
204+
IsSnapshotSupported: licenseSnapshotSupported(license),
205+
},
203206
},
204207
}
205208
embeddedclusterv1beta1.AddToScheme(cli.Scheme())
@@ -229,3 +232,10 @@ func New(opts Options) (*EmbeddedClusterOperator, error) {
229232
releaseMetadata: opts.ReleaseMetadata,
230233
}, nil
231234
}
235+
236+
func licenseSnapshotSupported(license *kotsv1beta1.License) bool {
237+
if license == nil {
238+
return false
239+
}
240+
return license.Spec.IsSnapshotSupported
241+
}

0 commit comments

Comments
 (0)