Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The policy-sync sidecar is a simple python utility that abstracts the ONAP policy interface. It is designed to function well as a Kubernetes sidecar container that is injected into a pod.

...

draw.io Diagram
bordertrue
diagramNameUntitled Diagram
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth361
revision1

Configuration

configuration is done via environment variables to support varied environments easily. 

...

ENV_VARIABLE

...

flag

...

Description

...

Example

...

A regular expression or full policy name that the puller should track and query the PDP

...

...

Interface with Policy

Sidecar to use ONAP's policy API to interface and retrieve policies as described: Policy Life Cycle API — onap master documentation

...

Utilize the PAP's DMaaP Notification URL to identify changes to policy and act accordingly: https://docs.onap.org/projects/onap-policy-parent/en/latest/pap/pap.html#dmaap-api

Interface with a microservice

Integration with a microservice

We will provide the sync utility as a dockerized container that can be run alongside a microservice container as part of a kubernetes POD.

Configuration

Configuration is done via environment variables or command line flag to make configuration via configmap easy. 

ENV_VARIABLE

flag

Description

Example

POLICY_SYNC_PDP_URL--pdpPDP URL to queryhttps://policy-conexus-ist-02.ecomp.cci.att.com:30281
POLICY_SYNC_FILTER--filter

A regular expression or full policy name that the puller should track and query the PDP

DCAE.Config_MS_AGING_UVERSE_.*
POLICY_SYNC_ID--idThis just brings back a specific policy name for those who don't need or want a regular expression.XYZ
POLICY_SYNC_OUTFILE--outfileThe output file to write the policy inventory to/opt/etc/policies.json
POLICY_SYNC_CHECKINTERVAL--checkintervalHow often to check the PDP periodically for resiliency purposes20m
POLICY_SYNC_USER--user

Optional Username to use as part of basic auth for the PDP


userxyz
POLICY_SYNC_PASS--passwordOptional Password to use as part of basic auth for the PDPpassword123

Communication with the main application 

...

Running the sync utility as a sidecar container (For use with HELM deployments, etc.). 

In this configuration, the utility should be injected Code will be packaged as a sidecar container that is part of your pod but isolated from the main container. The policy-sync container and main container should communicate using a Kubernetes shared volumedocker container that can be easily injected into a kubernetes mainfest. 

Example K8s pod manifest (which would produce something like the diagram above):

...

...