Skip to content

Commit

Permalink
Merge branch 'main' into namespace-optional
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgamero authored Jan 6, 2025
2 parents dbe74ec + bb318e2 commit 346a604
Show file tree
Hide file tree
Showing 45 changed files with 6,810 additions and 9,108 deletions.
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
groups:
actions:
patterns:
- '*'
- package-ecosystem: github-actions
directory: .github/workflows
schedule:
interval: weekly
groups:
actions:
patterns:
- '*'
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@05963f47d870e2cb19a537396c1f668a348c7d8f #v3.24.8
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd #v3.27.0
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@05963f47d870e2cb19a537396c1f668a348c7d8f #v3.24.8
uses: github/codeql-action/autobuild@662472033e021d55d94146f66f6058822b0b39fd #v3.27.0

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -46,4 +46,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@05963f47d870e2cb19a537396c1f668a348c7d8f #v3.24.8
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd #v3.27.0
4 changes: 2 additions & 2 deletions .github/workflows/defaultLabels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/stale@v3
- uses: actions/stale@v9
name: Setting issue as idle
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -24,7 +24,7 @@ jobs:
operations-per-run: 100
exempt-issue-labels: 'backlog'

- uses: actions/stale@v3
- uses: actions/stale@v9
name: Setting PR as idle
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/prettify-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: install deps
run: npm install

