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

Restructure manifests into Components for composability #372

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jskrzypek
Copy link
Contributor

Description

I am replacing PR #370 with this one because on further testing I realized that while Kustomize successfully built the resources, the patches were not actually applied. This strategy of using Kustomize Components actually works and produces the intended effect.

The changes included are described in the commit messages:

  1. feat[manifests]: Allow BYO argocd

    Restructuring the manifests to allow consumers of AVP to bring their own argocd
    base by using the kustomize components manifests under manifests/components.

    This allows consumers to integrate more easily with other CMPs or alternate
    versions of argo that the AVP maintainers haven't patched the manifests to
    include.

    NB this requires use of kustomize > v3.7.0 when Components were introduced. For
    more information about components see the docs:
    https://kubectl.docs.kubernetes.io/guides/config_management/components/

  2. feat[manifests]: Restore root manifest

    PR feat: Support AVP installed as CMP sidecar #352 introduced the sidecar pattern, but also renamed the prior default
    manifest, which was available through a reference to
    https://github.com/argoproj-labs/argocd-vault-plugin//manifests

    To get the same app, consumers would need to change any exsting references to
    https://github.com/argoproj-labs/argocd-vault-plugin//manifests/cmp-configmap

    This commit introduces a simple proxy manifest that makes that change backwards
    compatible, meaning that now older references to
    https://github.com/argoproj-labs/argocd-vault-plugin//manifests
    will still resolve to the same app state as
    https://github.com/argoproj-labs/argocd-vault-plugin//manifests/cmp-configmap
    rather than just breaking.

  3. docs: Add instructions for plugin components

    Describe how to use the plugin-only component manifests for use with alternate
    versions of ArgoCD (e.g. HA, newer releases, etc.)

Fixes: #369

Checklist

Please make sure that your PR fulfills the following requirements:

  • Reviewed the guidelines for contributing to this repository
  • The commit message follows the Conventional Commits Guidelines.
  • Tests for the changes have been updated
  • Are you adding dependencies? If so, please run go mod tidy -compat=1.17 to ensure only the minimum is pulled in.
  • Docs have been added / updated
  • Optional. My organization is added to USERS.md.

Type of Change

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

Other information

Closing #370 in favor of this PR

Copy link
Member

@jkayani jkayani left a comment

Choose a reason for hiding this comment

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

LGTM, let's update this from main to use the Argo CD base image for all the sidecars

@jskrzypek jskrzypek force-pushed the jskrzypek/plugin-components branch from 532e122 to 5c41b33 Compare July 15, 2022 21:33
@jskrzypek jskrzypek requested a review from jkayani July 15, 2022 21:33
@werne2j
Copy link
Member

werne2j commented Aug 24, 2022

@jskrzypek Can you rebase your PR with main? Thanks!

Restructuring the manifests to allow consumers of AVP to bring their own argocd
base by using the kustomize components manifests under `manifests/components`.

This allows consumers to integrate more easily with other CMPs or alternate
versions of argo that the AVP maintainers haven't patched the manifests to
include.

NB this requires use of kustomize > v3.7.0 when Components were introduced. For
more information about components see the docs:
https://kubectl.docs.kubernetes.io/guides/config_management/components/
PR argoproj-labs#352 introduced the sidecar pattern, but also renamed the prior default
manifest, which was available through a reference to
https://github.com/argoproj-labs/argocd-vault-plugin//manifests

To get the same app, consumers would need to change any exsting references to
https://github.com/argoproj-labs/argocd-vault-plugin//manifests/cmp-configmap

This commit introduces a simple proxy manifest that makes that change backwards
compatible, meaning that now older references to
https://github.com/argoproj-labs/argocd-vault-plugin//manifests
will still resolve to the same app state as
https://github.com/argoproj-labs/argocd-vault-plugin//manifests/cmp-configmap
rather than just breaking.
Describe how to use the plugin-only component manifests for use with alternate
versions of ArgoCD (e.g. HA, newer releases, etc.)
@jskrzypek
Copy link
Contributor Author

@werne2j done

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.

None yet

3 participants