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: Config Store injected fields should not show up as out of sync in ArgoCD #496

Closed
3 tasks done
ewilkins-csi opened this issue Dec 6, 2024 · 3 comments
Closed
3 tasks done
Assignees
Labels
enhancement New feature or request

Comments

@ewilkins-csi
Copy link
Contributor

ewilkins-csi commented Dec 6, 2024

Description

Since ArgoCD blindly compares the local YAML to the cluster YAML, injected fields like those from the Configuration Store always show up as different. It's possible to ignore fields that are expected to differ, but the more appropriate approach is probably to add any fields injected by the Configuration Store to the managedFields list. This should cause ArgoCD to exclude them from the diff, and may be more correct in Kubernetes. However, there is a chance that it makes updates to objects with Config Store injection more onerous.

DOD

  • Investigate how to make injecting value be ignored field using managed field
  • A resource using Config Store injection should not show out of sync in ArgoCD
  • downstream project with spark and hive pipeline can be stood up in argoCD with no error.

Test Strategy/Script

  • Pull 496-test branch (This issue is merged into feature branch Feature/Universal-Config and need some deploy script in feature/path2production-alignment for easily testing so this 496-test branch is just Universal-Config branch with deploy script added. )

  • Create a downstream project with baseline version 1.11.0-SNAPSHOT

mvn archetype:generate -U -DarchetypeGroupId=com.boozallen.aissemble \
  -DarchetypeArtifactId=foundation-archetype \
  -DarchetypeVersion=1.11.0-SNAPSHOT \
  -DgroupId=com.test \
  -DartifactId=test-496 \
  -DprojectGitUrl=https://github.com/{your-github-username}/test-496 \
  -DprojectName=test-496 \
  && cd test-496 

Replace {your-github-username} with your github username

  • Add the SparkPipeline.json file to the test-496-pipeline-models/src/main/resources/pipelines directory

  • Run mvn clean install until all the manual actions are complete

  • Once the manual actions are complete, run mvn clean install -Dmaven.build.cache.skipCache=true once to get any remaining manual actions

  • Modify the helm templates for Argocd deployment:
    - Mac User: In the -deploy/src/main/resources/apps/configuration-store/values-dev.yaml file update the volumePathOnNode to be /<pathToProject>/test-496-deploy/src/main/resources/configurations
    - Window User: In the -deploy/src/main/resources/values-dev.yaml file update the volumePathOnNode to be /mnt/c/Users/YOUR_USER/PATH/TO/test-496-deploy/src/main/resources/configurations

  • Modify Hive metastore chart

    • in the -deploy/src/main/resources/apps/spark-infrastructure/Chart.yaml update aissemble-hive-metastore-service-chart repository to repository: oci://ghcr.io/jaebchoi. (Use my repo as I have uploaded Chart that has Feature's change)
      i.e.
- name: aissemble-hive-metastore-service-chart
    version: 1.11.0-SNAPSHOT
    repository: oci://ghcr.io/jaebchoi
  • Create a repo for the project created

    • create a new test-496 repository from the github website
    • at the test-496 root directory run below commands
    • git init
    • git add .
    • git commit -m "init test-496 base"
    • git branch -M main
    • git remote add origin https://github.com/<username>/<repo_name>.git
    • git push -u origin main
  • on the root of your downstream project

  • make deploy script executable permission
    chmod +x deploy.sh

  • change port fowarding of argocd-server to 30080
    i.e. go to Rancher desktop-> Click Portfowarding on left section
    NOTE: we’re port forwarding to avoid bug with NodePort in RD on ARM Mac

  • Run following to stand up argoCD
    ./deploy.sh up

  • Go to localhost:30080

  • In Argo CD, Go to spark-infrastructure, and see that ConfigMap for hive-metastore-config, and Stateful set for hive-metastore-db is in sync

Screenshot 2024-12-27 at 10 58 45 AM
Screenshot 2024-12-27 at 10 59 22 AM

References/Additional Context

Managed Fields: https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management
Ignored Fields: https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration

@ewilkins-csi ewilkins-csi added the enhancement New feature or request label Dec 6, 2024
@jaebchoi jaebchoi self-assigned this Dec 10, 2024
@jaebchoi
Copy link
Contributor

DoD Completed with @meliz19

@jaebchoi
Copy link
Contributor

OTS completed with @cpointe-ibllanos

jaebchoi added a commit that referenced this issue Dec 27, 2024
#496 Feature: Config Store injected fields should not show up as out of sync in ArgoCD
@cwoods-cpointe
Copy link
Contributor

Ran through the test steps and they passed

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

3 participants