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

chore: Update argocd, k8s & kustomize deps #46

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

svghadi
Copy link
Member

@svghadi svghadi commented Nov 7, 2024

What does this PR do / why we need it:
Update Argo CD, K8s & kustomize dep to latest

Changes

  • Update deps
  • Modify kustomize code to use latest apis
  • Modify test to fix failures due to controller-runtime dep upgrade

Note
Kustomize has changed a lot over the years with breaking and API changes. I am not familiar with backend codebase or its functionalities. It would be good if someone familiar with backend reviews the kustomize related changes. Additionally, some manual testing of the functionalities would be great if possible.

Signed-off-by: Siddhesh Ghadi <[email protected]>
Copy link

openshift-ci bot commented Nov 7, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign chetan-rns for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Siddhesh Ghadi <[email protected]>
@svghadi svghadi changed the title chore: Update argocd dep [WIP] chore: Update argocd dep Nov 7, 2024
Signed-off-by: Siddhesh Ghadi <[email protected]>
"strings"

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/plumbing/storer"
"github.com/go-git/go-git/v5/storage/memory"
"sigs.k8s.io/kustomize/pkg/fs"
fs "sigs.k8s.io/kustomize/kyaml/filesys"
Copy link
Member Author

@svghadi svghadi Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigs.k8s.io/kustomize/pkg/fs package is deprecated in favour of sigs.k8s.io/kustomize/kyaml/filesys

Ref: https://github.com/kubernetes-sigs/kustomize/blob/afe77936761f8f7ee735a67f167a8382c8406f74/api/filesys/filesys.go#L8-L9

Comment on lines -27 to -42
k8sfactory := k8sdeps.NewFactory()
ldr, err := loader.NewLoader(path, files)
if err != nil {
return nil, err
}
defer func() {
err = ldr.Cleanup()
if err != nil {
panic(err)
}
}()
kt, err := target.NewKustTarget(ldr, k8sfactory.ResmapF, k8sfactory.TransformerF)
if err != nil {
return nil, err
}
r, err := kt.MakeCustomizedResMap()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Siddhesh Ghadi <[email protected]>
@svghadi svghadi changed the title [WIP] chore: Update argocd dep \chore: Update argocd, k8s & kustomize deps Nov 8, 2024
@svghadi svghadi changed the title \chore: Update argocd, k8s & kustomize deps chore: Update argocd, k8s & kustomize deps Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant