-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS-16585 created doc for config network policy for operand #100980
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
Conversation
|
🤖 Wed Oct 29 14:22:43 - Prow CI generated the docs preview: |
bharath-b-rh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except for couple of nits.
@siddhibhor-56 Could you please validate the suggestions made.
| apiVersion: operator.openshift.io/v1alpha1 | ||
| kind: ExternalSecretsConfig | ||
| metadata: | ||
| name: cluster | ||
| spec: | ||
| networkPolicies: | ||
| - name: allow-external-secrets-egress | ||
| componentName: CoreController | ||
| policyTypes: | ||
| - Egress | ||
| egress: # Allow all egress traffic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| apiVersion: operator.openshift.io/v1alpha1 | |
| kind: ExternalSecretsConfig | |
| metadata: | |
| name: cluster | |
| spec: | |
| networkPolicies: | |
| - name: allow-external-secrets-egress | |
| componentName: CoreController | |
| policyTypes: | |
| - Egress | |
| egress: # Allow all egress traffic | |
| apiVersion: operator.openshift.io/v1alpha1 | |
| kind: ExternalSecretsConfig | |
| metadata: | |
| name: cluster | |
| spec: | |
| controllerConfig: | |
| networkPolicies: | |
| - name: allow-external-secrets-egress | |
| componentName: ExternalSecretsCoreController | |
| egress: # Allow all egress traffic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| $ oc edit externalsecretsconfigs.operator.openshift.io cluster | ||
| ---- | ||
|
|
||
| . Set the policy by editing the `networkPolicies` section. The following example shows how to allow egress to {aws-first} endpoints, the Kubernetes API server, and the Domain Name Service (DNS). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| . Set the policy by editing the `networkPolicies` section. The following example shows how to allow egress to {aws-first} endpoints, the Kubernetes API server, and the Domain Name Service (DNS). | |
| . Set the policy by editing the `networkPolicies` section. The following example shows how to allow egress to {aws-first} endpoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| apiVersion: operator.openshift.io/v1alpha1 | ||
| kind: ExternalSecretsConfig | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/name: cluster | ||
| app.kubernetes.io/managed-by: external-secrets-operator-e2e | ||
| name: cluster | ||
| spec: | ||
| controllerConfig: | ||
| networkPolicies: | ||
| - name: allow-external-secrets-egress | ||
| componentName: ExternalSecretsCoreController | ||
| egress: | ||
| # Allow egress to Kubernetes API server, AWS endpoints, and DNS | ||
| - to: [] | ||
| ports: | ||
| - protocol: TCP | ||
| port: 6443 # Kubernetes API | ||
| - protocol: TCP | ||
| port: 443 # HTTPS (AWS Secrets Manager) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| apiVersion: operator.openshift.io/v1alpha1 | |
| kind: ExternalSecretsConfig | |
| metadata: | |
| labels: | |
| app.kubernetes.io/name: cluster | |
| app.kubernetes.io/managed-by: external-secrets-operator-e2e | |
| name: cluster | |
| spec: | |
| controllerConfig: | |
| networkPolicies: | |
| - name: allow-external-secrets-egress | |
| componentName: ExternalSecretsCoreController | |
| egress: | |
| # Allow egress to Kubernetes API server, AWS endpoints, and DNS | |
| - to: [] | |
| ports: | |
| - protocol: TCP | |
| port: 6443 # Kubernetes API | |
| - protocol: TCP | |
| port: 443 # HTTPS (AWS Secrets Manager) | |
| apiVersion: operator.openshift.io/v1alpha1 | |
| kind: ExternalSecretsConfig | |
| metadata: | |
| labels: | |
| app.kubernetes.io/name: cluster | |
| app.kubernetes.io/managed-by: external-secrets-operator-e2e | |
| name: cluster | |
| spec: | |
| controllerConfig: | |
| networkPolicies: | |
| - componentName: ExternalSecretsCoreController | |
| egress: | |
| - ports: | |
| - port: 443 # HTTPS (AWS Secrets Manager) | |
| protocol: TCP | |
| name: allow-external-secrets-egress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to add DNS port for both TCP and UDP
- protocol: TCP
port: 5353 # DNS
- protocol: UDP
port: 5353 # DNS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's now added by default correct, why does user need to include it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes correct,Added by default no need to include
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
|
||
| componentName:: name for the core controller specified as `ExternalSecretsCoreController`. | ||
|
|
||
| Egress rules must include the necessary ports, such as Transmission Control Protocol (TCP) port 6443 for the Kubernetes API and TCP port 443 (HTTPS) for services like the {aws-short} Secrets Manager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Egress rules must include the necessary ports, such as Transmission Control Protocol (TCP) port 6443 for the Kubernetes API and TCP port 443 (HTTPS) for services like the {aws-short} Secrets Manager. | |
| Egress rules must include the necessary ports, such as Transmission Control Protocol (TCP) 443 (HTTPS) for services like the {aws-short} Secrets Manager. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| | `external-secrets` | ||
| | 8080 | ||
| | 6443 | ||
| | Accesses metrics and communicates with the API server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wgabor0427 Could you please help reword the description column.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. @bharath-b-rh Reworded the descriptions. Please review and comment on. Thanks.
ff281e8 to
50daa60
Compare
| labels: | ||
| app.kubernetes.io/name: cluster | ||
| app.kubernetes.io/managed-by: external-secrets-operator-e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry missed in the previous review. Please remove the labels field.
| labels: | |
| app.kubernetes.io/name: cluster | |
| app.kubernetes.io/managed-by: external-secrets-operator-e2e |
ddcbfcc to
7eb54d2
Compare
7eb54d2 to
ba4d86a
Compare
ba4d86a to
cd5c7dc
Compare
|
/lgtm |
|
@wgabor0427: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
/label merge-review-needed |
|
|
||
| * An `ExternalSecretsConfig` must be predefined. | ||
|
|
||
| * You must be able to define specific egress rules, including desitination ports and protocols |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * You must be able to define specific egress rules, including desitination ports and protocols | |
| * You must be able to define specific egress rules, including destination ports and protocols. |
|
|
||
| * An `ExternalSecretsConfig` must be predefined. | ||
|
|
||
| * You must be able to define specific egress rules, including desitination ports and protocols |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * You must be able to define specific egress rules, including desitination ports and protocols | |
| * You must be able to define specific egress rules, including destination ports and protocols. |
| - name: allow-external-secrets-egress | ||
| ---- | ||
|
|
||
| componentName:: name for the core controller specified as `ExternalSecretsCoreController`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would technically have "where" about it. See https://redhat-documentation.github.io/supplementary-style-guide/#explain-commands-variables-in-code-blocks. They also usually start with "Specifies. . ."
|
|
||
| toc::[] | ||
|
|
||
| The {external-secrets-operator} includes pre-defined `NetworkPolicies` for security, but you must configure additonal, custom policies through the `ExternalSecretsConfig` custom resource to set the external-secrets controller egress allow policies to communicate with external providers. These configurable policies are set via the `ExternalSecretsConfig` custom resource to establish the egress allow policy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First sentence is very long and hard to get through/understand, IMO.
|
Bill is bricked from fixing these and the PR is urgent. I'm merging under the conditions that we fix these in a future PR. |
|
/cherry-pick enterprise-4.21 |
|
/cherry-pick enterprise-4.20 |
|
@stevsmit: new pull request created: #101690 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@stevsmit: new pull request created: #101691 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Version(s):
4.20+
Issue:
https://issues.redhat.com/browse/OSDOCS-16585
Link to docs preview:
https://100980--ocpdocs-pr.netlify.app/openshift-enterprise/latest/security/external_secrets_operator/external-secrets-operator-config-net-policy.html
QE review:
Additional information: