Comments (3)
Yes, it works with Flux V2 and with Flux V2 only.
It looks like there is a bug in the tutorial for the GitHub part. Everything should be created in flux-system namespace like in the AzDo part.
But anyway, do you have service gitops-connector
in cluster-config
namespace? If so, what do the gitops-connector logs look like?
from gitops-connector.
Hi @eedorenko,
I have a similar issue with the tutorial for GitOps with flux2 on GitHub here, an on-prem Arc agent and the repos for infra here & application there.
The resources deployment works well, the problem is I do not see any commit status update in https://github.com/coulof/arc-cicd-demo-gitops/commits/master
I installed everything in the same flux-system
namespace as follow:
az k8s-configuration flux create \
--name todos \
--cluster-name AzureArcBigCluster \
--namespace flux-system \
--resource-group AzureArcTestFlorian \
-u https://github.com/coulof/arc-cicd-demo-gitops.git \
--https-user coulof \
--https-key ghp_ZXXXXXXXXXXXXXXXXXXXXXXX \
--scope cluster \
--cluster-type connectedClusters \
--branch master \
--kustomization name=todos prune=true path=arc-cicd-cluster/manifests
helm upgrade -i gitops-connector gitops-connector/gitops-connector \
--namespace flux-system \
--set gitRepositoryType=GITHUB \
--set ciCdOrchestratorType=GITHUB \
--set gitOpsOperatorType=FLUX \
--set gitHubGitOpsRepoName=arc-cicd-demo-gitops \
--set gitHubGitOpsManifestsRepoName=arc-cicd-demo-gitops \
--set gitHubOrgUrl=https://api.github.com/repos/coulof \
--set gitOpsAppURL=https://github.com/coulof/arc-cicd-demo-gitops/commit \
--set orchestratorPAT=ghp_ZXXXXXXXXXXXXXXXXXXXXXXX
The problem seems to be with the payload between the notification-controller
and the gitops-connector
.
From the notification-controller logs we see:
notification-controller-5c674c667d-96bd4 manager {"level":"error","ts":"2022-07-26T12:42:33.018Z","logger":"event-server","msg":"failed to send notification","reconciler kind":"Kustomization","name":"todos-todos","namespace":"flux-system","error":"postMessage failed: failed to execute request: POST http://gitops-connector:8080/gitopsphase giving up after 5 attempt(s)"}
notification-controller-5c674c667d-96bd4 manager {"level":"error","ts":"2022-07-26T12:42:33.019Z","logger":"event-server","msg":"failed to send notification","reconciler kind":"Kustomization","name":"todos-todos","namespace":"flux-system","error":"postMessage failed: failed to execute request: POST http://gitops-connector:8080/gitopsphase giving up after 5 attempt(s)"}
notification-controller-5c674c667d-96bd4 manager {"level":"error","ts":"2022-07-26T12:42:33.075Z","logger":"event-server","msg":"failed to send notification","reconciler kind":"Kustomization","name":"todos-todos","namespace":"flux-system","error":"postMessage failed: failed to execute request: POST http://gitops-connector:8080/gitopsphase giving up after 5 attempt(s)"}
notification-controller-5c674c667d-96bd4 manager {"level":"error","ts":"2022-07-26T12:42:33.075Z","logger":"event-server","msg":"failed to send notification","reconciler kind":"Kustomization","name":"todos-todos","namespace":"flux-system","error":"postMessage failed: failed to execute request: POST http://gitops-connector:8080/gitopsphase giving up after 5 attempt(s)"}
The logs from the GitOps controller are quite empty :
kubectl logs -n flux-system gitops-connector-5678c5869d-vrsv8 |more
[2022-07-25 13:17:37 +0000] [6] [INFO] Starting gunicorn 20.0.4
[2022-07-25 13:17:37 +0000] [6] [INFO] Listening at: http://0.0.0.0:8080 (6)
[2022-07-25 13:17:37 +0000] [6] [INFO] Using worker: sync
[2022-07-25 13:17:37 +0000] [7] [INFO] Booting worker with pid: 7
DEBUG:root:Adding configured subscribers...
ERROR:root:Subscriber config not found. Defaulting to no subscribers.
DEBUG:root:0 subscribers added.
[2022-07-25 13:17:37,367] [timeloop] [INFO] Starting Timeloop..
INFO:timeloop:Starting Timeloop..
INFO:timeloop:Registered job <function pr_polling_thread_worker at 0x7fcec1824ee0>
[2022-07-25 13:17:37,368] [timeloop] [INFO] Registered job <function pr_polling_thread_worker at 0x7fcec1824ee0>
[2022-07-25 13:17:37,368] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set
INFO:timeloop:Timeloop now started. Jobs will run based on the interval set
INFO:root:Starting commit status thread
INFO:root:Starting periodic PR cleanup
INFO:root:Finished PR cleanup, sleeping for 30 seconds...
INFO:root:Starting periodic PR cleanup
INFO:root:Finished PR cleanup, sleeping for 30 seconds...
INFO:root:Starting periodic PR cleanup
From the events, we can see:
kubectl get event -a
flux-system 0s Normal NewArtifact gitrepository/todos stored artifact for commit 'Modify ns to check commit notifications'
flux-system 0s Normal ReconciliationSucceeded kustomization/todos-todos Reconciliation finished in 1.094752452s, next run in 2m0s
flux-system 0s Normal Progressing kustomization/todos-todos Namespace/todos created
flux-system 0s Normal Progressing kustomization/todos-todos Namespace/todos-trial deleted
flux-system 0s Normal Progressing kustomization/todos-todos Health check passed in 29.574578ms
flux-system 0s Normal ReconciliationSucceeded kustomization/todos-todos Reconciliation finished in 1.147256989s, next run in 2m0s
flux-system 60m Normal Progressing kustomization/todos-todos Namespace/todos-dev created...
flux-system 60m Normal Progressing kustomization/todos-todos Health check passed in 5.020324622s
flux-system 60m Normal ReconciliationSucceeded kustomization/todos-todos Reconciliation finished in 6.130217517s, next run in 10m0s
flux-system 61m Normal NewArtifact gitrepository/todos stored artifact for commit 'Remove prod ns to check commit notifications'
flux-system 0s Normal GarbageCollectionSucceeded gitrepository/todos garbage collected 2 artifacts
flux-system 0s Normal GitOperationSucceeded gitrepository/todos no changes since last reconcilation: observed revision 'master/f47b9877c2a28bfa3b34eda5defd5597090b6cb9'
The communication between the notification-controller
container and the gitops-connector
one looks OK:
kubectl exec -ti notification-controller-5c674c667d-96bd4 -n flux-system -c manager -- wget --post-data 'foo=bar' http://gitops-connector:8080/gitopsphase
Connecting to gitops-connector:8080 (10.102.50.200:8080)
wget: server returned error: HTTP/1.1 500 INTERNAL SERVER ERROR
command terminated with exit code 1
And in that case, we have logs on the gitops-connector side.
The rest of the objects looks good:
kubectl get -n flux-system alerts.notification.toolkit.fluxcd.io gitops-connector -o yaml
apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Alert
metadata:
creationTimestamp: "2022-07-25T13:18:27Z"
generation: 2
name: gitops-connector
namespace: flux-system
resourceVersion: "142036269"
uid: 12584357-1ed6-4e1c-8cea-6b831c773d43
spec:
eventSeverity: info
eventSources:
- kind: GitRepository
name: todos
- kind: Kustomization
name: todos-todos
providerRef:
name: gitops-connector
status:
conditions:
- lastTransitionTime: "2022-07-25T13:18:27Z"
message: Initialized
observedGeneration: 2
reason: Succeeded
status: "True"
type: Ready
observedGeneration: 2
kubectl get providers.notification.toolkit.fluxcd.io -n flux-system -o yaml
apiVersion: v1
items:
- apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Provider
metadata:
creationTimestamp: "2022-07-26T11:42:14Z"
generation: 1
labels:
kustomize.toolkit.fluxcd.io/name: todos-todos
kustomize.toolkit.fluxcd.io/namespace: flux-system
name: flux-system
namespace: flux-system
resourceVersion: "142045847"
uid: a7eb70cf-1302-44aa-af1e-99049ab4194b
spec:
address: https://github.com/coulof/arc-cicd-demo-gitops
secretRef:
name: github
type: github
status:
conditions:
- lastTransitionTime: "2022-07-26T11:42:14Z"
message: Initialized
observedGeneration: 1
reason: Succeeded
status: "True"
type: Ready
observedGeneration: 1
- apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Provider
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"notification.toolkit.fluxcd.io/v1beta1","kind":"Provider","metadata":{"annotations":{},"name":"gitops-connector","namespace":"flux-system"},"spec":{"address":"http://gitops-connector:8080/gitopsphase","type":"generic"}}
creationTimestamp: "2022-07-25T13:18:27Z"
generation: 1
name: gitops-connector
namespace: flux-system
resourceVersion: "141547178"
uid: d2ec38b5-4540-44a2-aca0-5b9e04a0f871
spec:
address: http://gitops-connector:8080/gitopsphase
type: generic
status:
conditions:
- lastTransitionTime: "2022-07-25T13:18:27Z"
message: Initialized
observedGeneration: 1
reason: Succeeded
status: "True"
type: Ready
observedGeneration: 1
kind: List
metadata:
resourceVersion: ""
What did I miss in getting the commit status update ?
from gitops-connector.
Fixed in 1.2.0 release
from gitops-connector.
Related Issues (20)
- This repo is missing important files
- Pls make a new release for NewArtifact issue HOT 1
- IndexError: list index out of range - AT runid = commitMessageArray[2] HOT 6
- Receiving a "sync-success" dispatch even when no changes have been deployed HOT 1
- Gitops-connector only support 1 kustomization per gitops repo HOT 1
- Gitops connector not working with manual azure devops approval HOT 1
- Azure devops pipeline not working HOT 1
- Not possible to use with GitHub for manifest repository when using Azure DevOps for CI/CD HOT 1
- Problem with gitops-connector concept and hard to adapt for multiple applications scenario HOT 4
- Incompatibility with the latest revision format for Flux HOT 3
- Documentation links are broken HOT 2
- GitCommit status update fails for Azure DevOps Repo HOT 1
- When autocomplete is used, the PR number cannot be retrieved HOT 1
- Support workload identity HOT 1
- gitops-connector pod in CrashLoopBackoff state after executing helm upgrade
- Broken link in Readme HOT 1
- Azure DevOps personal access token - Permissions
- Azure DevOps orchestratorPAT as KeyVault reference instead of supplied as a hardcoded string
- Option to control logging level
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitops-connector.