GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Docs/cert manager network policies by jyotshnayaparla-00 · Pull Request #7880 · feldera/feldera Conversation
Contributor
Document how to set up HTTPS with cert-manager and how to restrict traffic with NetworkPolicies.
The docs build passes. Tested on a local k3d cluster (k3s 1.33, which enforces NetworkPolicies) with cert-manager v1.21.3 and Feldera chart 0.378.0, with httpsSecretRef, caSecretRef, and mtls.enabled: true. The YAML came from the doc pages as written.
Not tested: multihost pipelines and the link-local credential note.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsThe HTTPS page only showed how to make certificates by hand with OpenSSL. Most users run cert-manager, so add a cert-manager setup first: a self-signed root with one branch for the wildcard server certificate and one for the private CA. The OpenSSL steps stay as the manual option. Add a NetworkPolicies page. The chart does not ship policies because the right rules depend on the cluster (CNI, database, connectors, multihost), so the page lists the traffic between components and gives an example to start from. Say that policies use the database pod port, that the compiler artifact server also needs the db policy, and what to allow for private cloud endpoints, link-local credential endpoints and per-pipeline namespaces.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pitfall (medium): Further down, the mTLS Requirements say "The components read a renewed certificate without a restart." That line is about the chart-issued control-plane client certificate, but next to this box readers will take it as a contradiction. Please say in one of the two places which certificate each statement covers.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both places now say which certificate they mean: the server certificate needs a restart, and the control plane client certificate from the chart doesn't.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pitfall (medium): With NodeLocal DNSCache (common on GKE, and optional on EKS), pods resolve names through
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a bullet for it. The address is usually 169.254.20.10, port 53, UDP and TCP.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing (medium): Connectors aren't the only private-network dependency. Pipeline storage, checkpoint sync to in-cluster or VPC object storage (MinIO, S3 interface endpoints), and an in-cluster OTel collector are also blocked. Please widen this bullet to "systems that pipelines use" and list these.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Widened it to systems that pipelines use, and added object storage for checkpoint sync (MinIO, VPC endpoints). I left the OTel collector out. Pipelines don't export OTLP, and in our OTel setup the collector sends data to the API server, not to the pipeline.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing (medium): This only checks that allowed traffic works. If the CNI doesn't enforce policies (see the note at the top), every check here still passes, so the user believes the pipelines are isolated when they aren't. Please add a negative check, for example from a pipeline pod: This assumes the image has bash. Otherwise, use any TCP probe.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added it, but against the API server instead of the database. On k3d the db check said "isolated" even with the pipeline policy removed, because the db policy blocks that traffic on its own, so it doesn't test the pipeline policy. The API server check says "isolated" with the policy and "not isolated" without it. The pipeline image has bash and timeout.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Say which certificate needs a restart after renewal, add NodeLocal DNSCache and checkpoint sync storage to the policy notes, and add a check that the policies block traffic.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pitfall (medium): This rule assumes the pod, service, and node CIDRs are all RFC 1918. Two cases where that does not hold:
Please add a bullet under "Change the example" saying to add the cluster pod and service CIDRs to
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pitfall (medium):
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. With a private CA, pipelines mount tls.crt of the server certificate secret to verify the control plane. In another namespace the secret does not exist, so the pod never starts.
gz
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can drop the section that describe how to create them with OpenSSL
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dropped.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we validate what happens with cert expiration in a cluster (bring up, make sure cert expires) and give concrete steps on what needs to be done
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tested it on k3d. I gave the server certificate a 1-hour lifetime and let it expire without restarting anything:
A kubectl rollout restart of the API server, runner and compiler fixes it, then stop and start any stuck pipeline. These steps are now in "Renew the server certificate". Also, cluster_healthz stayed green the whole time, so it doesn't catch this.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can drop this
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dropped.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Applied.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clarify that this is in case someone uses postgres pod from ourhelm chart which is uncommon
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can probably move this down a bit
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved it under the example and said it only applies to the Postgres pod from the chart.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. drop this
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. applied.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is a bad defualt here (allow public internet access) for most users.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed for pipelines. The API server and the runner still allow public addresses on port 443, because they call the license server (cloud1.feldera.com) and NetworkPolicies can't match a host name. This explains and says to allow only the proxy if they use one.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would add a recommendation that they configure it e.g., VPC CNI in strict mode
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the examples should be structured for default deny
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whta about the control plane pods? should we cover them too?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets do the most restrictive variant for control and data plane in terms of example policy
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, every component has its own policy now.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsNetworkPolicies: the example is now default deny for the whole namespace, with one policy per component that allows only the traffic Feldera needs, including multihost. Pipelines get no internet access by default; the connectors bullet says how to add it. Tested on k3d: a pipeline compiles and runs, a 2-host pipeline runs, cluster health is green, and removing the host rules or the compiler's Kubernetes API rule breaks it. HTTPS: drop the OpenSSL sections and keep a short list of certificate requirements. Replace the renewal note with tested steps: what fails when the server certificate expires and how to recover. POST /v0/validate_program goes from the API server to the compiler. Without this rule it fails with CompilerUnavailable, which the pipeline test did not catch. Tested on k3d: with only the selector change, binary uploads from the compiler to the artifact server are blocked and the compile never finishes. The hook Job also needs the Kubernetes API; a pod with its label cannot reach it under default deny.
jyotshnayaparla-00
requested review from
anandbraman
and removed request for
anandbraman
This branch has not been deployedNo deployments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersAt least 1 approving review is required to merge this pull request. Uh oh!
There was an error while loading. Please reload this page. AssigneesLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |