Skip to content

Adding lib.jwt to OPA bundle server. #8

@3goats

Description

@3goats

I'm using the demo NGINX bundle server demo to publish my policies. e.g.

# bundle-server.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: bundle-server
  namespace: opa
  labels:
    app: bundle-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: bundle-server
  template:
    metadata:
      labels:
        app: bundle-server
    spec:
      initContainers:
      - name: opa-builder
        image: openpolicyagent/opa:latest
        args:
        - "build"
        - "--bundle"
        - "/opt/policy/"
        - "--output"
        - "/opt/output/bundle.tar.gz"
        volumeMounts:
        - name: index
          mountPath: /opt/output/
        - name: policy
          mountPath: /opt/policy/
      containers:
      - name: bundle-server
        image: nginx:1.25
        ports:
        - containerPort: 80
          name: http
        volumeMounts:
        - name: index
          mountPath: /usr/share/nginx/html
      volumes:
      - name: index
        emptyDir: {}
      - name: policy
        configMap:
          name: authz-policy
---
apiVersion: v1
kind: Service
metadata:
  name: bundle-server
spec:
  selector:
    app: bundle-server
  ports:
  - protocol: TCP
    port: 80
    targetPort: http

Whats the best way to add this lib to it so thats its available to the init container ?
So I need to add all of the .rego files from the .lib dir ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions