Skip to content

Commit 33671df

Browse files
Merge pull request #46 from uhthomas/45
fix: parse flags before logging
2 parents 796585a + 8acb5fc commit 33671df

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

cmd/main.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ func init() {
2525
}
2626

2727
func main() {
28-
webhook.InitK8sClient()
29-
3028
var parameters webhook.SecretInjectorParameters
31-
32-
glog.Info("Starting webhook")
33-
// get command line parameters
3429
flag.IntVar(&parameters.Port, "port", 8443, "Webhook server port.")
3530
flag.StringVar(&webhookServiceName, "service-name", "secrets-injector-svc", "Webhook service name.")
3631
flag.Parse()
3732

33+
glog.Info("Starting webhook")
34+
35+
webhook.InitK8sClient()
36+
3837
dnsNames := []string{
3938
webhookServiceName,
4039
webhookServiceName + "." + webhookNamespace,

deploy/deployment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ spec:
2121
imagePullPolicy: IfNotPresent
2222
args:
2323
- -service-name=secrets-injector
24-
- -alsologtostderr
24+
- -logtostderr
2525
- -v=4
26-
- 2>&1
2726
env:
2827
- name: POD_NAMESPACE
2928
valueFrom:

0 commit comments

Comments
 (0)