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

feat(konnect): account for config sync failures in reported node status #4029

Merged
merged 2 commits into from
May 18, 2023

Conversation

czeslavo
Copy link
Contributor

@czeslavo czeslavo commented May 17, 2023

What this PR does / why we need it:

It extends the config sync status reported to Konnect's Node API with values that take into account failures of syncing configuration with Konnect RG, effectively extending it with three new values (on the API surface level):

  • INGRESS_CONTROLLER_STATE_OPERATIONAL_KONNECT_OUT_OF_SYNC
  • INGRESS_CONTROLLER_STATE_PARTIAL_CONFIG_FAIL_KONNECT_OUT_OF_SYNC
  • INGRESS_CONTROLLER_STATE_INOPERABLE_KONNECT_OUT_OF_SYNC

There's no strict contract for allowed values on the API level, however, there's an implicit contract between KIC and Konnect UI that directly consumes the Node object, therefore we're keeping the old values unchanged to make them backward-compatible.

Which issue this PR fixes:

Internal reference: K8-67.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@czeslavo czeslavo added the ci/run-e2e Trigger e2e test run from PR label May 17, 2023
@team-k8s-bot
Copy link
Collaborator

E2E (targeted) tests were started at https://github.com/Kong/kubernetes-ingress-controller/actions/runs/5006144559

@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label May 17, 2023
@czeslavo czeslavo force-pushed the feat/konnect-out-of-sync branch 3 times, most recently from 6baa1ee to 1c1d482 Compare May 17, 2023 17:33
@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Patch coverage: 89.7% and project coverage change: +0.3 🎉

Comparison is base (6ce0245) 59.6% compared to head (a74a800) 59.9%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4029     +/-   ##
=======================================
+ Coverage   59.6%   59.9%   +0.3%     
=======================================
  Files        149     149             
  Lines      16434   16462     +28     
=======================================
+ Hits        9806    9873     +67     
+ Misses      5995    5960     -35     
+ Partials     633     629      -4     
Impacted Files Coverage Δ
internal/konnect/node_agent.go 57.4% <71.4%> (+0.8%) ⬆️
internal/clients/config_status.go 86.4% <93.3%> (+4.6%) ⬆️
internal/dataplane/kong_client.go 67.3% <100.0%> (+6.0%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@czeslavo czeslavo force-pushed the feat/konnect-out-of-sync branch 3 times, most recently from 5021770 to 9aa4cd7 Compare May 18, 2023 09:56
@czeslavo czeslavo self-assigned this May 18, 2023
@czeslavo czeslavo added area/feature New feature or request area/konnect Issues and PRs related to Konnect labels May 18, 2023
@czeslavo czeslavo changed the title feat(konnect): add controller status accounting for konnect sync failures feat(konnect): account for konnect config sync failures in reported node status May 18, 2023
@czeslavo czeslavo force-pushed the feat/konnect-out-of-sync branch 3 times, most recently from 667eff3 to be6f805 Compare May 18, 2023 10:12
@czeslavo czeslavo changed the title feat(konnect): account for konnect config sync failures in reported node status feat(konnect): account for config sync failures in reported node status May 18, 2023
@czeslavo czeslavo added this to the KIC v2.10.0 milestone May 18, 2023
@czeslavo czeslavo marked this pull request as ready for review May 18, 2023 10:13
@czeslavo czeslavo requested a review from a team as a code owner May 18, 2023 10:13
@czeslavo czeslavo added the ci/run-e2e Trigger e2e test run from PR label May 18, 2023
@team-k8s-bot
Copy link
Collaborator

E2E (targeted) tests were started at https://github.com/Kong/kubernetes-ingress-controller/actions/runs/5012901967

@team-k8s-bot team-k8s-bot removed the ci/run-e2e Trigger e2e test run from PR label May 18, 2023
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
@team-k8s-bot team-k8s-bot temporarily deployed to gcloud May 18, 2023 10:19 — with GitHub Actions Inactive
It extends the config sync status reported to Konnect's Node API with values
that take into account failures of syncing configuration with Konnect RG,
effectively extending it with three new values (on the API surface level):

- INGRESS_CONTROLLER_STATE_OPERATIONAL_KONNECT_OUT_OF_SYNC
- INGRESS_CONTROLLER_STATE_PARTIAL_CONFIG_FAIL_KONNECT_OUT_OF_SYNC
- INGRESS_CONTROLLER_STATE_INOPERABLE_KONNECT_OUT_OF_SYNC

There's no strict contract for allowed values on the API level, however,
there's an implicit contract between KIC and Konnect UI that directly consumes
the Node object, therefore we're keeping the old values unchanged to make them
backward-compatible.
internal/dataplane/kong_client_test.go Outdated Show resolved Hide resolved
internal/konnect/node_agent_test.go Outdated Show resolved Hide resolved
internal/konnect/node_agent_test.go Outdated Show resolved Hide resolved
@czeslavo czeslavo requested a review from pmalek May 18, 2023 10:58
internal/konnect/node_agent_test.go Show resolved Hide resolved
@czeslavo czeslavo merged commit da01f51 into main May 18, 2023
32 checks passed
@czeslavo czeslavo deleted the feat/konnect-out-of-sync branch May 18, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request area/konnect Issues and PRs related to Konnect size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants