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

Add /os API #777

Merged
merged 4 commits into from
Feb 26, 2020
Merged

Add /os API #777

merged 4 commits into from
Feb 26, 2020

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Feb 25, 2020

commit 57daab4036dfb27618406ea2b1a52359b10fdb79
Author: Tom Kirchner <tjk@amazon.com>
Date:   Tue Feb 25 15:17:16 2020 -0800

Allow use of OS information in schnauzer templates
commit 0f9ab5d516084ae860c4b727c88e98e8d8414557
Author: Tom Kirchner <tjk@amazon.com>
Date:   Tue Feb 25 15:15:26 2020 -0800

Add /os to API to describe version, variant, arch, etc.
commit 65929d34de319236afc21e328c88ddbf47129644
Author: Tom Kirchner <tjk@amazon.com>
Date:   Tue Feb 25 15:12:15 2020 -0800

Add architecture to BottlerocketRelease

Testing done:

Unit tests still pass and a pod runs OK.

The new API:

[ec2-user@ip-192-168-107-15 ~]$ apiclient -u /os
{"pretty_name":"Bottlerocket OS 0.2.2","variant_id":"aws-k8s","version_id":"0.2.2","build_id":"d4207464-dirty","arch":"x86_64"}

I tested the schnauzer changes by updating our updates URIs to use the OS information, which is shown in #778.

Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than pointing to /usr/lib/os-release as @bcressey / @iliana mentioned, LGTM.

😋

/usr has stronger protections than /etc, and /etc/os-release is a symlink to
/usr/lib/os-release anyway.
@tjkirch
Copy link
Contributor Author

tjkirch commented Feb 26, 2020

This push adds a commit using the /usr/lib/os-release path.

@tjkirch tjkirch merged commit eb8ad56 into develop Feb 26, 2020
@tjkirch tjkirch deleted the os-api branch February 26, 2020 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants