Skip to content

Commit

Permalink
init connected clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
Hangyu Xu committed Feb 17, 2025
1 parent 7f62df2 commit cff2fba
Show file tree
Hide file tree
Showing 10 changed files with 773 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
/avm/res/key-vault/vault/ @Azure/avm-res-keyvault-vault-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/kubernetes-configuration/extension/ @Azure/avm-res-kubernetesconfiguration-extension-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/kubernetes-configuration/flux-configuration/ @Azure/avm-res-kubernetesconfiguration-fluxconfiguration-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/kubernetes/connected-clusters/ @Azure/avm-res-kubernetes-connectedclusters-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/kusto/cluster/ @Azure/avm-res-kusto-cluster-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/load-test-service/load-test/ @Azure/avm-res-loadtestservice-loadtest-module-owners-bicep @Azure/avm-module-reviewers-bicep
/avm/res/logic/workflow/ @Azure/avm-res-logic-workflow-module-owners-bicep @Azure/avm-module-reviewers-bicep
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/avm_module_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ body:
- "avm/res/key-vault/vault"
- "avm/res/kubernetes-configuration/extension"
- "avm/res/kubernetes-configuration/flux-configuration"
- "avm/res/kubernetes/connected-clusters"
- "avm/res/kusto/cluster"
- "avm/res/load-test-service/load-test"
- "avm/res/logic/workflow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ runs:
'avm/res/azure-stack-hci/cluster' # Failing on resource deletion when trying to delete RBAC at subscription level
'avm/res/compute/image' # Failing on resource deletion when trying to delete RBAC at subscription level
'avm/res/compute/disk' # Failing on resource deletion when trying to delete RBAC at subscription level
'avm/res/kubernetes/connected-clusters' # Failing on resource deletion when trying to delete RBAC at subscription level
'avm/ptn/virtual-machine-images/azure-image-builder' # Failing on resource deletion when trying to delete RBAC at subscription level
)
if ($exceptionModulePaths.Contains($modulePath)) {
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/avm.res.kubernetes.connected-clusters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: "avm.res.kubernetes.connected-clusters"

on:
workflow_dispatch:
inputs:
staticValidation:
type: boolean
description: "Execute static validation"
required: false
default: true
deploymentValidation:
type: boolean
description: "Execute deployment validation"
required: false
default: true
removeDeployment:
type: boolean
description: "Remove deployed module"
required: false
default: true
customLocation:
type: string
description: "Default location overwrite (e.g., eastus)"
required: false
push:
branches:
- main
paths:
- ".github/actions/templates/avm-**"
- ".github/workflows/avm.template.module.yml"
- ".github/workflows/avm.res.kubernetes.connected-clusters.yml"
- "avm/res/kubernetes/connected-clusters/**"
- "avm/utilities/pipelines/**"
- "!avm/utilities/pipelines/platform/**"
- "!*/**/README.md"

env:
modulePath: "avm/res/kubernetes/connected-clusters"
workflowPath: ".github/workflows/avm.res.kubernetes.connected-clusters.yml"

concurrency:
group: ${{ github.workflow }}

jobs:
###########################
# Initialize pipeline #
###########################
job_initialize_pipeline:
runs-on: ubuntu-latest
name: "Initialize pipeline"
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set input parameters to output variables"
id: get-workflow-param
uses: ./.github/actions/templates/avm-getWorkflowInput
with:
workflowPath: "${{ env.workflowPath}}"
- name: "Get module test file paths"
id: get-module-test-file-paths
uses: ./.github/actions/templates/avm-getModuleTestFiles
with:
modulePath: "${{ env.modulePath }}"
outputs:
workflowInput: ${{ steps.get-workflow-param.outputs.workflowInput }}
moduleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.moduleTestFilePaths }}
psRuleModuleTestFilePaths: ${{ steps.get-module-test-file-paths.outputs.psRuleModuleTestFilePaths }}
modulePath: "${{ env.modulePath }}"

##############################
# Call reusable workflow #
##############################
call-workflow-passing-data:
name: "Run"
permissions:
id-token: write # For OIDC
contents: write # For release tags
needs:
- job_initialize_pipeline
uses: ./.github/workflows/avm.template.module.yml
with:
workflowInput: "${{ needs.job_initialize_pipeline.outputs.workflowInput }}"
moduleTestFilePaths: "${{ needs.job_initialize_pipeline.outputs.moduleTestFilePaths }}"
psRuleModuleTestFilePaths: "${{ needs.job_initialize_pipeline.outputs.psRuleModuleTestFilePaths }}"
modulePath: "${{ needs.job_initialize_pipeline.outputs.modulePath}}"
secrets: inherit
Loading

0 comments on commit cff2fba

Please sign in to comment.