mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
refactor: use metav1.ObjectMeta in other types
This commit is contained in:
@@ -26,6 +26,7 @@ go_library(
|
||||
"//pkg/util/uuid:go_default_library",
|
||||
"//pkg/volume:go_default_library",
|
||||
"//vendor:github.com/stretchr/testify/mock",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/kubernetes/pkg/api/resource"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
@@ -477,7 +478,7 @@ func (fc *FakeProvisioner) Provision() (*v1.PersistentVolume, error) {
|
||||
fullpath := fmt.Sprintf("/tmp/hostpath_pv/%s", uuid.NewUUID())
|
||||
|
||||
pv := &v1.PersistentVolume{
|
||||
ObjectMeta: v1.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: fc.Options.PVName,
|
||||
Annotations: map[string]string{
|
||||
"kubernetes.io/createdby": "fakeplugin-provisioner",
|
||||
@@ -737,7 +738,7 @@ func GetTestVolumePluginMgr(
|
||||
// CreateTestPVC returns a provisionable PVC for tests
|
||||
func CreateTestPVC(capacity string, accessModes []v1.PersistentVolumeAccessMode) *v1.PersistentVolumeClaim {
|
||||
claim := v1.PersistentVolumeClaim{
|
||||
ObjectMeta: v1.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "dummy",
|
||||
Namespace: "default",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user