Adding a custom network policy to allow egress to all external providers

You must configure custom policies through the ExternalSecretsConfig custom resource to allow all egress to all external providers.

Prerequisites
  • An ExternalSecretsConfig must be predefined.

  • You must be able to define specific egress rules, including destination ports and protocols.

Procedure
  1. Edit the ExternalSecretsConfig CR by running the following command:

    $ oc edit externalsecretsconfigs.operator.openshift.io cluster
  2. Set the policy by editing the networkPolicies section:

    apiVersion: operator.openshift.io/v1alpha1
    kind: ExternalSecretsConfig
    metadata:
      name: cluster
    spec:
      controllerConfig:
        networkPolicies:
          - name: allow-external-secrets-egress
            componentName: CoreController
            egress: # Allow all egress traffic