Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.5] Bug 1822637: Publish license file #440

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions manifests/07-downloads-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ spec:
os.mkdir(arch)
for operating_system in ['linux']:
os.mkdir(os.path.join(arch, operating_system))
os.symlink('/usr/share/openshift/LICENSE', 'oc-license')

for arch, operating_system, path in [
('amd64', 'linux', '/usr/share/openshift/linux_amd64/oc'),
Expand Down
5 changes: 5 additions & 0 deletions pkg/console/controllers/clidownloads/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ func PlatformBasedOCConsoleCLIDownloads(host, cliDownloadsName string) *v1.Conso
})
}

links = append(links, v1.CLIDownloadLink{
Href: fmt.Sprintf("%s/oc-license", baseURL),
Text: "LICENSE",
})

return &v1.ConsoleCLIDownload{
ObjectMeta: metav1.ObjectMeta{
Name: cliDownloadsName,
Expand Down
4 changes: 4 additions & 0 deletions pkg/console/controllers/clidownloads/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ The oc binary offers the same capabilities as the kubectl binary, but it is furt
Href: "https://www.example.com/s390x/linux/oc.tar",
Text: "Download oc for Linux for IBM Z (unsupported)",
},
{
Href: "https://www.example.com/oc-license",
Text: "LICENSE",
},
},
},
},
Expand Down