-
Notifications
You must be signed in to change notification settings - Fork 263
feat(linux): refactor aks-secure-tls-bootstrap-client installation to use PMC/MCR #8618
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
Open
cameronmeissner
wants to merge
20
commits into
main
Choose a base branch
from
cameissner/stls-client-dalec-linux
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c478da7
feat(linux): refactor aks-secure-tls-bootstrap-client installation to…
cameronmeissner 517e439
chore: sysext fixes
cameronmeissner 4a05660
chore: comments
cameronmeissner 18cad2c
chore: conflicts
cameronmeissner 38f80af
chore: fix sysexts
cameronmeissner 82152c8
chore: handle arch suffix
cameronmeissner 24a4778
chore: comments
cameronmeissner aec7cf6
chore: fix azlinux install
cameronmeissner deab804
chore: more fixes
cameronmeissner 12d5e34
chore: more fixes
cameronmeissner 978fcc9
chore: revert arch suffix matching
cameronmeissner 0352cc5
chore: fix flatcar version
cameronmeissner eef76e8
chore: use -2 revision
cameronmeissner 11eacfa
chore: conflicts
cameronmeissner 9a64e50
chore: fix acl matching
cameronmeissner 3c7d11b
chore: add ms-oss repo metadata for OSGuard
cameronmeissner 4f73df8
chore: fix content tests for ACL
cameronmeissner c37cdbe
chore: dedicated content test
cameronmeissner 8a7cdc0
chore: add flatcar support
cameronmeissner 68f6aa8
chore: fix flatcar
cameronmeissner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
spec/parts/linux/cloud-init/artifacts/cse_install_acl_spec.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Mock functions that the ACL script depends on | ||
| oras() { | ||
| echo "mock oras $*" >&2 | ||
| } | ||
|
|
||
| ln() { | ||
| echo "mock ln $*" >&2 | ||
| } | ||
|
|
||
| systemd-sysext() { | ||
| echo "mock systemd-sysext $*" >&2 | ||
| } | ||
|
|
||
| timeout() { | ||
| shift # remove timeout duration | ||
| "$@" # execute the command | ||
| } | ||
|
|
||
| mkdir() { | ||
| echo "mock mkdir $*" >&2 | ||
| } | ||
|
|
||
| getSystemdArch() { | ||
| echo "x86-64" | ||
| } | ||
|
|
||
| getCPUArch() { | ||
| echo "amd64" | ||
| } | ||
|
|
||
| sleep() { | ||
| echo "sleeping $1 seconds" >&2 | ||
| } | ||
|
|
||
| find() { | ||
| echo "mock find $*" >&2 | ||
| } | ||
|
|
||
| CSE_STARTTIME_SECONDS=$(date +%s) | ||
|
|
||
| Describe 'cse_install_acl.sh' | ||
| Include "./parts/linux/cloud-init/artifacts/acl/cse_install_acl.sh" | ||
| Include "./parts/linux/cloud-init/artifacts/cse_helpers.sh" | ||
|
|
||
| Describe 'installSecureTLSBootstrapClientSysext' | ||
| It 'calls mergeSysexts with correct URL and creates symlink on success' | ||
| mergeSysexts() { | ||
| echo "mock mergeSysexts $*" >&2 | ||
| } | ||
| ln() { | ||
| echo "mock ln $*" >&2 | ||
| } | ||
| When call installSecureTLSBootstrapClientSysext "1.1.3" | ||
| The error should include "mock mergeSysexts aks-secure-tls-bootstrap-client mcr.microsoft.com/aks-secure-tls-bootstrap/v2/aks-secure-tls-bootstrap-client-sysext 1.1.3" | ||
| The error should include "mock ln -snf /usr/bin/aks-secure-tls-bootstrap-client /opt/bin/aks-secure-tls-bootstrap-client" | ||
| The status should be success | ||
| End | ||
|
|
||
| It 'uses custom registry when provided' | ||
| mergeSysexts() { | ||
| echo "mock mergeSysexts $*" >&2 | ||
| } | ||
| ln() { | ||
| echo "mock ln $*" >&2 | ||
| } | ||
| When call installSecureTLSBootstrapClientSysext "1.1.3" "custom.registry.io" | ||
| The error should include "mock mergeSysexts aks-secure-tls-bootstrap-client custom.registry.io/aks-secure-tls-bootstrap/v2/aks-secure-tls-bootstrap-client-sysext 1.1.3" | ||
| The status should be success | ||
| End | ||
|
|
||
| It 'returns ERR_ORAS_PULL_SYSEXT_FAIL when mergeSysexts fails' | ||
| mergeSysexts() { | ||
| return 1 | ||
| } | ||
| ERR_ORAS_PULL_SYSEXT_FAIL=231 | ||
| When call installSecureTLSBootstrapClientSysext "1.1.3" | ||
| The output should include "Failed to install aks-secure-tls-bootstrap-client sysext" | ||
| The status should be failure | ||
| End | ||
| End | ||
| End |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.