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

Strongly-typed API for ArgoCD Configuration #5721

Open
sbose78 opened this issue Mar 10, 2021 · 0 comments
Open

Strongly-typed API for ArgoCD Configuration #5721

sbose78 opened this issue Mar 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@sbose78
Copy link
Contributor

sbose78 commented Mar 10, 2021

Summary

Introduce a strongly-typed Config API/CRD to manage ArgoCD configuration as an alternative to argocd-cm.yaml

Whom does this benefit?
Operators/Admins.

Motivation

Why

  • Maintaining a large ArgoCD configuration configmap such as https://argoproj.github.io/argo-cd/operator-manual/argocd-cm.yaml is error-prone in the absence of native validation/feedback.
  • There is no way to find out which config options are supported without referring to version-specific docs.
  • There is no good way to provide feedback to the admin/operator on the correctness of the config in argocd-cm.

How

  • Have a Kubernetes-native way of defining structured configuration information
  • De-couple areas of configuration which may grow overtime ( repos, health-checks ).
  • Encourage client tooling to make use of native OpenAPI Validation before letting in configuration information.

Proposal

How do you think this should be implemented?

  • Introduce a CRD with an OpenAPI validation schema ArgoCDConfig. The OpenAPI validation schema would drive generation of UI forms and IDE code completion.
  • Strongly-typed API for Repository Configuration #5720 : Deprecate specification of repository configuration in the "main" config and instead use the GitRepositoryConfig CRD as proposed in
  • Pluggable Health Checks & community health check catalog #5722 : Deprecate specification of health checks in the "main" config and instead use the HealthCheck CRD as proposed in
  • Backward compatibility : Honor argocd-cm.yaml if the ArgoCDConfig CR is absent.
apiVersion: argoproj.io/v1alpha1
kind: ArgoCDConfig
metadata:
  name: hello-world
spec:
  url: https://github.com/argoproj/my-private-repository
  statusBadge: 
    enabled: hello-world-secret
  users:
    anonymous:
      enabled: true
    session:
      duration: "24h"
  ga:
    trackingID: UA-12345-1
    anonymizeusers: "false"
  help:
    chatUrl: "https://mycorp.slack.com/argo-cd"
    chatText: "Chat now!"
    
    
  authConfig:
    dex:
      connectors:
      # GitHub example
      - type: github
        id: github
        name: GitHub
        config:
          clientID: aabbccddeeff00112233
          clientSecret: $dex.github.clientSecret
          orgs:
          - name: your-github-org
            teams:
            - red-team
@sbose78 sbose78 added the enhancement New feature or request label Mar 10, 2021
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