Giter Site home page Giter Site logo

Comments (10)

bauerjs1 avatar bauerjs1 commented on July 28, 2024

In case that helps, I do not see this suspicious line

4:45PM DBG NewVcsToArgoMap, are we here?

in my startup logs, in contrast to your deployment.

I got it to work with KUBECHECKS_MONITOR_ALL_APPLICATIONS: true today with the following settings:

KUBECHECKS_ARGOCD_API_INSECURE: true  # because signed by private ca
KUBECHECKS_ARGOCD_API_SERVER_ADDR: argocd.mycompany.com
KUBECHECKS_ARGOCD_WEBHOOK_URL: https://argocd.mycompany.com/api/webhook
KUBECHECKS_LOG_LEVEL: trace
KUBECHECKS_MONITOR_ALL_APPLICATIONS: true
KUBECHECKS_NAMESPACE: gitlab
KUBECHECKS_WEBHOOK_URL_BASE: https://kubechecks.mycompany.com
KUBECHECKS_VCS_BASE_URL: https://git.mycompany.com
KUBECHECKS_VCS_TYPE: gitlab

Maybe this issue is specific to GitHub

from kubechecks.

audrey-mux avatar audrey-mux commented on July 28, 2024

"4:45PM DBG NewVcsToArgoMap, are we here?"

I added that as part of my troubleshooting.

  KUBECHECKS_ARGOCD_API_INSECURE: 'false'
  KUBECHECKS_ARGOCD_API_PATH_PREFIX: /cd
  KUBECHECKS_ARGOCD_API_SERVER_ADDR: argo.mycompany.io
  KUBECHECKS_LOG_LEVEL: debug
  KUBECHECKS_MONITOR_ALL_APPLICATIONS: 'true'
  KUBECHECKS_PERSIST_LOG_LEVEL: 'true'
  KUBECHECKS_SHOW_DEBUG_INFO: 'true'
  KUBECHECKS_VCS_TYPE: github
  KUBECHECKS_WEBHOOK_URL_BASE: https://kubechecks.mycompany.io

from kubechecks.

djeebus avatar djeebus commented on July 28, 2024

I'm guessing that the strings don't match up to what they should or there's a way your argocd server is configured that isn't expected. Would you mind running the temp image built in #66 (or add those debug lines to your build) and mention them here? might be tedious to make anonymous, feel free to send them to me instead. I suspect that the issue might have to do w/ punctuation, casing, some kind of mismatch between the github event and the argocd app config.

from kubechecks.

audrey-mux avatar audrey-mux commented on July 28, 2024

Using the build in #66 the logs look the same

6:36PM DBG Debug level logging enabled.
6:36PM INF Initialized logger.
6:36PM INF setting logrus log level log_level=debug
6:36PM INF Initializing telemetry
6:36PM INF otel disabled
6:36PM INF Server Configuration: 
6:36PM INF Webhook URL Base: https://kubechecks.mycompany.io
6:36PM INF Webhook URL Prefix: 
6:36PM INF VCS Type: github
Starting KubeChecks: 24h b9ae486
6:36PM DBG building VCS to Application Map
6:36PM DBG Token Length - 40
6:36PM INF setting up hook handler path=/hooks
6:36PM INF hook handler setup complete path=/hooks projectPath=/github/project
6:36PM ??? ⇨ http server started on [::]:8080
6:36PM DBG Received hook request
6:36PM INF handling Github open, sync event from PR action=opened
6:36PM ERR could not load Github user email
6:36PM DBG git credentials set
6:36PM INF Repository cloned to: /tmp/kubechecks-mr-clone631960014 project=argo-staging ref=test-check-3
6:36PM DBG Merging MR commit 8962bf82edfa08a3d08c7c8b1164dd90bc42f96d into a tmp branch off of main for manifest generation...
6:36PM DBG Changed files: tools/argo/cd/clusters/bootstrap/apps/access.yaml event_id=24 repo=argo-staging
6:36PM DBG using an argocd matcher
6:36PM DBG looking for https://github.com/myrepo/argo-staging.git repos
6:36PM DBG found no apps
6:36PM DBG Affected apps: [] event_id=24 repo=argo-staging
6:36PM DBG Affected appSets: [] event_id=24 repo=argo-staging
6:36PM DBG Hiding kubecheck messages in PR 24 in repo myrepo/argo-staging
6:36PM INF No affected apps or appsets, skipping event_id=24 repo=argo-staging
6:36PM DBG Posting message to PR 24 in repo myrepo/argo-staging
6:36PM DBG Received hook request
6:36PM ERR invalid event provided to Github client
6:36PM DBG Ignoring event, not a merge request

I also add KUBECHECKS_ARGOCD_API_PATH_PREFIX even though its not documented since ArgoCD does not run at the root. I did try running against ArgoCD reconfigured for / and hit the same thing.

from kubechecks.

audrey-mux avatar audrey-mux commented on July 28, 2024

I'm guessing that the strings don't match up to what they should or there's a way your argocd server is configured that isn't expected. Would you mind running the temp image built in #66 (or add those debug lines to your build) and mention them here? might be tedious to make anonymous, feel free to send them to me instead. I suspect that the issue might have to do w/ punctuation, casing, some kind of mismatch between the github event and the argocd app config.

even modifying a kustomize file failed

11:45PM INF Repository cloned to: /tmp/kubechecks-mr-clone4130812923 project=argo-staging ref=3-reps
11:45PM DBG Merging MR commit c83724c632180170d6f710d3b47e14c2b5b0f0e1 into a tmp branch off of main for manifest generation...
11:45PM DBG Changed files: tools/argo/cd/bootstrap/base/kustomization.yaml event_id=25 repo=argo-staging
11:45PM DBG using best effort matcher
11:45PM DBG Affected apps: [] event_id=25 repo=argo-staging
11:45PM DBG Affected appSets: [] event_id=25 repo=argo-staging

from kubechecks.

audrey-mux avatar audrey-mux commented on July 28, 2024

should https://github.com/zapier/kubechecks/blob/main/pkg/argo_client/applications.go#L108 return an empty map at server startup?

from kubechecks.

djeebus avatar djeebus commented on July 28, 2024

Sorry, coming back to this now. No, it should definitely find your applications. I wonder if there's some authorization issue; does the argocd user you're using have access to list all the apps?

from kubechecks.

audrey-mux avatar audrey-mux commented on July 28, 2024

Sorry, coming back to this now. No, it should definitely find your applications. I wonder if there's some authorization issue; does the argocd user you're using have access to list all the apps?

No worries. Yeah the use has the admin role assigned to it.

from kubechecks.

audrey-mux avatar audrey-mux commented on July 28, 2024

just getting back to this myself - turns out the user, did not in fact, have the correct permissions. (facepalm)

from kubechecks.

audrey-mux avatar audrey-mux commented on July 28, 2024

I think we can close this now :-)

from kubechecks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.