Skip to content

Commit

Permalink
feat: Support appset in any namespace ArgoCD feature (#1209)
Browse files Browse the repository at this point in the history
* Support appset in any namespace ArgoCD feature
---------
Signed-off-by: Siddhesh Ghadi <sghadi1203@gmail.com>
  • Loading branch information
svghadi authored Feb 15, 2024
1 parent f717026 commit 4bd23cb
Show file tree
Hide file tree
Showing 59 changed files with 2,117 additions and 268 deletions.
6 changes: 6 additions & 0 deletions api/v1beta1/argocd_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ type ArgoCDApplicationSet struct {

// Enabled is the flag to enable the Application Set Controller during ArgoCD installation. (optional, default `true`)
Enabled *bool `json:"enabled,omitempty"`

// SourceNamespaces defines the namespaces applicationset resources are allowed to be created in
SourceNamespaces []string `json:"sourceNamespaces,omitempty"`

// SCMProviders defines the list of allowed custom SCM provider API URLs
SCMProviders []string `json:"scmProviders,omitempty"`
}

func (a *ArgoCDApplicationSet) IsEnabled() bool {
Expand Down
10 changes: 10 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions bundle/manifests/argoproj.io_argocds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7173,11 +7173,23 @@ spec:
Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
scmProviders:
description: SCMProviders defines the list of allowed custom SCM
provider API URLs
items:
type: string
type: array
scmRootCAConfigMap:
description: SCMRootCAConfigMap is the name of the config map
that stores the Gitlab SCM Provider's TLS certificate which
will be mounted on the ApplicationSet Controller (optional).
type: string
sourceNamespaces:
description: SourceNamespaces defines the namespaces applicationset
resources are allowed to be created in
items:
type: string
type: array
version:
description: Version is the Argo CD ApplicationSet image tag.
(optional)
Expand Down
6 changes: 6 additions & 0 deletions common/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ const (
// ArgoCDNotificationsControllerComponent is the name of the Notifications controller control plane component
ArgoCDNotificationsControllerComponent = "argocd-notifications-controller"

// ArgoCDApplicationSetControllerComponent is the name of the ApplictionSet controller control plane component
ArgoCDApplicationSetControllerComponent = "argocd-applicationset-controller"

// ArgoCDOperatorGrafanaComponent is the name of the Grafana control plane component
ArgoCDOperatorGrafanaComponent = "argocd-grafana"

// ArgoCDDefaultAdminPasswordLength is the length of the generated default admin password.
ArgoCDDefaultAdminPasswordLength = 32

Expand Down
3 changes: 3 additions & 0 deletions common/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ const (
// ArgoCDManagedByClusterArgoCDLabel is needed to identify namespace mentioned as sourceNamespace on ArgoCD
ArgoCDManagedByClusterArgoCDLabel = "argocd.argoproj.io/managed-by-cluster-argocd"

// ArgoCDManagedByClusterArgoCDLabel is needed to identify namespace mentioned as sourceNamespace on ArgoCD
ArgoCDApplicationSetManagedByClusterArgoCDLabel = "argocd.argoproj.io/applicationset-managed-by-cluster-argocd"

// ArgoCDControllerClusterRoleEnvName is an environment variable to specify a custom cluster role for Argo CD application controller
ArgoCDControllerClusterRoleEnvName = "CONTROLLER_CLUSTER_ROLE"

Expand Down
12 changes: 12 additions & 0 deletions config/crd/bases/argoproj.io_argocds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7164,11 +7164,23 @@ spec:
Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
scmProviders:
description: SCMProviders defines the list of allowed custom SCM
provider API URLs
items:
type: string
type: array
scmRootCAConfigMap:
description: SCMRootCAConfigMap is the name of the config map
that stores the Gitlab SCM Provider's TLS certificate which
will be mounted on the ApplicationSet Controller (optional).
type: string
sourceNamespaces:
description: SourceNamespaces defines the namespaces applicationset
resources are allowed to be created in
items:
type: string
type: array
version:
description: Version is the Argo CD ApplicationSet image tag.
(optional)
Expand Down
Loading

0 comments on commit 4bd23cb

Please sign in to comment.