mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
Convert Secret registry to use update/create strategy, allow filtering by Type
This commit is contained in:
@@ -20,6 +20,16 @@ import (
|
||||
"bytes"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mime"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/metrics"
|
||||
@@ -31,15 +41,6 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
|
||||
watchjson "github.com/GoogleCloudPlatform/kubernetes/pkg/watch/json"
|
||||
"github.com/golang/glog"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mime"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// specialParams lists parameters that are handled specially and which users of Request
|
||||
@@ -253,6 +254,7 @@ const (
|
||||
NodeUnschedulable = "spec.unschedulable"
|
||||
ObjectNameField = "metadata.name"
|
||||
PodHost = "spec.host"
|
||||
SecretType = "type"
|
||||
)
|
||||
|
||||
type clientFieldNameToAPIVersionFieldName map[string]string
|
||||
@@ -305,6 +307,9 @@ var fieldMappings = versionToResourceToFieldMapping{
|
||||
"pods": clientFieldNameToAPIVersionFieldName{
|
||||
PodHost: "DesiredState.Host",
|
||||
},
|
||||
"secrets": clientFieldNameToAPIVersionFieldName{
|
||||
SecretType: "type",
|
||||
},
|
||||
},
|
||||
"v1beta2": resourceTypeToFieldMapping{
|
||||
"nodes": clientFieldNameToAPIVersionFieldName{
|
||||
@@ -318,6 +323,9 @@ var fieldMappings = versionToResourceToFieldMapping{
|
||||
"pods": clientFieldNameToAPIVersionFieldName{
|
||||
PodHost: "DesiredState.Host",
|
||||
},
|
||||
"secrets": clientFieldNameToAPIVersionFieldName{
|
||||
SecretType: "type",
|
||||
},
|
||||
},
|
||||
"v1beta3": resourceTypeToFieldMapping{
|
||||
"nodes": clientFieldNameToAPIVersionFieldName{
|
||||
@@ -331,6 +339,9 @@ var fieldMappings = versionToResourceToFieldMapping{
|
||||
"pods": clientFieldNameToAPIVersionFieldName{
|
||||
PodHost: "spec.host",
|
||||
},
|
||||
"secrets": clientFieldNameToAPIVersionFieldName{
|
||||
SecretType: "type",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user