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
operator: fix bugs on reading configuration from config-map #10520
Conversation
test-me-please |
f80e7eb
to
5eff360
Compare
test-me-please |
5eff360
to
36c62ae
Compare
test-me-please |
test-me-please previous failure https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/17825/execution/node/179 |
test-me-please |
36c62ae
to
ebf522d
Compare
test-me-please |
1 similar comment
test-me-please |
ebf522d
to
5f4e28f
Compare
test-me-please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general.
Noticed that operator
now has two init
functions one of which (in operator/flags.go) calls
cobra.OnInitialize(option.InitConfig...)hooking up the handling of
--versionand the other (in
operator/main.go) handles
--versionby itself. Would it be possible to somehow merge the two so we can a centralized handling of
--versionin
InitConfig`?
5f4e28f
to
219b81f
Compare
test-me-please previous failure: https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/17871/ |
test-me-please |
cobra.OnInitialize should be called directly in the init function. Fixes: 67b147c ("operator: add ability to ready options from a config directory") Signed-off-by: André Martins <andre@cilium.io>
The programs should be executed when running with `--version` and should only print the version and terminate immediately. Fixes: 67b147c ("operator: add ability to ready options from a config directory") Signed-off-by: André Martins <andre@cilium.io>
Signed-off-by: André Martins <andre@cilium.io>
As cilium operator now relies in the config map changes, we need to restart it the same way as cilium agent so that it can pick up new changes from the cilium-config `config-map`. Signed-off-by: André Martins <andre@cilium.io>
Fixes: 622dae3 ("Test: Added Pre flight checks on ExpectCiliumReady") Signed-off-by: André Martins <andre@cilium.io>
219b81f
to
72a6c02
Compare
@@ -1493,6 +1493,43 @@ func (kub *Kubectl) GetPublicIface() (string, error) { | |||
return kub.getIfaceByIPAddr(K8s1, ipAddr) | |||
} | |||
|
|||
func (kub *Kubectl) DeleteCiliumOperator() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method Kubectl.DeleteCiliumOperator should have comment or be unexported
test-me-please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment, lgtm otherwise
|
||
select { | ||
case <-ctx.Done(): | ||
return fmt.Errorf("timed out waiting to delete Cilium Operator: pods still remaining: %s", pods) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pods
will be uninitialized here on first run, probably won't ever happen, but can we move whole select
to the end of the loop body? I assume we want to run through the loop body at least once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nebril I'm going to fix this in another PR as this PR is blocking some of my work.
cobra.OnInitialize
should be called directly in the init function.Due refactoring,
cilium-agent --version
andcilium-operator --version
no longer work, this PR also fixes this bug by rewriting the code.Also, stop executing flag validation if flags are not set
Fixes: 67b147c ("operator: add ability to ready options from a config directory")
Signed-off-by: André Martins andre@cilium.io
Fixes #10384
This change is