-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into proj/disk-encryption
- Loading branch information
Showing
193 changed files
with
46,785 additions
and
27,164 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -36,6 +36,14 @@ jobs: | |
with: | ||
ref: ${{ inputs.sha }} | ||
|
||
- name: Download kubectl and calicoctl for LKE clusters | ||
run: | | ||
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" | ||
curl -LO "https://github.com/projectcalico/calico/releases/download/v3.25.0/calicoctl-linux-amd64" | ||
chmod +x calicoctl-linux-amd64 kubectl | ||
mv calicoctl-linux-amd64 /usr/local/bin/calicoctl | ||
mv kubectl /usr/local/bin/kubectl | ||
- run: make ARGS="-run ${{ inputs.module }}" fixtures | ||
if: ${{ inputs.module != '' && steps.disallowed-char-check.outputs.match == '' }} | ||
env: | ||
|
@@ -44,6 +52,13 @@ jobs: | |
if: ${{ inputs.module == '' }} | ||
env: | ||
LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }} | ||
|
||
- name: Apply Calico Rules to LKE | ||
if: always() | ||
run: | | ||
cd scripts && ./lke_calico_rules_e2e.sh | ||
env: | ||
LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }} | ||
|
||
- name: Get the hash value of the latest commit from the PR branch | ||
uses: octokit/[email protected] | ||
|
This file contains 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 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 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 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 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 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,47 @@ | ||
package linodego | ||
|
||
import ( | ||
"context" | ||
) | ||
|
||
// ChildAccount represents an account under the current account. | ||
// NOTE: This is an alias to prevent any future breaking changes. | ||
type ChildAccount = Account | ||
|
||
// ChildAccountToken represents a short-lived token created using | ||
// the CreateChildAccountToken(...) function. | ||
// NOTE: This is an alias to prevent any future breaking changes. | ||
type ChildAccountToken = Token | ||
|
||
// ListChildAccounts lists child accounts under the current account. | ||
// NOTE: Parent/Child related features may not be generally available. | ||
func (c *Client) ListChildAccounts(ctx context.Context, opts *ListOptions) ([]ChildAccount, error) { | ||
return getPaginatedResults[ChildAccount]( | ||
ctx, | ||
c, | ||
"account/child-accounts", | ||
opts, | ||
) | ||
} | ||
|
||
// GetChildAccount gets a single child accounts under the current account. | ||
// NOTE: Parent/Child related features may not be generally available. | ||
func (c *Client) GetChildAccount(ctx context.Context, euuid string) (*ChildAccount, error) { | ||
return doGETRequest[ChildAccount]( | ||
ctx, | ||
c, | ||
formatAPIPath("account/child-accounts/%s", euuid), | ||
) | ||
} | ||
|
||
// CreateChildAccountToken creates a short-lived token that can be used to | ||
// access the Linode API under a child account. | ||
// The attributes of this token are not currently configurable. | ||
// NOTE: Parent/Child related features may not be generally available. | ||
func (c *Client) CreateChildAccountToken(ctx context.Context, euuid string) (*ChildAccountToken, error) { | ||
return doPOSTRequest[ChildAccountToken, any]( | ||
ctx, | ||
c, | ||
formatAPIPath("account/child-accounts/%s/token", euuid), | ||
) | ||
} |
Oops, something went wrong.