This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
Add NSG exceptional rules for the K8s master SSH service #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the issue #45. To test, set environment variable
export MS_CORP=1
before provisioning the resources.There's a web job scanning for the NSG in MS subscriptions, and apply restrictions on the access to the MS corp network. As a result, if we deploy the resources to the MS subscriptions, they cannot access each other so the CI/CD cannot proceed. (There's only a few exceptional cases like port 443).
We cannot add NSG rules to allow access from a fixed IP address set. We can get the service IP for those pre-allocated services, like the Jenkins master, but we cannot get the public IP for the Jenkins slaves provisioned by the Kubernetes plugin, because they may not have public IP at all.
As a result, an exceptional rule with Internet source to the port 22 was added. The web job deletes the wildcard rule if the port is fixed to 22, so we have our rule defined as
21-23
.It's working as I tested, however, it is not an ideal solution.