Skip to content

Commit

Permalink
copy license file to data dir in install2 like install1 (#1754)
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya authored Jan 28, 2025
1 parent 6a40419 commit bfc1bb1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions cmd/installer/cli/install2.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ func runInstall2(cmd *cobra.Command, args []string, name string, flags Install2C
return err
}

logrus.Debugf("copy license file to %s", flags.dataDir)
if err := copyLicenseFileToDataDir(flags.licenseFile, flags.dataDir); err != nil {
// We have decided not to report this error
logrus.Warnf("unable to copy license file to %s: %v", flags.dataDir, err)
}

logrus.Debugf("configuring sysctl")
if err := configutils.ConfigureSysctl(); err != nil {
return fmt.Errorf("unable to configure sysctl: %w", err)
Expand Down
7 changes: 3 additions & 4 deletions e2e/scripts/single-node-install2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,9 @@ main() {
exit 1
fi

# TODO: enable this once we cache the license in the data dir in install2
# if ! ensure_license_in_data_dir; then
# exit 1
# fi
if ! ensure_license_in_data_dir; then
exit 1
fi

echo "kotsadm logs"
kubectl logs -n kotsadm -l app=kotsadm --tail=50 || true
Expand Down

0 comments on commit bfc1bb1

Please sign in to comment.