From 2d2e6b241df274a684e08fd9d1536386f3780bb1 Mon Sep 17 00:00:00 2001 From: fahed dorgaa Date: Mon, 29 Dec 2025 11:52:48 +0100 Subject: [PATCH 1/3] feat: add cache sync timeout configuration Signed-off-by: fahed dorgaa --- build | 2 +- cluster/local/integration_tests.sh | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/build b/build index 92457ef1..99c79f0c 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 92457ef1c0feb75cd235bdb90244e340d0796b7f +Subproject commit 99c79f0c310d02157495f457f99b95370200c389 diff --git a/cluster/local/integration_tests.sh b/cluster/local/integration_tests.sh index 99131406..a7dbc280 100755 --- a/cluster/local/integration_tests.sh +++ b/cluster/local/integration_tests.sh @@ -343,21 +343,7 @@ EOF fi echo_step "waiting for provider to be installed" - if ! "${KUBECTL}" wait "provider.pkg.crossplane.io/${PACKAGE_NAME}" --for=condition=healthy --timeout=240s; then - echo_error "Provider did not become healthy in time. Dumping logs..." - "${KUBECTL}" get all -n crossplane-system - "${KUBECTL}" get providerrevision -o wide - "${KUBECTL}" get provider -o wide - # Get the logs of the provider pod - POD_NAME=$("${KUBECTL}" get pods -n crossplane-system -l "pkg.crossplane.io/provider=${PACKAGE_NAME}" -o name) - if [ -n "$POD_NAME" ]; then - echo "Logs for $POD_NAME:" - "${KUBECTL}" logs -n crossplane-system "$POD_NAME" -c package-runtime - else - echo "No pod found for provider ${PACKAGE_NAME}" - fi - exit 1 - fi + "${KUBECTL}" wait "provider.pkg.crossplane.io/${PACKAGE_NAME}" --for=condition=healthy --timeout=180s } cleanup_provider() { From 4d89820bbc7818d6f2ff80f0d03c58a533419894 Mon Sep 17 00:00:00 2001 From: fahed dorgaa Date: Tue, 30 Dec 2025 06:01:41 +0100 Subject: [PATCH 2/3] feat: add CACHE_SYNC_TIMEOUT environment variable and enable debug logging --- cmd/provider/main.go | 2 +- examples/deploymentRuntimeConfig.yaml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 7694e4ea..68a83a02 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -42,7 +42,7 @@ import ( func main() { var ( app = kingpin.New(filepath.Base(os.Args[0]), "SQL support for Crossplane.").DefaultEnvars() - debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool() + debug = app.Flag("debug", "Run with debug logging.").Short('d').Envar("DEBUG").Bool() pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration() syncPeriod = app.Flag("sync", "How often all resources will be double-checked for drift from the desired state.").Short('s').Default("1h").Duration() leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").Envar("LEADER_ELECTION").Bool() diff --git a/examples/deploymentRuntimeConfig.yaml b/examples/deploymentRuntimeConfig.yaml index f8f58ef9..8e6d3017 100644 --- a/examples/deploymentRuntimeConfig.yaml +++ b/examples/deploymentRuntimeConfig.yaml @@ -10,7 +10,13 @@ spec: selector: {} template: spec: - containers: [] + containers: + - name: package-runtime + env: + - name: DEBUG + value: "true" + - name: CACHE_SYNC_TIMEOUT + value: "5m" tolerations: - effect: NoSchedule key: node.kubernetes.io/role From 336391dce384e01a6f87953c2b97e624b8794e52 Mon Sep 17 00:00:00 2001 From: fahed dorgaa Date: Tue, 30 Dec 2025 06:05:20 +0100 Subject: [PATCH 3/3] chore: update build hash for cache sync timeout changes Signed-off-by: fahed dorgaa --- build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build b/build index 99c79f0c..92457ef1 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 99c79f0c310d02157495f457f99b95370200c389 +Subproject commit 92457ef1c0feb75cd235bdb90244e340d0796b7f