- name: Enforce Prettier
uses: actionsx/prettier@v2
with:
args: --check .
run: npm run format-check
10 changes: 7 additions & 3 deletions .github/workflows/run-integration-tests-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
KUBECONFIG: /home/runner/.kube/config
NAMESPACE: test-${{ github.run_id }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build
run: ncc build src/run.ts -o lib

- uses: Azure/setup-kubectl@v3
- uses: Azure/setup-kubectl@v4
name: Install Kubectl

- id: setup-minikube
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Create namespace to run tests
run: kubectl create ns ${{ env.NAMESPACE }}

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
Expand All @@ -64,9 +64,13 @@ jobs:
images: nginx:1.14.2
manifests: |
test/integration/manifests/test.yml
test/integration/manifests/manifest_test_dir/test.yml
action: deploy

- name: Checking if deployments and services were created
run: |
python test/integration/k8s-deploy-test.py namespace=${{ env.NAMESPACE }} kind=Deployment name=nginx-deployment containerName=nginx:1.14.2 labels=app:nginx,workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Minikube_Integration_Tests_-_basic selectorLabels=app:nginx
python test/integration/k8s-deploy-test.py namespace=${{ env.NAMESPACE }} kind=Service name=nginx-service labels=workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Minikube_Integration_Tests_-_basic selectorLabels=app:nginx
python test/integration/k8s-deploy-test.py namespace=${{ env.NAMESPACE }} kind=Deployment name=nginx-deployment3 containerName=nginx:1.14.2 labels=app:nginx3,workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Minikube_Integration_Tests_-_basic selectorLabels=app:nginx3
python test/integration/k8s-deploy-test.py namespace=${{ env.NAMESPACE }} kind=Service name=nginx-service3 labels=workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Minikube_Integration_Tests_-_basic selectorLabels=app:nginx3
6 changes: 3 additions & 3 deletions .github/workflows/run-integration-tests-bluegreen-ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
KUBECONFIG: /home/runner/.kube/config
NAMESPACE: test-${{ github.run_id }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build
run: ncc build src/run.ts -o lib

- uses: Azure/setup-kubectl@v3
- uses: Azure/setup-kubectl@v4
name: Install Kubectl

- id: setup-minikube
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Create namespace to run tests
run: kubectl create ns ${{ env.NAMESPACE }}

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-integration-tests-bluegreen-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
KUBECONFIG: /home/runner/.kube/config
NAMESPACE: test-${{ github.run_id }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build
run: ncc build src/run.ts -o lib

- uses: Azure/setup-kubectl@v3
- uses: Azure/setup-kubectl@v4
name: Install Kubectl

- id: setup-minikube
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Create namespace to run tests
run: kubectl create ns ${{ env.NAMESPACE }}

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-integration-tests-bluegreen-smi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
KUBECONFIG: /home/runner/.kube/config
NAMESPACE: test-${{ github.run_id }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build
run: ncc build src/run.ts -o lib

- uses: Azure/setup-kubectl@v3
- uses: Azure/setup-kubectl@v4
name: Install Kubectl

- id: setup-minikube
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Create namespace to run tests
run: kubectl create ns ${{ env.NAMESPACE }}

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-integration-tests-canary-pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
KUBECONFIG: /home/runner/.kube/config
NAMESPACE: test-${{ github.run_id }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build
run: ncc build src/run.ts -o lib

- uses: Azure/setup-kubectl@v3
- uses: Azure/setup-kubectl@v4
name: Install Kubectl

- id: setup-minikube
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Create namespace to run tests
run: kubectl create ns ${{ env.NAMESPACE }}

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-integration-tests-canary-smi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
KUBECONFIG: /home/runner/.kube/config
NAMESPACE: test-${{ github.run_id }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build
run: ncc build src/run.ts -o lib

- uses: Azure/setup-kubectl@v3
- uses: Azure/setup-kubectl@v4
name: Install Kubectl

- id: setup-minikube
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Create namespace to run tests
run: kubectl create ns ${{ env.NAMESPACE }}

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/run-integration-tests-private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -30,28 +30,28 @@ jobs:
- name: Build
run: ncc build src/run.ts -o lib
- name: Azure login
uses: azure/login@v1.4.3
uses: azure/login@v2.2.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- uses: Azure/setup-kubectl@v3
- uses: Azure/setup-kubectl@v4
name: Install Kubectl

- name: Create private AKS cluster and set context
run: |
set +x
# create cluster
az group create --location eastus --name ${{ env.NAMESPACE }}
az group create --location eastus2 --name ${{ env.NAMESPACE }}
az aks create --name ${{ env.NAMESPACE }} --resource-group ${{ env.NAMESPACE }} --enable-private-cluster --generate-ssh-keys
az aks get-credentials --resource-group ${{ env.NAMESPACE }} --name ${{ env.NAMESPACE }}
- name: Create namespace to run tests
run: |
az aks command invoke --resource-group ${{ env.NAMESPACE }} --name ${{ env.NAMESPACE }} --command "kubectl create ns ${{ env.NAMESPACE }}"
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
Expand All @@ -63,6 +63,7 @@ jobs:
images: nginx:1.14.2
manifests: |
test/integration/manifests/test.yml
test/integration/manifests/test2.yml
action: deploy
private-cluster: true
resource-group: ${{ env.NAMESPACE }}
Expand All @@ -73,6 +74,9 @@ jobs:
python test/integration/k8s-deploy-test.py private=${{ env.NAMESPACE }} namespace=${{ env.NAMESPACE }} kind=Deployment name=nginx-deployment containerName=nginx:1.14.2 labels=app:nginx,workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Cluster_Integration_Tests_-_private_cluster selectorLabels=app:nginx
python test/integration/k8s-deploy-test.py private=${{ env.NAMESPACE }} namespace=${{ env.NAMESPACE }} kind=Service name=nginx-service labels=workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Cluster_Integration_Tests_-_private_cluster selectorLabels=app:nginx
python test/integration/k8s-deploy-test.py private=${{ env.NAMESPACE }} namespace=${{ env.NAMESPACE }} kind=Deployment name=nginx-deployment2 containerName=nginx:1.14.2 labels=app:nginx2,workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Cluster_Integration_Tests_-_private_cluster selectorLabels=app:nginx2
python test/integration/k8s-deploy-test.py private=${{ env.NAMESPACE }} namespace=${{ env.NAMESPACE }} kind=Service name=nginx-service2 labels=workflow:actions.github.com-k8s-deploy,workflowFriendlyName:Cluster_Integration_Tests_-_private_cluster selectorLabels=app:nginx2
- name: Clean up AKS cluster
if: ${{ always() }}
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
KUBECONFIG: /home/runner/.kube/config
NAMESPACE: test-${{ github.run_id }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build
run: ncc build src/run.ts -o lib

- uses: Azure/setup-kubectl@v3
- uses: Azure/setup-kubectl@v4
name: Install Kubectl

- id: setup-minikube
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Create namespace to run tests
run: kubectl create ns ${{ env.NAMESPACE }}

- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
npm install
npm test
Loading

0 comments on commit 346a604

Please sign in to comment.