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

code-refactoring: implement repo-server #1016

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
1caabde
fix: don't set phase to available during host reconciliation (#918)
jaideepr97 Jul 20, 2023
4d09aca
update owners file (#953)
reginapizza Jul 26, 2023
45f3597
Move to only adding two roles for managed namespaces (#954)
selrahal Jul 26, 2023
c7cfa8c
feat: expose operator metrics (#928)
jaideepr97 Aug 1, 2023
89825db
add build.os config for readthedocs (#967)
reginapizza Aug 17, 2023
11299b7
setup 0.8.0 (#966)
reginapizza Aug 21, 2023
b25858d
feat: Add conversion webhook for ArgoCD v1alpha1 to v1beta1 migration…
svghadi Aug 21, 2023
c658019
chore(deps): bump pygments from 2.7.4 to 2.15.0 in /docs (#950)
dependabot[bot] Aug 22, 2023
e49612a
feat: upgrade RH-SSO from 7.5 to 7.6 (#977)
iam-veeramalla Aug 28, 2023
e624a26
refactor: Remove dead code (#979)
svghadi Aug 29, 2023
e928c0e
Replace ArgoCD v1alpha1 references with v1beta1 (#975)
svghadi Aug 29, 2023
380207e
refactor: Remove deprecated .spec.resourceCustomizations (#973)
svghadi Aug 30, 2023
f2f9fb4
upgrade ArgoCD version to 2.8.2 and update the CRDs (#984)
ishitasequeira Aug 30, 2023
8ddbce3
chore: Update ArgoCD v1alpha1 deprecation message (#988)
svghadi Sep 4, 2023
297702f
Add support for tls self signed certs in AppSet Gitlab SCM Provider (…
ishitasequeira Sep 6, 2023
64d5bb2
chore(deps): bump github.com/argoproj/argo-cd/v2 from 2.8.2 to 2.8.3 …
dependabot[bot] Sep 11, 2023
91bf131
feat: pick up argo cd v2.8.3 (#993)
iam-veeramalla Sep 11, 2023
cd7a54b
fix: replace deprecated syntax in kustomization.yaml (#1000)
minchao Sep 25, 2023
aa6ab4e
Missing syntax-highlighting, toggle button for screen mode in argocd-…
surajyadav1108 Sep 25, 2023
75d6cf4
fix: keycloak probes failure and intermittent perforamance issues (#1…
iam-veeramalla Sep 26, 2023
edf628d
Implemented service, servicemonitor and tlssecret
ciiay Sep 29, 2023
8ae82ac
Merge upstream
ciiay Oct 3, 2023
070d37b
Resolved some compiler errors
ciiay Oct 3, 2023
64aa268
bug: fix heathcheck subkey generation for resources with no group (#…
jaideepr97 Oct 3, 2023
08e13ec
Compiler error fix
ciiay Oct 4, 2023
8145317
Merge upstream in
ciiay Oct 5, 2023
ea6d317
Fixed compiler errors
ciiay Oct 5, 2023
997e66e
Merge remote-tracking branch 'upstream/operator-redesign' into gitops…
ciiay Oct 6, 2023
bbdfc82
Added partial unit tests
ciiay Oct 6, 2023
26c9f09
Added unit tests(except for tlssecret)
ciiay Oct 6, 2023
6b3fbb6
chore(deps): bump golang.org/x/net from 0.11.0 to 0.17.0 (#1019)
dependabot[bot] Oct 13, 2023
9798a35
Addressed comments
ciiay Oct 16, 2023
5a2e6c4
Add labelSelector option to filter the ArgoCD instances for reconcili…
raghavi101 Oct 19, 2023
8aca0ed
Addressed discussed a few points
ciiay Oct 20, 2023
c8e4909
fix: address CVE-2023-39325 (#1022)
jaideepr97 Oct 26, 2023
fb27066
Add gcp cherry-pick bot config (#1023)
svghadi Oct 26, 2023
cd9e704
Updated logic to decide if use TLS for redis
ciiay Oct 26, 2023
962f30f
Add .github/dependabot.yml to enable auto dependency version updates …
chengfang Oct 27, 2023
000c4a7
feat(dex): add optional env field (#1005)
rdeusser Oct 30, 2023
17064c9
fix: replace deprecated AddToScheme with Install, and deprecated Sche…
chengfang Nov 16, 2023
9a294a2
allow enabling ArgoCD workloads independently (#1021)
ishitasequeira Nov 16, 2023
18a0a8d
chore(deps): bump argoproj/argocd in /build/util (#1080)
dependabot[bot] Nov 24, 2023
a78a842
feat: upgrade Argo CD for release v.9.0 (#1082)
iam-veeramalla Nov 24, 2023
c238af6
fix the logic for applicationset resources reconcilation when spec.ap…
ishitasequeira Dec 1, 2023
5166a46
docs: enabling/disabling individual argocd core components (#1098)
ishitasequeira Dec 6, 2023
d424ebd
fix: Proper reference to where to find default admin password (#1094)
ikegentz Dec 13, 2023
6c21642
Merge in rebase 1 and rebase 2 changes
ciiay Jan 8, 2024
f4ba3ff
Removed extra constants.go
ciiay Jan 8, 2024
f4da797
Merge in rebase 3 and 4 with compiler problems
ciiay Jan 9, 2024
be83314
Merged rebase 5 PR code
ciiay Jan 9, 2024
c1f17c2
Merged rebase 6 PR code
ciiay Jan 9, 2024
acee651
adding applicationsets in server rbac policy rule (#1140)
Mangaal Jan 10, 2024
fe91e12
Merged rebase 7 PR code
ciiay Jan 10, 2024
98ed5e1
Merged rebase 8 PR code
ciiay Jan 10, 2024
5d6ba7f
Updated constants following coding standard
ciiay Jan 10, 2024
1b9ed91
Merge remote-tracking branch 'upstream/operator-redesign' into gitops…
ciiay Jan 12, 2024
6a6847a
rebase against master
jaideepr97 Jan 14, 2024
d0f5fe3
remove extra argoutils
jaideepr97 Jan 14, 2024
3da6323
add mutation args, instance ref, openshift mutations
jaideepr97 Jan 14, 2024
cffcbf2
change references
jaideepr97 Jan 14, 2024
c61d677
Merge branch 'operator-redesign' of github.com:argoproj-labs/argocd-o…
jaideepr97 Jan 15, 2024
816c053
fix logic to allow processor operation to be less than default value …
anandrkskd Jan 17, 2024
8e3f5f6
fix merge conflict
jaideepr97 Jan 17, 2024
6192296
port mutation changes from redis branch
jaideepr97 Jan 17, 2024
4428be6
port changes to common constants
jaideepr97 Jan 17, 2024
3c80cd2
Use correct repo-server address for notification controller (#1125)
svghadi Jan 17, 2024
6211532
Merged in upstream code
ciiay Jan 17, 2024
a231397
Merge in upstream code
ciiay Jan 17, 2024
764c29c
undo changes to common pkg
jaideepr97 Jan 17, 2024
d9f5735
wip: fix up repo-server
jaideepr97 Jan 17, 2024
a0d28f8
Merge branch 'operator-redesign' of github.com:argoproj-labs/argocd-o…
jaideepr97 Jan 18, 2024
7d93a60
Merge branch 'operator-redesign' of github.com:argoproj-labs/argocd-o…
jaideepr97 Jan 18, 2024
0a61db2
pull in changes from master
jaideepr97 Jan 18, 2024
e75bd95
remove notifs files
jaideepr97 Jan 18, 2024
ba5a79f
minimize changes outside of reposerver folder
jaideepr97 Jan 18, 2024
f5fca6a
Merge branch 'operator-redesign' of github.com:argoproj-labs/argocd-o…
jaideepr97 Jan 18, 2024
6eac1dd
remove changes to argocd controller
jaideepr97 Jan 18, 2024
2b43b6f
remove other changes
jaideepr97 Jan 18, 2024
0b909b7
Merge branch 'operator-redesign' of github.com:argoproj-labs/argocd-o…
jaideepr97 Jan 18, 2024
2cdb18d
remove util file
jaideepr97 Jan 18, 2024
170f5d9
wip polish repo-server
jaideepr97 Jan 22, 2024
d812697
Merge branch 'operator-redesign' of github.com:argoproj-labs/argocd-o…
jaideepr97 Jan 22, 2024
a1068db
generalize tls annotation mutation for all components
jaideepr97 Jan 22, 2024
fefc758
fix merge conflicts
jaideepr97 Jan 22, 2024
8b8c8af
add comment
jaideepr97 Jan 22, 2024
4f7db21
Merge branch 'operator-redesign-add-mutation' of github.com:jaideepr9…
jaideepr97 Jan 22, 2024
1d4354d
retouch sm, svc, sa, status, secret
jaideepr97 Jan 23, 2024
402843d
add prometheus const
jaideepr97 Jan 23, 2024
6c3fc5e
finish repo-server implementation
jaideepr97 Jan 25, 2024
587ad20
Merge branch 'operator-redesign' of github.com:argoproj-labs/argocd-o…
jaideepr97 Jan 25, 2024
b623adb
Merge branch 'operator-redesign' of github.com:argoproj-labs/argocd-o…
jaideepr97 Jan 25, 2024
5d648bb
finish implementation for repo-server
jaideepr97 Jan 25, 2024
a89bea4
move repo deployment to toberemoved
jaideepr97 Jan 25, 2024
9e8feeb
add global test pkg
jaideepr97 Jan 27, 2024
0f2da83
split argocd tbr file
jaideepr97 Jan 27, 2024
947d50c
Merge branch 'op-red-add-global-test-pkg' of github.com:jaideepr97/ar…
jaideepr97 Jan 27, 2024
13aff1a
move repo server code to dedicated tbr file
jaideepr97 Jan 27, 2024
99f0f91
fix merge conflicts
jaideepr97 Jan 27, 2024
10a3bcd
remove log verbosities and trace markers in info msgs
jaideepr97 Jan 27, 2024
4116b3e
fix merge conflicts
jaideepr97 Jan 27, 2024
4cc285d
start adding unit tests
jaideepr97 Jan 27, 2024
047cfc3
move test reconciler client and scheme to global test pkg
jaideepr97 Jan 27, 2024
d2df6fa
Merge branch 'op-red-add-global-test-pkg' of github.com:jaideepr97/ar…
jaideepr97 Jan 27, 2024
33a2660
rename argocd test reconciler
jaideepr97 Jan 27, 2024
3ea68bd
Merge branch 'op-red-add-global-test-pkg' of github.com:jaideepr97/ar…
jaideepr97 Jan 27, 2024
78b4729
wip add unit tests for repo-server
jaideepr97 Jan 28, 2024
45b5300
update all references to updateifchanged
jaideepr97 Jan 28, 2024
53c58c5
fix merge conflicts
jaideepr97 Jan 28, 2024
7531759
finish adding unit tests
jaideepr97 Jan 28, 2024
bc27d5c
add helper unit tests
jaideepr97 Jan 28, 2024
b2400f9
add unit tests for resource deletion & trigger rollout
jaideepr97 Jan 28, 2024
1061a4f
add resource helper & updated trigger rollout
jaideepr97 Jan 28, 2024
923407a
modify scheme opt signature
jaideepr97 Jan 28, 2024
0cee249
add helpers
jaideepr97 Jan 28, 2024
3e5b614
remove unnecessary changes
jaideepr97 Jan 28, 2024
32f7d12
undo unneccesary appset changes
jaideepr97 Jan 28, 2024
e122612
add nil check for ss
jaideepr97 Jan 28, 2024
8b3c414
fix merge conflicts
jaideepr97 Jan 29, 2024
e19bf16
wip: add unit tests with mocks
jaideepr97 Jan 29, 2024
6b5f94f
add unit test for get args
jaideepr97 Jan 29, 2024
0deea83
wip add deployment unit test
jaideepr97 Jan 30, 2024
e68a478
add metrics suffix, generalize name generation logic
jaideepr97 Jan 30, 2024
b3e92cf
Merge branch 'op-red-change-name-generator' of github.com:jaideepr97/…
jaideepr97 Jan 30, 2024
ba9f1f6
fix method signature
jaideepr97 Jan 30, 2024
0320a5e
Merge branch 'op-red-change-name-generator' of github.com:jaideepr97/…
jaideepr97 Jan 30, 2024
9d90241
remove need for dedicated metrics suffix
jaideepr97 Jan 30, 2024
4c8bb5f
allow passing in existing resources to test fns for minor drift checks
jaideepr97 Jan 31, 2024
c4b5e23
finish unit tests
jaideepr97 Jan 31, 2024
3325406
add status reconciliation fns for all components, reconcile statuses …
jaideepr97 Feb 1, 2024
108ecf4
remove status reconciliation from repo-server reconciliation loop
jaideepr97 Feb 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions coding-standards-and-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,18 @@ if rr.Instance.Spec.HA.Enabled {
acr.Logger.Error(err, "reconcileManagedRoles: failed to retrieve role", "name", existingRole.Name, "namespace", existingRole.Namespace)
```

- Use debug level (`Logger.V(1).Info`) when recording non-essential information. i.e, information on events that don't block happy path execution, but can provide hints if troubleshooting is needed e.g:
- Use debug level (`Logger.Debug`) when recording non-essential information. i.e, information on events that don't block happy path execution, but can provide hints if troubleshooting is needed e.g:

```
acr.Logger.V(1).Info("reconcileManagedRoles: one or more mutations could not be applied")
acr.Logger.V(1).Info("reconcileManagedRoles: skip reconciliation in favor of custom role", "name", customRoleName)
acr.Logger.Debug("reconcileManagedRoles: one or more mutations could not be applied")
acr.Logger.Debug("reconcileManagedRoles: skip reconciliation in favor of custom role", "name", customRoleName)
```

- Use Info level (`Logger.Info` or `Logger.V(0).Info`) for all other info-level logs. Any new action taken by the controller that is critical to normal functioning.
- Use Info level (`Logger.Info`) for all other info-level logs. Any new action taken by the controller that is critical to normal functioning.
- - No need to mention function names when logging at `info` level. eg:

```
acr.Logger.V(0).Info("role created", "name", desiredRole.Name, "namespace", desiredRole.Namespace)
acr.Logger.Info("role created", "name", desiredRole.Name, "namespace", desiredRole.Namespace)
```

- Only use log statements to log success/error if the function belongs to a controller package and is invoked by the controller. No need to log statements from utility/helper packages. e.g:
Expand Down
9 changes: 9 additions & 0 deletions common/TOBEREMOVED.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ const (
// ArgoCDRedisHAImageEnvVar is the environment variable used to get the image
// to used for the the Redis container in HA mode.
ArgoCDRedisHAImageEnvVar = "ARGOCD_REDIS_HA_IMAGE"

// ArgoCDDefaultRepoMetricsPort is the default listen port for the Argo CD repo server metrics.
ArgoCDDefaultRepoMetricsPort = 8084

// ArgoCDDefaultRepoServerPort is the default listen port for the Argo CD repo server.
ArgoCDDefaultRepoServerPort = 8081

// ArgoCDKeyRelease is the prometheus release key for labels.
ArgoCDKeyRelease = "release"
)

// DefaultLabels returns the default set of labels for controllers.
Expand Down
6 changes: 2 additions & 4 deletions common/envVars.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ const (
// to used for the Keycloak container.
ArgoCDKeycloakImageEnvVar = "ARGOCD_KEYCLOAK_IMAGE"

// ArgoCDRepoImageEnvVar is the environment variable used to get the image
// to used for the Dex container.
ArgoCDRepoImageEnvVar = "ARGOCD_REPOSERVER_IMAGE"

// ArgoCDGrafanaImageEnvVar is the environment variable used to get the image
// to used for the Grafana container.
ArgoCDGrafanaImageEnvVar = "ARGOCD_GRAFANA_IMAGE"
Expand All @@ -34,4 +30,6 @@ const (

// ArgoCDLabelSelectorEnvVar is an environment variable that contains the labels used for selective instance reconilliation.
ArgoCDLabelSelectorEnvVar = "ARGOCD_LABEL_SELECTOR"

ArgoCDExecTimeoutEnvVar = "ARGOCD_EXEC_TIMEOUT"
)
3 changes: 0 additions & 3 deletions common/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ const (
// ArgoCDKeyRBACScopes is the configuration key for the Argo CD RBAC scopes.
ArgoCDKeyRBACScopes = "scopes"

// ArgoCDKeyRelease is the prometheus release key for labels.
ArgoCDKeyRelease = "release"

// ArgoCDKeyResourceExclusions is the configuration key for resource exclusions.
ArgoCDKeyResourceExclusions = "resource.exclusions"

Expand Down
2 changes: 2 additions & 0 deletions common/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ const (
const (
// ArgoCDCASuffix is the name suffix for ArgoCD CA resources.
ArgoCDCASuffix = "ca"

MetricsSuffix = "metrics"
)
1 change: 1 addition & 0 deletions common/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package common

// notifications
const (
NotificationsController = "notifications-controller"
NotificationsControllerComponent = "argocd-notifications-controller"
NotificationsSecretName = "argocd-notifications-secret"
NotificationsConfigMapName = "argocd-notifications-cm"
Expand Down
3 changes: 3 additions & 0 deletions common/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ package common
const (
// ArgoCDKeyPrometheus is the resource prometheus key for labels.
ArgoCDKeyPrometheus = "prometheus"

// PrometheusReleaseKey is the prometheus release key for labels.
PrometheusReleaseKey = "release"
)

// defaults
Expand Down
8 changes: 8 additions & 0 deletions common/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,11 @@ const (
const (
RedisTLSCertChangedKey = "redis.tls.cert.changed"
)

// commands
const (
RedisCmd = "--redis"
RedisUseTLSCmd = "--redis-use-tls"
RedisInsecureSkipTLSVerifyCmd = "--redis-insecure-skip-tls-verify"
RedisCACertificate = "--redis-ca-certificate"
)
37 changes: 32 additions & 5 deletions common/reposerver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@ package common

// names
const (
RepoServerController = "repo-server-controller"

// RepoServerComponent is the repo-server control plane component
RepoServerComponent = "repo-server"

ArgoCDRepoServerName = "argocd-repo-server"

// ArgoCDRepoServerTLSSecretName is the name of the TLS secret for the repo-server
ArgoCDRepoServerTLSSecretName = "argocd-repo-server-tls"
)

RepoServerSuffix = "-repo-server"
// suffixes
const (
RepoServerSuffix = "repo-server"
)

// values
Expand All @@ -16,9 +26,26 @@ const (

// defaults
const (
// ArgoCDDefaultRepoMetricsPort is the default listen port for the Argo CD repo server metrics.
ArgoCDDefaultRepoMetricsPort = 8084
// DefaultRepoServerMetricsPort is the default listen port for the Argo CD repo server metrics.
DefaultRepoServerMetricsPort = 8084

// DefaultRepoServerPort is the default listen port for the Argo CD repo server.
DefaultRepoServerPort = 8081
)

// env vars
const (
// ArgoCDRepoImageEnvVar is the environment variable used to get the image to be used for
// the repo-server container
ArgoCDRepoImageEnvVar = "ARGOCD_REPOSERVER_IMAGE"
)

// ArgoCDDefaultRepoServerPort is the default listen port for the Argo CD repo server.
ArgoCDDefaultRepoServerPort = 8081
// keys
const (
RepoTLSCertChangedKey = "repo.tls.cert.changed"
)

// commands
const (
RepoServerCmd = "argocd-repo-server"
)
6 changes: 5 additions & 1 deletion common/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ const (
ArgoCDStatusRunning = "Running"

ArgoCDStatusAvailable = "Available"

PrometheusOperator = "prometheus-operator"
)

// general values
Expand Down Expand Up @@ -88,5 +90,7 @@ const (

// Commnds
const (
LogLevel = "--loglevel"
LogLevelCmd = "--loglevel"
LogFormatCmd = "--logformat"
UidEntryPointSh = "uid_entrypoint.sh"
)
Loading
Loading