-
Notifications
You must be signed in to change notification settings - Fork 24
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
add ci-pr
deployment
#75
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
given that we have both `web` and `worker` activated in this deployment, the worker will have the TSA host automatically set, meaning that such value will be completely ignored. see https://github.com/concourse/concourse-chart/blob/9844b8d089af162167659440959d79f73bde10f0/templates/worker-statefulset.yaml#L181-L187 Signed-off-by: Denise Yu <[email protected]> Signed-off-by: Ciro S. Costa <[email protected]>
cirocosta
force-pushed
the
ci-workers-pr
branch
from
November 22, 2019 16:19
334b3c7
to
b180348
Compare
this commit is intended to allow the [`prs` pipeline] to co-exist with `nci` in the `hush-house` gke cluster. it does so by: - adding a node pool to the cluster (`ci-workers-pr`) whose size is the same as we had previously in our BOSH deployment - adding a deployment (`ci-pr`) that puts workers in such node pool. As such deployment is supposed to run untrusted workloads, we needed a way of restricting the network access that this deployment could have in order to avoid lateral movements in the internal net (in the case of our BOSH environment, we had a totally different network - in k8s, we'd need to be in a separate cluster if we wanted to go w/ the same approach of different nets). This led us to enabling the enforcement of network policies in the cluster, and creating a policy for `ci-pr` that would target the pods delpoyed by it, effectively blocking internal connectivity to anything we didn't want (i.e., anything that's not ci's TSA). ps.: these changes have already been applied. [`prs` pipeline]: https://nci.concourse-ci.org/teams/main/pipelines/prs Signed-off-by: Denise Yu <[email protected]> Signed-off-by: Ciro S. Costa <[email protected]>
cirocosta
force-pushed
the
ci-workers-pr
branch
from
November 22, 2019 16:23
b180348
to
d462342
Compare
merging it directly to reflect the current state |
w/ regards to "why to go w/ internal connection for connecting to # matches tcp conns to our external load-balancer - once matched, gets us to the
# `KUBE-FW-blabla` rule.
#
-A KUBE-SERVICES \
-d 34.68.37.70/32 \
-p tcp \
-m comment --comment "ci/ci-web:tsa loadbalancer IP" \
-m tcp --dport 2222 \
-j KUBE-FW-3WZFA3OBZWICIHEP# in this "catch anyone that landed here" rule, we jump to the "mark to drop"
#
-A KUBE-FW-3WZFA3OBZWICIHEP \
-m comment --comment "ci/ci-web:tsa loadbalancer IP" \
-j KUBE-MARK-DROP# mark drop just puts a mark so that a "catch all with this mark" rule can than
# act on it.
#
-A KUBE-MARK-DROP \
-j MARK --set-xmark 0x8000/0x8000# acting on those marked as `0x8000`: drop!
#
-A KUBE-FIREWALL \
-m comment --comment "kubernetes firewall for dropping marked packets" \
-m mark --mark 0x8000/0x8000 \
-j DROP ^ (from the host) |
Thus, the final condition is to:
|
This was referenced Nov 25, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hey,
This PR is intended to allow the
prs
pipeline to co-exist withnci
in thehush-house
gke cluster.it does so by:
ci-workers-pr
) whose size is thesame as we had previously in our BOSH deployment
ci-pr
) that puts workers in such node pool.As such deployment is supposed to run untrusted workloads, we needed a
way of restricting the network access that this deployment could have in
order to avoid lateral movements in the internal net (in the case of our
BOSH environment, we had a totally different network - in k8s, we'd need
to be in a separate cluster if we wanted to go w/ the same approach of
different nets).
This led us to enabling the enforcement of network policies in the
cluster, and creating a policy for
ci-pr
that would target the podsdelpoyed by it, effectively blocking internal connectivity to anything
we didn't want (i.e., anything that's not ci's TSA).
ps.: these changes have already been applied.
related: concourse/prod#36