-
Notifications
You must be signed in to change notification settings - Fork 172
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
Vault sidecar type annotation #496
base: main
Are you sure you want to change the base?
Changes from all commits
e37a881
2801228
7433556
30d7de5
0315a12
412e109
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -809,7 +809,7 @@ func TestConfigTelemetry(t *testing.T) { | |
"vault.hashicorp.com/agent-telemetry-stackdriver_location": "useast-1", | ||
"vault.hashicorp.com/agent-telemetry-stackdriver_namespace": "foo", | ||
"vault.hashicorp.com/agent-telemetry-stackdriver_debug_logs": "false", | ||
"vault.hashicorp.com/agent-telemetry-prefix_filter": `["+vault.token", "-vault.expire", "+vault.expire.num_leases"]`, | ||
"vault.hashicorp.com/agent-telemetry-prefix_filter": `["+vault.token", "-vault.expire", "+vault.expire.num_leases"]`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you revert the accidental space? |
||
}, | ||
&Telemetry{ | ||
UsageGaugePeriod: "10m", | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -285,8 +285,9 @@ func TestContainerSidecar(t *testing.T) { | |||||||||||||||||||||||||||||||||
t.Errorf("wrong number of args, got %d, should have been %d", len(container.Args), 1) | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
if container.Args[0] != DefaultContainerArg { | ||||||||||||||||||||||||||||||||||
t.Errorf("arg value wrong, should have been %s, got %s", DefaultContainerArg, container.Args[0]) | ||||||||||||||||||||||||||||||||||
arg := fmt.Sprintf(DefaultContainerArg, agent.SidecarType) | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add different test cases under vault-k8s/agent-inject/agent/annotations.go Lines 20 to 28 in 412e109
vault-k8s/agent-inject/agent/container_sidecar_test.go Lines 210 to 216 in 412e109
|
||||||||||||||||||||||||||||||||||
if container.Args[0] != arg { | ||||||||||||||||||||||||||||||||||
t.Errorf("arg value wrong, should have been %s, got %s", arg, container.Args[0]) | ||||||||||||||||||||||||||||||||||
Comment on lines
+288
to
+290
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we also add a similar assertion for |
||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
if container.Resources.Limits.Cpu().String() != DefaultResourceLimitCPU { | ||||||||||||||||||||||||||||||||||
|
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.
I think you meant if
a.SidecarType
is not empty, anda.SidecarType
is "agent" or "proxy", then returna.SidecarType
?