Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
add -logging-format + LogFormat in operator API
Browse files Browse the repository at this point in the history
The default is klog text format, "json" selects zapper.
  • Loading branch information
pohly committed Dec 18, 2020
1 parent a2cf121 commit 17d4480
Show file tree
Hide file tree
Showing 51 changed files with 284 additions and 67 deletions.
8 changes: 0 additions & 8 deletions cmd/pmem-csi-driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,11 @@ SPDX-License-Identifier: Apache-2.0
package main

import (
"flag"
"os"

"k8s.io/klog/v2"

"github.com/intel/pmem-csi/pkg/pmem-csi-driver"
)

func init() {
klog.InitFlags(nil)
}

func main() {
flag.Parse()
os.Exit(pmemcsidriver.Main())
}
2 changes: 0 additions & 2 deletions cmd/pmem-csi-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ SPDX-License-Identifier: Apache-2.0
package main

import (
"flag"
"os"

pmemoperator "github.com/intel/pmem-csi/pkg/pmem-csi-operator"
)

func main() {
flag.Parse()
os.Exit(pmemoperator.Main())
}
36 changes: 18 additions & 18 deletions deploy/bindata_generated.go

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions deploy/crd/pmem-csi.intel.com_deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ spec:
description: Labels contains additional labels for all objects created
by the operator.
type: object
logFormat:
description: LogFormat
enum:
- text
- json
type: string
logLevel:
description: LogLevel number for the log verbosity
type: integer
Expand Down
6 changes: 6 additions & 0 deletions deploy/crd/pmem-csi.intel.com_deployments_webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ spec:
type: string
description: Labels contains additional labels for all objects created by the operator.
type: object
logFormat:
description: LogFormat
enum:
- text
- json
type: string
logLevel:
description: LogLevel number for the log verbosity
type: integer
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.17/direct/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -342,6 +343,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.17/direct/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -390,6 +391,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.17/lvm/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -342,6 +343,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.17/lvm/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -390,6 +391,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.17/pmem-csi-direct-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -390,6 +391,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.17/pmem-csi-direct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -342,6 +343,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.17/pmem-csi-lvm-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -390,6 +391,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.17/pmem-csi-lvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -342,6 +343,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.18/direct/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -342,6 +343,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.18/direct/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -390,6 +391,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.18/lvm/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -342,6 +343,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.18/lvm/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -390,6 +391,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.18/pmem-csi-direct-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -390,6 +391,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.18/pmem-csi-direct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -342,6 +343,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.18/pmem-csi-lvm-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -390,6 +391,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.18/pmem-csi-lvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -342,6 +343,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.19-alpha/direct/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -352,6 +353,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.19-alpha/direct/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -400,6 +401,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.19-alpha/lvm/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -352,6 +353,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.19-alpha/lvm/testing/pmem-csi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -400,6 +401,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=lvm
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
2 changes: 2 additions & 0 deletions deploy/kubernetes-1.19-alpha/pmem-csi-direct-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ spec:
- command:
- /usr/local/bin/pmem-csi-driver
- -v=3
- -logging-format=text
- -mode=controller
- -endpoint=unix:///csi/csi-controller.sock
- -registryEndpoint=tcp://0.0.0.0:10000
Expand Down Expand Up @@ -400,6 +401,7 @@ spec:
- /usr/local/bin/pmem-csi-driver
- -deviceManager=direct
- -v=3
- -logging-format=text
- -mode=node
- -endpoint=unix:///csi/csi.sock
- -nodeid=$(KUBE_NODE_NAME)
Expand Down
Loading

0 comments on commit 17d4480

Please sign in to comment.