Epic Goal
- RHACM Tighter Integration between PolicyGenerator and GitopsOperator
This workaround for ArgoCD mentioned in this blog should not be:
https://cloud.redhat.com/blog/generating-governance-policies-using-kustomize-and-gitops
In order for OpenShift GitOps to have access to the policy generator when you run Kustomize, a custom container image must be used. Run the
following command to create a Dockerfile called Dockerfile-openshift-gitops-repo-server, which is based on the container image already
used by OpenShift GitOps to run ArgoCD. The precompiled policy generator is also downloaded for the x86-64 (amd64) architecture, and installs it in
the correct location. If you require a different architecture, you must compile the binary from source and install it in the same location:
cat <<EOF > Dockerfile-openshift-gitops-repo-server FROM $(oc get -n openshift-gitops deployment openshift-gitops-repo-server -o=jsonpath='{@.spec.template.spec.containers[0].image}') ENV KUSTOMIZE_PLUGIN_HOME=/etc/kustomize/plugin \\ POLICY_GENERATOR_VERSION=v1.6.0 USER 0 RUN mkdir -p \$KUSTOMIZE_PLUGIN_HOME/policy.open-cluster-management.io/v1/policygenerator && \\ curl -L \\ -o \$KUSTOMIZE_PLUGIN_HOME/policy.open-cluster-management.io/v1/policygenerator/PolicyGenerator \\ https://github.com/stolostron/policy-generator-plugin/releases/download/\$POLICY_GENERATOR_VERSION/linux-amd64-PolicyGenerator && \\ chmod +x \$KUSTOMIZE_PLUGIN_HOME/policy.open-cluster-management.io/v1/policygenerator/PolicyGenerator USER argocd EOF
Why is this important?
- …
Scenarios
- ...
Acceptance Criteria
- CI - MUST be running successfully with tests automated
- Release Technical Enablement - Provide necessary release enablement details and documents.
- ...
Dependencies (internal and external)
- ...
Previous Work (Optional):
- …
Open questions::
- …
Done Checklist
- CI - CI is running, tests are automated and merged.
- Release Enablement <link to Feature Enablement Presentation>
- DEV - Upstream code and tests merged: <link to meaningful PR or GitHub Issue>
- DEV - Upstream documentation merged: <link to meaningful PR or GitHub Issue>
- DEV - Downstream build attached to advisory: <link to errata>
- QE - Test plans in Polarion: <link or reference to Polarion>
- QE - Automated tests merged: <link or reference to automated tests>
- DOC - Downstream documentation merged: <link to meaningful PR>
- is related to
-
GITOPS-1945 Add support for the ACM PolicyGenerator to the GitOps operator
-
- Closed
-