diff --git a/.azure-pipelines/azure-pipelines.yaml b/.azure-pipelines/azure-pipelines.yaml index 60fc541..a521b06 100644 --- a/.azure-pipelines/azure-pipelines.yaml +++ b/.azure-pipelines/azure-pipelines.yaml @@ -13,7 +13,7 @@ name: $(version)-B$(date:yyMM)$(rev:rrr) trigger: branches: include: - - 'master' + - 'main' tags: include: - 'v0.*' @@ -21,7 +21,7 @@ trigger: pr: branches: include: - - 'master' + - 'main' stages: @@ -173,7 +173,7 @@ stages: action: edit tag: '$(Build.SourceBranchName)' releaseNotesSource: inline - releaseNotesInline: 'See [change log](https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/CHANGELOG.md)' + releaseNotesInline: 'See [change log](https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/CHANGELOG.md)' assetUploadMode: replace addChangeLog: false isPreRelease: $(isPreRelease) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ea86640..0959247 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -11,4 +11,4 @@ - **Code changes** - [ ] Have unit tests created/ updated - [ ] Link to a filed issue - - [ ] [Change log](https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/CHANGELOG.md) has been updated with change under unreleased section + - [ ] [Change log](https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/CHANGELOG.md) has been updated with change under unreleased section diff --git a/README.md b/README.md index d1c65b4..8b02353 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,6 @@ or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any addi This project is [licensed under the MIT License](LICENSE). [install]: docs/scenarios/install-instructions.md -[ci-badge]: https://dev.azure.com/bewhite/PSRule.Rules.Kubernetes/_apis/build/status/PSRule.Rules.Kubernetes-CI?branchName=master +[ci-badge]: https://dev.azure.com/bewhite/PSRule.Rules.Kubernetes/_apis/build/status/PSRule.Rules.Kubernetes-CI?branchName=main [module]: https://www.powershellgallery.com/packages/PSRule.Rules.Kubernetes [project]: https://github.com/Microsoft/PSRule diff --git a/RuleHelp.Doc.ps1 b/RuleHelp.Doc.ps1 index b9fa7cf..a7a6708 100644 --- a/RuleHelp.Doc.ps1 +++ b/RuleHelp.Doc.ps1 @@ -19,7 +19,7 @@ Document 'RuleHelp' { } if (!$annotations.Contains('online version')) { - $annotations['online version'] = "https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/$($rule.Name).md"; + $annotations['online version'] = "https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/$($rule.Name).md"; } Metadata $annotations; diff --git a/docs/rules/en/Kubernetes.AKS.PublicLB.md b/docs/rules/en/Kubernetes.AKS.PublicLB.md index 6be41bc..2512675 100644 --- a/docs/rules/en/Kubernetes.AKS.PublicLB.md +++ b/docs/rules/en/Kubernetes.AKS.PublicLB.md @@ -1,7 +1,7 @@ --- severity: Critical category: Security -online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.AKS.PublicLB.md +online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.AKS.PublicLB.md --- # Use internal load balancer diff --git a/docs/rules/en/Kubernetes.API.v1.16.md b/docs/rules/en/Kubernetes.API.v1.16.md index c05dc73..0d601fa 100644 --- a/docs/rules/en/Kubernetes.API.v1.16.md +++ b/docs/rules/en/Kubernetes.API.v1.16.md @@ -1,7 +1,7 @@ --- severity: Important category: API -online version: https://github.com/microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.API.v1.16.md +online version: https://github.com/microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.API.v1.16.md --- # Use APIs supported in v1.16 @@ -27,5 +27,5 @@ Consider updating resource deployments to use newer API endpoints prior to upgra ## LINKS -- [Kubernetes v1.15.0 deprecations and removals](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.15.md#deprecations-and-removals) +- [Kubernetes v1.15.0 deprecations and removals](https://github.com/kubernetes/kubernetes/blob/main/CHANGELOG/CHANGELOG-1.15.md#deprecations-and-removals) - [Kubernetes Deprecation Policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/) diff --git a/docs/rules/en/Kubernetes.API.v1.17.md b/docs/rules/en/Kubernetes.API.v1.17.md index 0f238ce..403c736 100644 --- a/docs/rules/en/Kubernetes.API.v1.17.md +++ b/docs/rules/en/Kubernetes.API.v1.17.md @@ -1,7 +1,7 @@ --- severity: Important category: API -online version: https://github.com/microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.API.v1.17.md +online version: https://github.com/microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.API.v1.17.md --- # Use APIs supported in v1.17 @@ -25,5 +25,5 @@ Consider updating resource deployments to use newer API endpoints prior to upgra ## LINKS -- [Kubernetes v1.16.0 deprecations and removals](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.16.md#deprecations-and-removals) +- [Kubernetes v1.16.0 deprecations and removals](https://github.com/kubernetes/kubernetes/blob/main/CHANGELOG/CHANGELOG-1.16.md#deprecations-and-removals) - [Kubernetes Deprecation Policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/) diff --git a/docs/rules/en/Kubernetes.API.v1.20.md b/docs/rules/en/Kubernetes.API.v1.20.md index 47629f4..3097292 100644 --- a/docs/rules/en/Kubernetes.API.v1.20.md +++ b/docs/rules/en/Kubernetes.API.v1.20.md @@ -1,7 +1,7 @@ --- severity: Important category: API -online version: https://github.com/microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.API.v1.20.md +online version: https://github.com/microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.API.v1.20.md --- # Use APIs supported in v1.20 @@ -26,6 +26,6 @@ Consider updating resource deployments to use newer API endpoints prior to upgra ## LINKS -- [Kubernetes v1.15.0 deprecations and removals](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.15.md#deprecations-and-removals) -- [Kubernetes v1.17.0 deprecations and removals](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.17.md#deprecations-and-removals) +- [Kubernetes v1.15.0 deprecations and removals](https://github.com/kubernetes/kubernetes/blob/main/CHANGELOG/CHANGELOG-1.15.md#deprecations-and-removals) +- [Kubernetes v1.17.0 deprecations and removals](https://github.com/kubernetes/kubernetes/blob/main/CHANGELOG/CHANGELOG-1.17.md#deprecations-and-removals) - [Kubernetes Deprecation Policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/) diff --git a/docs/rules/en/Kubernetes.Metadata.md b/docs/rules/en/Kubernetes.Metadata.md index f21f97d..e9dbfc2 100644 --- a/docs/rules/en/Kubernetes.Metadata.md +++ b/docs/rules/en/Kubernetes.Metadata.md @@ -1,7 +1,7 @@ --- severity: Awareness category: Management -online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Metadata.md +online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.Metadata.md --- # Use recommended labels diff --git a/docs/rules/en/Kubernetes.Pod.Health.md b/docs/rules/en/Kubernetes.Pod.Health.md index 0ddec62..899fa07 100644 --- a/docs/rules/en/Kubernetes.Pod.Health.md +++ b/docs/rules/en/Kubernetes.Pod.Health.md @@ -1,7 +1,7 @@ --- severity: Important category: Reliability -online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Pod.Health.md +online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.Pod.Health.md --- # Use probes diff --git a/docs/rules/en/Kubernetes.Pod.Latest.md b/docs/rules/en/Kubernetes.Pod.Latest.md index 09a96c9..cc5081c 100644 --- a/docs/rules/en/Kubernetes.Pod.Latest.md +++ b/docs/rules/en/Kubernetes.Pod.Latest.md @@ -1,7 +1,7 @@ --- severity: Important category: Security -online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Pod.Latest.md +online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.Pod.Latest.md --- # Use specific tags diff --git a/docs/rules/en/Kubernetes.Pod.PrivilegeEscalation.md b/docs/rules/en/Kubernetes.Pod.PrivilegeEscalation.md index 0a27ad7..7612499 100644 --- a/docs/rules/en/Kubernetes.Pod.PrivilegeEscalation.md +++ b/docs/rules/en/Kubernetes.Pod.PrivilegeEscalation.md @@ -1,7 +1,7 @@ --- severity: Critical category: Security -online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Pod.PriviledgeEscalation.md +online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.Pod.PriviledgeEscalation.md --- # Deny privilege escalation diff --git a/docs/rules/en/Kubernetes.Pod.Replicas.md b/docs/rules/en/Kubernetes.Pod.Replicas.md index c73c983..7b2ba98 100644 --- a/docs/rules/en/Kubernetes.Pod.Replicas.md +++ b/docs/rules/en/Kubernetes.Pod.Replicas.md @@ -1,7 +1,7 @@ --- severity: Important category: Reliability -online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Pod.Replicas.md +online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.Pod.Replicas.md --- # Use two or more replicas diff --git a/docs/rules/en/Kubernetes.Pod.Resources.md b/docs/rules/en/Kubernetes.Pod.Resources.md index 30a38e8..e1bccd7 100644 --- a/docs/rules/en/Kubernetes.Pod.Resources.md +++ b/docs/rules/en/Kubernetes.Pod.Resources.md @@ -1,7 +1,7 @@ --- severity: Important category: Performance -online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Pod.Resources.md +online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.Pod.Resources.md --- # Set compute resource requirements diff --git a/docs/rules/en/Kubernetes.Pod.Secrets.md b/docs/rules/en/Kubernetes.Pod.Secrets.md index f4676af..e5d125c 100644 --- a/docs/rules/en/Kubernetes.Pod.Secrets.md +++ b/docs/rules/en/Kubernetes.Pod.Secrets.md @@ -1,7 +1,7 @@ --- severity: Critical category: Security -online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/docs/rules/en/Kubernetes.Pod.Secrets.md +online version: https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/docs/rules/en/Kubernetes.Pod.Secrets.md --- # Use secret references diff --git a/pipeline.build.ps1 b/pipeline.build.ps1 index 837a635..bc52335 100644 --- a/pipeline.build.ps1 +++ b/pipeline.build.ps1 @@ -179,8 +179,8 @@ task NuGet { # Synopsis: Install Pester module task Pester NuGet, { - if ($Null -eq (Get-InstalledModule -Name Pester -MinimumVersion 4.0.0 -ErrorAction Ignore)) { - Install-Module -Name Pester -MinimumVersion 4.0.0 -Scope CurrentUser -Force -SkipPublisherCheck; + if ($Null -eq (Get-InstalledModule -Name Pester -RequiredVersion 4.10.1 -ErrorAction Ignore)) { + Install-Module -Name Pester -RequiredVersion 4.10.1 -Scope CurrentUser -Force -SkipPublisherCheck; } Import-Module -Name Pester -Verbose:$False; } diff --git a/src/PSRule.Rules.Kubernetes/PSRule.Rules.Kubernetes.psd1 b/src/PSRule.Rules.Kubernetes/PSRule.Rules.Kubernetes.psd1 index 2438f9d..7830441 100644 --- a/src/PSRule.Rules.Kubernetes/PSRule.Rules.Kubernetes.psd1 +++ b/src/PSRule.Rules.Kubernetes/PSRule.Rules.Kubernetes.psd1 @@ -99,7 +99,7 @@ PrivateData = @{ Tags = @('PSRule', 'PSRule-rules', 'Rule', 'Kubernetes') # A URL to the license for this module. - LicenseUri = 'https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/LICENSE' + LicenseUri = 'https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/LICENSE' # A URL to the main website for this project. ProjectUri = 'https://github.com/Microsoft/PSRule.Rules.Kubernetes' @@ -108,7 +108,7 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = 'https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/master/CHANGELOG.md' + ReleaseNotes = 'https://github.com/Microsoft/PSRule.Rules.Kubernetes/blob/main/CHANGELOG.md' } # End of PSData hashtable PSRule = @{ Baseline = 'Kubernetes'