Skip to content

Commit 9698641

Browse files
Merge pull request #8 from Evaneos/cache_sync_timeout
feat: add cache sync timeout configuration
2 parents ad0b78c + 336391d commit 9698641

3 files changed

Lines changed: 9 additions & 17 deletions

File tree

cluster/local/integration_tests.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -343,21 +343,7 @@ EOF
343343
fi
344344

345345
echo_step "waiting for provider to be installed"
346-
if ! "${KUBECTL}" wait "provider.pkg.crossplane.io/${PACKAGE_NAME}" --for=condition=healthy --timeout=240s; then
347-
echo_error "Provider did not become healthy in time. Dumping logs..."
348-
"${KUBECTL}" get all -n crossplane-system
349-
"${KUBECTL}" get providerrevision -o wide
350-
"${KUBECTL}" get provider -o wide
351-
# Get the logs of the provider pod
352-
POD_NAME=$("${KUBECTL}" get pods -n crossplane-system -l "pkg.crossplane.io/provider=${PACKAGE_NAME}" -o name)
353-
if [ -n "$POD_NAME" ]; then
354-
echo "Logs for $POD_NAME:"
355-
"${KUBECTL}" logs -n crossplane-system "$POD_NAME" -c package-runtime
356-
else
357-
echo "No pod found for provider ${PACKAGE_NAME}"
358-
fi
359-
exit 1
360-
fi
346+
"${KUBECTL}" wait "provider.pkg.crossplane.io/${PACKAGE_NAME}" --for=condition=healthy --timeout=180s
361347
}
362348

363349
cleanup_provider() {

cmd/provider/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import (
4242
func main() {
4343
var (
4444
app = kingpin.New(filepath.Base(os.Args[0]), "SQL support for Crossplane.").DefaultEnvars()
45-
debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool()
45+
debug = app.Flag("debug", "Run with debug logging.").Short('d').Envar("DEBUG").Bool()
4646
pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration()
4747
syncPeriod = app.Flag("sync", "How often all resources will be double-checked for drift from the desired state.").Short('s').Default("1h").Duration()
4848
leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").Envar("LEADER_ELECTION").Bool()

examples/deploymentRuntimeConfig.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ spec:
1010
selector: {}
1111
template:
1212
spec:
13-
containers: []
13+
containers:
14+
- name: package-runtime
15+
env:
16+
- name: DEBUG
17+
value: "true"
18+
- name: CACHE_SYNC_TIMEOUT
19+
value: "5m"
1420
tolerations:
1521
- effect: NoSchedule
1622
key: node.kubernetes.io/role

0 commit comments

Comments
 (0)