Configuring the network policy
To strengthen the security of your deployments, you can restrict Internet access by applying some rules to individual pods or groups of pods.
About this task
When you install a release of Operational Decision Manager, the default network policy is to allow all outgoing communication (egress) and only the incoming communication (ingress) between pods of the same release instance, as shown in the following code snippets.
For Decision Center:
spec:
podSelector:
matchLabels:
run: <release-name>-odm-decisioncenter
ingress:
- ports:
- protocol: TCP
port: 9453
egress:
- {}
policyTypes:
- Ingress
- EgressFor Decision Runner:
spec:
podSelector:
matchLabels:
run: <release-name>-odm-decisionrunner
ingress:
- ports:
- protocol: TCP
port: 9443
- from:
- podSelector:
matchLabels:
run: <release-name>-odm-decisioncenter
- podSelector:
matchLabels:
run: <release-name>-odm-decisionserverconsole
egress:
- {}
policyTypes:
- Ingress
- EgressFor Decision Server
Console:
spec:
podSelector:
matchLabels:
run: <release-name>-odm-decisionserverconsole
ingress:
- ports:
- protocol: TCP
port: 9443
- protocol: TCP
port: 1883
- from:
- podSelector:
matchLabels:
run: <release-name>-odm-decisioncenter
- podSelector:
matchLabels:
run: <release-name>-odm-decisionrunner
- podSelector:
matchLabels:
run: <release-name>-odm-decisionserverruntime
egress:
- {}
policyTypes:
- Ingress
- EgressFor Decision Server
Runtime:
spec:
podSelector:
matchLabels:
run: <release-name>-odm-decisionserverruntime
ingress:
- ports:
- protocol: TCP
port: 9443
- from:
- podSelector:
matchLabels:
run: <release-name>-odm-decisionserverconsole
egress:
- {}
policyTypes:
- Ingress
- EgressProcedure
Note: The following steps take place when you configure the custom resource (CR)
file.
Here is how you can configure a different network policy for your ingress and egress
traffic.