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 v2.31.0 #1648

Merged
merged 18 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
819062d
test: Add Cloud Firewall to LKE nodes after integration test executio…
ykim-akamai Oct 22, 2024
6db514b
build(deps): bump github.com/aws/aws-sdk-go-v2/config (#1622)
dependabot[bot] Oct 22, 2024
7b50d27
Remove Placement Group LA notices (#1620)
lgarber-akamai Oct 25, 2024
c3e317d
Simplify test retry system; fix hang when certain retryable tests fai…
lgarber-akamai Oct 28, 2024
c2882aa
build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 (#1632)
dependabot[bot] Oct 28, 2024
34bfd9b
build(deps): bump crazy-max/ghaction-github-labeler from 5.0.0 to 5.1…
dependabot[bot] Oct 28, 2024
329f2cb
build(deps): bump github.com/hashicorp/terraform-plugin-mux (#1636)
dependabot[bot] Oct 31, 2024
826fe41
build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 (#1633)
dependabot[bot] Oct 31, 2024
20937e9
build(deps): bump github.com/aws/aws-sdk-go-v2/config (#1634)
dependabot[bot] Oct 31, 2024
c2528ba
slack notification on release (#1635)
ykim-akamai Oct 31, 2024
ef36233
build(deps): bump github.com/hashicorp/terraform-plugin-framework (#1…
dependabot[bot] Nov 1, 2024
3a9eaac
build(deps): bump github.com/hashicorp/terraform-plugin-framework-val…
dependabot[bot] Nov 1, 2024
f6f4a24
build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 (#1640)
dependabot[bot] Nov 1, 2024
a33c166
Framework Migration: `linode_nodebalancer_node` Resource (#1595)
zliang-akamai Nov 5, 2024
6bd5690
skip LDE tests and remove LDE capability in testregion (#1645)
ykim-akamai Nov 5, 2024
5060b81
Added missing pricing endpoint docs (#1638)
ezilber-akamai Nov 6, 2024
b72c312
Terraform support for creation + assigning additional reserved IP to …
AniJ98 Nov 7, 2024
3530eda
#1643 doc: Remove `region` attribute from the doc for NodeBalancer Co…
fabkravmaga Nov 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 57 additions & 28 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,62 @@ jobs:
path: '*.xml'
retention-days: 1

apply-calico-rules:
runs-on: ubuntu-latest
needs: [integration_tests]
if: always()

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'

- 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

- name: Apply Calico Rules to LKE # Only Running against Matrix USER 4 which includes LKE test suite
run: |
cd e2e_scripts/cloud_security_scripts/lke_calico_rules/ && ./lke_calico_rules_e2e.sh
env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN_USER_4 }}

add-fw-lke-nodes:
runs-on: ubuntu-latest
needs: [integration_tests]
if: always()

steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install Linode CLI
run: |
pip install linode-cli

- name: Create Firewall and Attach to Instances
run: |
FIREWALL_ID=$(linode-cli firewalls create --label "e2e-fw-$(date +%s)" --rules.inbound_policy "DROP" --rules.outbound_policy "ACCEPT" --text --format=id --no-headers)
echo "Created Firewall with ID: $FIREWALL_ID"

for instance_id in $(linode-cli linodes list --format "id" --text --no-header); do
echo "Attaching firewall to instance: $instance_id"
if linode-cli firewalls device-create "$FIREWALL_ID" --id "$instance_id" --type linode; then
echo "Firewall attached to instance $instance_id successfully."
else
echo "An error occurred while attaching firewall to instance $instance_id. Skipping..."
fi
done
env:
LINODE_CLI_TOKEN: ${{ secrets.LINODE_TOKEN_USER_4 }} # only Matrix test user 4 runs LKE tests

process-upload-report:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -120,38 +176,10 @@ jobs:
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}


apply-calico-rules:
runs-on: ubuntu-latest
needs: [integration_tests]
if: always()

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'

- 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

- name: Apply Calico Rules to LKE # Only Running against Matrix USER 4 which includes LKE test suite
run: |
cd e2e_scripts/cloud_security_scripts/lke_calico_rules/ && ./lke_calico_rules_e2e.sh
env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN_USER_4 }}

notify-slack:
runs-on: ubuntu-latest
needs: [integration_tests]
if: always() && github.repository == 'linode/terraform-provider-linode' # Run even if integration tests fail and only on main repository

steps:
- name: Notify Slack
uses: slackapi/slack-github-action@v1.27.0
Expand Down Expand Up @@ -212,3 +240,4 @@ jobs:
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

72 changes: 57 additions & 15 deletions .github/workflows/integration_tests_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,11 @@ jobs:

- run: make deps

- 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 PKG_NAME="${{ inputs.module }}" int-test
if: ${{ steps.disallowed-character-check.outputs.result == 'pass' }}
env:
LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }}
RUN_LONG_TESTS: ${{ inputs.run_long_tests }}

- name: Apply Calico Rules to LKE
if: always()
run: |
cd e2e_scripts/cloud_security_scripts/lke_calico_rules/ && ./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/graphql-action@v2.x
Expand Down Expand Up @@ -128,3 +113,60 @@ jobs:
conclusion: process.env.conclusion
});
return result;

apply-calico-rules:
runs-on: ubuntu-latest
needs: [integration-fork]
if: ${{ success() || failure() }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'

- 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

- name: Apply Calico Rules to LKE
run: |
cd e2e_scripts/cloud_security_scripts/lke_calico_rules/ && ./lke_calico_rules_e2e.sh
env:
LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }}

add-fw-lke-nodes:
runs-on: ubuntu-latest
needs: [integration-fork]
if: ${{ success() || failure() }}

steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install Linode CLI
run: |
pip install linode-cli

- name: Create Firewall and Attach to Instances
run: |
FIREWALL_ID=$(linode-cli firewalls create --label "e2e-fw-$(date +%s)" --rules.inbound_policy "DROP" --rules.outbound_policy "ACCEPT" --text --format=id --no-headers)
echo "Created Firewall with ID: $FIREWALL_ID"

for instance_id in $(linode-cli linodes list --format "id" --text --no-header); do
echo "Attaching firewall to instance: $instance_id"
if linode-cli firewalls device-create "$FIREWALL_ID" --id "$instance_id" --type linode; then
echo "Firewall attached to instance $instance_id successfully."
else
echo "An error occurred while attaching firewall to instance $instance_id. Skipping..."
fi
done
env:
LINODE_CLI_TOKEN: ${{ secrets.DX_LINODE_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v4
-
name: Run Labeler
uses: crazy-max/ghaction-github-labeler@de749cf181958193cb7debf1a9c5bb28922f3e1b
uses: crazy-max/ghaction-github-labeler@b54af0c25861143e7c8813d7cbbf46d2c341680c
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/release-notify-slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Notify Dev DX Channel on Release
on:
release:
types: [published]
workflow_dispatch: null

jobs:
notify:
if: github.repository == 'linode/terraform-provider-linode'
runs-on: ubuntu-latest
steps:
- name: Notify Slack - Main Message
id: main_message
uses: slackapi/slack-github-action@v1.27.0
with:
channel-id: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*New Release Published: _terraform-provider-linode_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
81 changes: 81 additions & 0 deletions docs/data-sources/lke_types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
page_title: "Linode: linode_lke_types"
description: |-
Provides information about Linode LKE types that match a set of filters.
---

# Data Source: linode_lke_types

Provides information about Linode LKE types that match a set of filters.
For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-lke-types).

## Example Usage

Get information about all Linode LKE types with a certain label:

```hcl
data "linode_lke_types" "specific-label" {
filter {
name = "label"
values = "LKE Standard Availability"
}
}

output "type_id" {
value = data.linode_lke_types.specific-label.id
}
```

Get information about all Linode LKE types:

```hcl
data "linode_lke_types" "all-types" {}

output "type_id" {
value = data.linode_lke_types.all-types.*.id
}
```

## Argument Reference

The following arguments are supported:

* [`filter`](#filter) - (Optional) A set of filters used to select Linode LKE types that meet certain requirements.

* `order_by` - (Optional) The attribute to order the results by. See the [Filterable Fields section](#filterable-fields) for a list of valid fields.

* `order` - (Optional) The order in which results should be returned. (`asc`, `desc`; default `asc`)

### Filter

* `name` - (Required) The name of the field to filter by. See the [Filterable Fields section](#filterable-fields) for a complete list of filterable fields.

* `values` - (Required) A list of values for the filter to allow. These values should all be in string form.

* `match_by` - (Optional) The method to match the field by. (`exact`, `regex`, `substring`; default `exact`)

## Attributes Reference

Each Linode LKE type will export the following attributes:

* `id` - The ID representing the Kubernetes type.

* `label` - The Kubernetes type label is for display purposes only.

* `price.0.hourly` - Cost (in US dollars) per hour.

* `price.0.monthly` - Cost (in US dollars) per month.

* `region_prices.*.id` - The Region ID for these prices.

* `region_prices.*.hourly` - Cost per hour for this region, in US dollars.

* `region_prices.*.monthly` - Cost per month for this region, in US dollars.

* `transfer` - The monthly outbound transfer amount, in MB.

## Filterable Fields

* `label`

* `transfer`
Loading