mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
Merge pull request #929 from mythi/PR-2022-021
envtest: drop deprecated strings.Title()
This commit is contained in:
commit
42689adc21
@ -17,10 +17,12 @@ package envtest
|
||||
import (
|
||||
"context"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
apps "k8s.io/api/apps/v1"
|
||||
@ -273,10 +275,11 @@ func makeDaemonSet(name, image, initimage string) *apps.DaemonSet {
|
||||
}}
|
||||
}
|
||||
|
||||
title := cases.Title(language.English, cases.NoLower)
|
||||
yes := true
|
||||
ds.OwnerReferences = []metav1.OwnerReference{{
|
||||
APIVersion: "deviceplugin.intel.com/v1",
|
||||
Kind: strings.Title(name) + "DevicePlugin",
|
||||
Kind: title.String(name) + "DevicePlugin",
|
||||
Name: name,
|
||||
Controller: &yes,
|
||||
UID: uuid.NewUUID(),
|
||||
|
Loading…
Reference in New Issue
Block a user