Skip to content

Commit 62aef0b

Browse files
committed
fix botched refactor
1 parent 17b260e commit 62aef0b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

server.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,8 @@ func mutateHandler(w http.ResponseWriter, r *http.Request) {
9696

9797
// Explicitly and silently exclude the kube-system namespace
9898
if pod.ObjectMeta.Namespace != metav1.NamespaceSystem {
99-
var v corev1.Volume
100-
var mount corev1.VolumeMount
10199
// Define the volume to mount in
102-
v = corev1.Volume{
100+
v := corev1.Volume{
103101
Name: "gcp-creds",
104102
VolumeSource: corev1.VolumeSource{
105103
HostPath: func() *corev1.HostPathVolumeSource {
@@ -116,7 +114,7 @@ func mutateHandler(w http.ResponseWriter, r *http.Request) {
116114
}
117115

118116
// Mount the volume in
119-
mount = corev1.VolumeMount{
117+
mount := corev1.VolumeMount{
120118
Name: "gcp-creds",
121119
MountPath: "/google-app-creds.json",
122120
ReadOnly: true,

0 commit comments

Comments
 (0)