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

Deprecate grafana field and add log info warning #1192

Merged
merged 5 commits into from
Feb 14, 2024

Conversation

Rizwana777
Copy link
Contributor

@Rizwana777 Rizwana777 commented Jan 25, 2024

What type of PR is this?

Uncomment only one /kind line, and delete the rest.
For example, > /kind bug would simply become: /kind bug

/kind bug

What does this PR do / why we need it:
JIRA Link - https://issues.redhat.com/browse/GITOPS-2049

  • removed duplicate imports from some files

@Rizwana777 Rizwana777 force-pushed the issue-2049 branch 5 times, most recently from 0aee209 to 7d826a0 Compare January 27, 2024 09:26
Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

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

  • See proposed tweak to the deprecation warning, in all the places where it is used.
    • Actually, come to think of it, it couldn't hurt to put this message in a string constant.
  • grafana.go in controllers/argocd can also be deleted, AFAICT.
  • You can also search the code for 'grafana', as I think there are some unused constants that can be removed here, too.

controllers/argocd/configmap.go Outdated Show resolved Hide resolved
controllers/argocd/configmap.go Outdated Show resolved Hide resolved
controllers/argocd/deployment.go Outdated Show resolved Hide resolved
controllers/argocd/deployment.go Outdated Show resolved Hide resolved
@jgwest
Copy link
Member

jgwest commented Jan 30, 2024

@Rizwana777: to fix the failing PR checks:

  • Run make bundle and check in the files under bundle/manifests/ (these are the files that are listed in the failure message under the failing GitHub action)
  • DCO check requires all commits to be signed. This means that when you git commit your changes, you need to use git commit -s. This will automatically sign the commit. (This check is enforced across all of argocd-operator)
    • You may need to squash your exist commits into a single commit, first, and then re-commit them as signed.

@Rizwana777 Rizwana777 force-pushed the issue-2049 branch 5 times, most recently from 5b39bde to 468c553 Compare February 5, 2024 09:45
Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

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

We should probably remove the remaining Grafana references/artifacts. I was able to find these, for example, by searching for 'grafana':

  • Dockerfile entries in multiple Dockerfiles
  • .md files under /docs
  • grafana/ directory
  • GRAFANA_CONFIG_PATH

@Rizwana777
Copy link
Contributor Author

@jgwest removed most of the files and contents related to grafana, PTAL

Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

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

A few more minor items I found going over the changes, then good to go

controllers/argocd/ingress.go Outdated Show resolved Hide resolved
controllers/argocd/route.go Outdated Show resolved Hide resolved
controllers/argocd/service.go Outdated Show resolved Hide resolved
Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com>
Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com>
Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com>
Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com>
Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @Rizwana777!

Comment on lines -312 to -317
// newConfigMapWithName creates a new ConfigMap with the given suffix appended to the name.
// The name for the CongifMap is based on the name of the given ArgCD.
func newConfigMapWithSuffix(suffix string, cr *argoproj.ArgoCD) *corev1.ConfigMap {
return newConfigMapWithName(fmt.Sprintf("%s-%s", cr.ObjectMeta.Name, suffix), cr)
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Rizwana777 did you mean to get rid of this function? it is used for other configmaps as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jaideepr97 newConfigMapWithSuffix is used only used by grafana right now and I didn't see any place in the code where it is used, so I have removed it , I can add it back if we are using it in future somewhere?

Copy link
Collaborator

Choose a reason for hiding this comment

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

oops, you're right
my bad

@@ -669,7 +641,7 @@ func (r *ReconcileArgoCD) redisShouldUseTLS(cr *argoproj.ArgoCD) bool {
tlsSecretName := types.NamespacedName{Namespace: cr.Namespace, Name: common.ArgoCDRedisServerTLSSecretName}
err := r.Client.Get(context.TODO(), tlsSecretName, &tlsSecretObj)
if err != nil {
if !apierrors.IsNotFound(err) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would prefer we keep this as apierrors as it is more descriptive and allows us to separately import the go errors pkg as well, if needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@jaideepr97
Copy link
Collaborator

Thanks for raising this @Rizwana777 , I am personally happy to see grafana getting deprecated from the operator :)
Left a few minor comments

Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com>
Copy link
Collaborator

@jaideepr97 jaideepr97 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @Rizwana777

@jaideepr97 jaideepr97 merged commit 6a159de into argoproj-labs:master Feb 14, 2024
7 checks passed
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.

3 participants