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

manage appprojects in *-app #685

Open
hairmare opened this issue May 10, 2022 · 1 comment
Open

manage appprojects in *-app #685

hairmare opened this issue May 10, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@hairmare
Copy link
Contributor

hairmare commented May 10, 2022

Is your feature request related to a problem? Please describe.
Currently, we manage a AppProject for each application we deploy. Often most of the info we need to create the AppProject is already in the app:

  • destination namespace
  • source helm chart

Other info is often consistent over various deployments but not currently tracked in *apps charts:

  • resource allow list (for cluster-wide stuff)

Describe the solution you'd like
We might benefit from (optionally) creating AppProjects directly in *-apps charts.

I'd l like to enable them individually for apps. Values to do so might look like so (example from first app in infra-apps):

argocd:
  # Enable the Argo CD app deployment
  name: argocd
  # current definition of "project" is a string for injection into the app and might need redefining
  project:
    create: true
    # more appproject settings go here
  # ... snip

There are other possibilities to model the data, see below for a projects as top-level key approach.

Describe alternatives you've considered
Well, there is the status quo that i'm not happy with.

We could also create additional *-appproject charts but i'm wary of the additional maintenance burden for such a solution.

An alternative way to implement values would be like so:

argocd:
  # Enable the Argo CD app deployment
  name: argocd
  # keep current definition of project for app
  project: "argo-cd"
  # ... snip

# new top-level key containing all the apps.
projects:
  argocd:
    create: true
    # name here would need to match `argocd.project` (or have some magick in the template to only grab it from there)
    name: "argo-cd"
    # more appproject settings go here

Affected chart

  • all *-app charts

Additional context
The argoconfigs has been ready for this for a while now, we just never got to implementing it.

https://github.com/adfinis-sygroup/helm-charts/blob/b66006a29f2c9df27fd642bc94f9035a7ca5bb47/charts/argoconfig/templates/_appProject.yaml#L1-L17

@hairmare hairmare added the enhancement New feature or request label May 10, 2022
@hairmare
Copy link
Contributor Author

Current solution is to use misc-apps:

---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: misc-apps
  namespace: infra-argocd
spec:
  destination:
    namespace: infra-argocd
    server: https://kubernetes.default.svc
  project: infra-argocd
  syncPolicy:
    automated: {}
    syncOptions:
      - CreateNamespace=true
  source:
    chart: misc-apps
    repoURL: https://charts.adfinis.com
    targetRevision: "*"
    helm:
      values: |
        fullnameOverride: app
        argocdApps:
          enabled: true
          project: infra-argocd
          syncPolicy:
            automated: {}
            syncOptions:
              - CreateNamespace=true
          destination:
            server: https://kubernetes.default.svc
            namespace: infra-argocd
          values:
            projects: []

I still think this issue should be something to consider tho.

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

1 participant