Commit 8b197bc0 authored by Taeguk Kwon's avatar Taeguk Kwon Committed by GitHub

op-exporter: don't use the deprecated function `ioutil.ReadFile` (#8753)

parent 54be5434
...@@ -3,7 +3,6 @@ package main ...@@ -3,7 +3,6 @@ package main
import ( import (
"context" "context"
"fmt" "fmt"
"io/ioutil"
"net/http" "net/http"
"os" "os"
"strings" "strings"
...@@ -143,7 +142,7 @@ func main() { ...@@ -143,7 +142,7 @@ func main() {
} }
func getSequencerVersion(health *healthCheck, client *kubernetes.Clientset) { func getSequencerVersion(health *healthCheck, client *kubernetes.Clientset) {
ns, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace") ns, err := os.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
if err != nil { if err != nil {
log.Fatalf("Unable to read namespace file: %s", err) log.Fatalf("Unable to read namespace file: %s", err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment