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

Serverless should set SourceUpdateFailed condition in case secret for git authorization is missing #1419

Open
kwiatekus opened this issue Jan 28, 2025 · 0 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@kwiatekus
Copy link
Contributor

Description

User misconfiguration for git sourced function (missing secret) is not reflected in function's Configured condition.
Instead - the Configured condition remains nil which is not a valid final state of function reconciliation.
In such case neither user, nor kyma monitoring is not able to detect it and act accordingly.

Reason
Improved UX: User - should be able to see Configured False with reason SourceUpdateFailed and a call for action. (I.e make sure the secret needed for git authorization is there)
Improved Operations SLA fulfilment: Setting up proper error reason in function conditions allows us to detect it as user misconfiguration and not treat that as serverless downtime.

Expected result

Having configured git function from private repository and providing a name for non-existing secret should end up reconciling the function status into Configure false because of SourceUpdateFailed

Actual result

Having configured git function from private repository and providing a name for non-existing secret keeps the conditions nil which is seen as downtime and eats up disruption budget (downtime)

Attachments

ConditionReasonSourceUpdateFailed ConditionReason = "SourceUpdateFailed"

kyma-system/serverless-ctrl-mngr-54d96588b8-48689       manager 2025-01-27 21:47:52.855440981 +0000 UTC {"level":"ERROR","timestamp":"2025-01-27T21:47:52Z","caller":"controller/controller.go:316","message":"Reconciler error","context":{"controller":"function-controller","controllerGroup":"serverless.kyma-project.io","controllerKind":"Function","Function":{"name":"xxx","namespace":"xxx"},"namespace":"xxx","name":"xxx","reconcileID":"2a2e5974-a3e0-40d5-9688-3345e5eec650","error":"while getting secret: secrets \"github-tools-secret\" not found","errorVerbose":"secrets \"github-tools-secret\" not found\nwhile getting secret\ngithub.com/kyma-project/serverless/components/serverless/internal/controllers/serverless.stateFnGitCheckSources\n\t/workspace/go/src/github.com/kyma-project/serverless/components/serverless/internal/controllers/serverless/fsm.go:213\ngithub.com/kyma-project/serverless/components/serverless/internal/controllers/serverless.(*reconciler).reconcile\n\t/workspace/go/src/github.com/kyma-project/serverless/components/serverless/internal/controllers/serverless/fsm.go:69\ngithub.com/kyma-project/serverless/components/serverless/internal/controllers/serverless.(*FunctionReconciler).Reconcile\n\t/workspace/go/src/github.com/kyma-project/serverless/components/serverless/internal/controllers/serverless/function_reconcile.go:175\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:116\nsigs.k8s.io/controller-runtime/pkg/internal/controller.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants