Skip to content

Commit

Permalink
api/daemon: Extend KPR status to show new states
Browse files Browse the repository at this point in the history
Signed-off-by: Martynas Pumputis <m@lambda.lt>
  • Loading branch information
brb authored and joestringer committed Jun 26, 2023
1 parent c2c9121 commit 5cfafd2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
10 changes: 8 additions & 2 deletions api/v1/models/kube_proxy_replacement.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,8 @@ definitions:
- Strict
- Probe
- Partial
- 'True'
- 'False'
devices:
type: array
items:
Expand Down
8 changes: 6 additions & 2 deletions api/v1/server/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions daemon/cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ func (d *Daemon) getCNIChainingStatus() *models.CNIChainingStatus {
func (d *Daemon) getKubeProxyReplacementStatus() *models.KubeProxyReplacement {
var mode string
switch option.Config.KubeProxyReplacement {
case option.KubeProxyReplacementTrue:
mode = models.KubeProxyReplacementModeTrue
case option.KubeProxyReplacementFalse:
mode = models.KubeProxyReplacementModeFalse
case option.KubeProxyReplacementStrict:
mode = models.KubeProxyReplacementModeStrict
case option.KubeProxyReplacementPartial:
Expand Down

0 comments on commit 5cfafd2

Please sign in to comment.