Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pkg/cmd/render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package render

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -123,7 +122,7 @@ func (r *renderOpts) Run() error {
renderConfig := TemplateData{}

if len(r.clusterConfigFile) > 0 {
_, err := ioutil.ReadFile(r.clusterConfigFile)
_, err := os.ReadFile(r.clusterConfigFile)
if err != nil {
return err
}
Expand Down Expand Up @@ -158,7 +157,7 @@ func (r *renderOpts) Run() error {
if err := os.MkdirAll(filepath.Dir(r.cloudProviderConfigOutputFile), 0755); err != nil {
return fmt.Errorf("failed to create %v: %w", r.cloudProviderConfigOutputFile, err)
}
if err := ioutil.WriteFile(r.cloudProviderConfigOutputFile, targetCloudConfigMapData, 0644); err != nil {
if err := os.WriteFile(r.cloudProviderConfigOutputFile, targetCloudConfigMapData, 0644); err != nil {
return fmt.Errorf("failed to write merged config to %q: %v", r.cloudProviderConfigOutputFile, err)
}
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/operator/kube_cloud_config/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package kubecloudconfig

import (
"fmt"
"io/ioutil"
"os"

corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -34,7 +33,7 @@ func BootstrapTransform(infrastructureFile string, cloudProviderFile string) ([]

// Read, parse, and save the infrastructure object
var clusterInfrastructure configv1.Infrastructure
fileData, err := ioutil.ReadFile(infrastructureFile)
fileData, err := os.ReadFile(infrastructureFile)
if err != nil {
return nil, fmt.Errorf("failed to read infrastructure file: %w", err)
}
Expand All @@ -46,7 +45,7 @@ func BootstrapTransform(infrastructureFile string, cloudProviderFile string) ([]
// Read, parse, and save the user provided cloud configmap
var cloudProviderConfigInput corev1.ConfigMap
if len(cloudProviderFile) > 0 {
fileData, err = ioutil.ReadFile(cloudProviderFile)
fileData, err = os.ReadFile(cloudProviderFile)
if err != nil {
return nil, fmt.Errorf("failed to read cloud provider file: %w", err)
}
Expand Down