Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add imagePullSecrets support to Policy Decision Point chart #302

Closed
6 tasks done
lemuelwatts opened this issue Aug 27, 2024 · 3 comments
Closed
6 tasks done
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@lemuelwatts
Copy link

lemuelwatts commented Aug 27, 2024

Description

The v2 charts for Policy Decision Point do not currently allow for the user to add an imagePullSecret so that images can be pulled from private image registries. We would like to add this functionality to the chart so that it can be used more easily in downstream projects that require the use of a private image registry.

DOD

  • Add Policy Decision Point chart reference to imagePullSecret
  • Verify Policy Decision Point chart can be rendered that includes the imagePullSecret field and value
  • Add unit test around adding support for imagePullSecret.
  • Update README to support imagePullSecrets to Policy Decision Point Chart.
  • Verify aissemble build is successful.
  • Verify Downstream project that uses PDP with imagePullSecret is successful.

Test Strategy/Script

  • On Github, Go to Settings,

  • On left tab Go to Developer setting.

  • Click on personal access token (classic) and generate classic token.
    Scope should be something like this:
    Screenshot 2024-10-10 at 10 12 37 AM

  • Copy the gpg key ( personal access token)

  • Create secret with this command
    kubectl create secret docker-registry regcred --docker-server=ghcr.io --docker-username={your github name} --docker-password={your Personal access token}

  • Check to see if you have any PDP docker images by running command
    docker image
    something like this:
    {projectname}-policy-decision-point-docker tilt-16367d62958476b5 16367d629584 23 hours ago 417MB
    NOTE: if you don't have any pdp-docker image, run downstream project with pdp and deploy, then this docker image will be generated.

  • Change Docker tag to your private registry.
    docker tag {projectname}-policy-decision-point-docker:{tilt-tag} ghcr.io/{github username}/issue-302-policy-decision-point-docker:1.0.0-SNAPSHOT

  • push docker tag to your private registry
    docker push ghcr.io/{github username}/issue-302-policy-decision-point-docker:1.0.0-SNAPSHOT

  • check to confirm you have package uploaded
    https://github.com/{your github username}?tab=packages

  • pull in latest dev branch of aissemble

  • make sure build is successful
    Build downstream project using following command:

 mvn archetype:generate -U -DarchetypeGroupId=com.boozallen.aissemble \
  -DarchetypeArtifactId=foundation-archetype \
  -DarchetypeVersion=1.10.0-SNAPSHOT\
  -DgroupId=com.boozallen.aissemble.test \
  -DartifactId=issue-302\
  -DprojectGitUrl=git.example.com/issue-302 \
  -DprojectName=“issue-302”
  • cd into downstream project.
  • Add a spark pipeline with a training step to an aissemble project by saving attached json into
    SparkPipeline.json
    {downstream-project}/{downstream-project}-pipeline-models/src/main/resources/pipelines
  • Run ./mvn clean install and follow manual actions.
  • under {downstream-project}-deploy/src/main/resources/apps/policy-decision-point/values.yaml, update imagePullSecret set to regcred
  • also update dockerRepo to your private registry (i.e. ghcr.io/{github username}

Example: disregard -4 appended in the image name.

Screenshot 2024-10-09 at 3 46 18 PM

  • run mvn clean install again
  • Run tilt up
  • Verify Policy decision point can be stood up and log says it is pulled from private registry.

References/Additional Context

Pull an image from a private registry

@lemuelwatts lemuelwatts added the enhancement New feature or request label Aug 27, 2024
@lemuelwatts lemuelwatts changed the title Feature: Add imagePullSecrets support to Policy Decision Point charts Feature: Add imagePullSecrets support to Policy Decision Point chart Aug 27, 2024
@ewilkins-csi ewilkins-csi added this to the 1.9.0 milestone Aug 28, 2024
@ewilkins-csi ewilkins-csi modified the milestones: 1.9.0, 1.10.0 Sep 25, 2024
@jaebchoi jaebchoi self-assigned this Oct 7, 2024
@jaebchoi jaebchoi added this to the 1.10.0 milestone Oct 7, 2024
@jaebchoi
Copy link
Contributor

jaebchoi commented Oct 7, 2024

DoD completed with @meliz19

@jaebchoi
Copy link
Contributor

jaebchoi commented Oct 9, 2024

OTS completed with @jacksondelametter

@cwoods-cpointe
Copy link
Contributor

Final test completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants