Closed waleedhammam closed 11 months ago
mkdir policies-pack
cd policies-pack
# Put the policies YAML files here
In the same directory, create a Dockerfile that copies the YAML files into the image.
# Use a minimal base image
FROM alpine
# Set working directory
WORKDIR /app
# Copy YAML files into the image
COPY ./*.yaml /app/
Run the following command to build a Docker image from the directory containing your YAML files and the Dockerfile:
docker build -t ghcr.io/your-username/your-repo:your-tag .
docker push ghcr.io/your-username/your-repo:your-tag
Create an OCIRepository on your Git repo so flux can reconcile it.
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
name: wge-policy-pack-1
namespace: flux-system
spec:
interval: 5m0s
url: oci://ghcr.io/samra10/wge-dev
ref:
tag: v0.0.2
After Flux reconcile, OCI repo should be added to the Sources:- Private Zenhub Image
And the Artifacts could be created successfully Private Zenhub Image
run the following command to make sure the artifacts created successfully
kubectl describe ocirepositories.source.toolkit.fluxcd.io -n flux-system wge-policy-pack-1
Goal: explore policy packing using OCI, disribution