- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 32 for UniversalDecoder (0.42 sec)
-
staging/src/k8s.io/cli-runtime/pkg/printers/json_test.go
err = unmarshalFunc(buf.Bytes(), &poutput) if err != nil { t.Fatal(err) } // Use real decode function to undo the versioning process. poutput = TestStruct{} s := scheme.Codecs.UniversalDecoder(scheme.Scheme.PrioritizedVersionsAllGroups()...) if err := runtime.DecodeInto(s, buf.Bytes(), &poutput); err != nil { t.Fatal(err) } if !reflect.DeepEqual(testData, poutput) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 4K bytes - Viewed (0) -
pkg/credentialprovider/plugin/config.go
} return config, nil } // decode decodes data into the internal CredentialProviderConfig type. func decode(data []byte) (*kubeletconfig.CredentialProviderConfig, error) { obj, gvk, err := codecs.UniversalDecoder().Decode(data, nil, nil) if err != nil { return nil, err } if gvk.Kind != "CredentialProviderConfig" { return nil, fmt.Errorf("failed to decode %q (wrong Kind)", gvk.Kind) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 19 15:11:57 UTC 2023 - 4.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/options/tracing.go
} internalConfig := &apiserver.TracingConfiguration{} // this handles json/yaml/whatever, and decodes all registered version to the internal version if err := runtime.DecodeInto(codecs.UniversalDecoder(), data, internalConfig); err != nil { return nil, fmt.Errorf("unable to decode tracing configuration data: %v", err) } return &internalConfig.TracingConfiguration, nil
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 07 21:39:39 UTC 2023 - 4.9K bytes - Viewed (0) -
cluster/gce/gci/configure_helper_test.go
json, err := os.ReadFile(c.manifestDestination) if err != nil { c.t.Fatalf("Failed to read manifest: %s, %v", c.manifestDestination, err) } if err := runtime.DecodeInto(legacyscheme.Codecs.UniversalDecoder(), json, &c.pod); err != nil { c.t.Fatalf("Failed to decode manifest:\n%s\nerror: %v", json, err) } } func (c *ManifestTestCase) tearDown() { if err := os.RemoveAll(c.kubeHome); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 30 06:23:50 UTC 2021 - 4.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/config.go
if err != nil { return nil, fmt.Errorf("unable to read admission control configuration from %q [%v]", configFilePath, err) } codecs := serializer.NewCodecFactory(configScheme) decoder := codecs.UniversalDecoder() decodedObj, err := runtime.Decode(decoder, data) // we were able to decode the file successfully if err == nil { decodedConfig, ok := decodedObj.(*apiserver.AdmissionConfiguration) if !ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 29 15:48:39 UTC 2023 - 5.8K bytes - Viewed (0) -
cmd/kubeadm/app/util/apiclient/clientbacked_dryrun.go
objBytes, err := json.Marshal(unstructuredObj) if err != nil { return nil, err } newObj, err := runtime.Decode(clientsetscheme.Codecs.UniversalDecoder(action.GetResource().GroupVersion()), objBytes) if err != nil { return nil, err } return newObj, nil } func printIfNotExists(err error) { if apierrors.IsNotFound(err) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Apr 16 10:29:45 UTC 2023 - 4.8K bytes - Viewed (0) -
pkg/scheduler/testing/framework/framework_helpers.go
"k8s.io/kubernetes/pkg/scheduler/apis/config/scheme" "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/runtime" ) var configDecoder = scheme.Codecs.UniversalDecoder() // NewFramework creates a Framework from the register functions and options. func NewFramework(ctx context.Context, fns []RegisterPluginFunc, profileName string, opts ...runtime.Option) (framework.Framework, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 15 03:30:06 UTC 2023 - 6.3K bytes - Viewed (0) -
cmd/kubeadm/app/util/config/joinconfiguration.go
return nil, errors.Errorf("no %s found in the supplied config", constants.JoinConfigurationKind) } internalcfg := &kubeadmapi.JoinConfiguration{} if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), joinBytes, internalcfg); err != nil { return nil, err } // Applies dynamic defaults to settings not provided with flags if err := SetJoinDynamicDefaults(internalcfg, skipCRIDetect); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 05 12:41:16 UTC 2024 - 6.2K bytes - Viewed (0) -
cmd/kubeadm/app/util/config/resetconfiguration.go
return nil, errors.Errorf("no %s found in the supplied config", constants.JoinConfigurationKind) } internalcfg := &kubeadmapi.ResetConfiguration{} if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), resetBytes, internalcfg); err != nil { return nil, err } // Applies dynamic defaults to settings not provided with flags if err := SetResetDynamicDefaults(internalcfg, skipCRIDetect); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 05 12:41:16 UTC 2024 - 6.6K bytes - Viewed (0) -
pkg/auth/authorizer/abac/abac.go
file, err := os.Open(path) if err != nil { return nil, err } defer file.Close() scanner := bufio.NewScanner(file) pl := make(PolicyList, 0) decoder := abac.Codecs.UniversalDecoder() i := 0 unversionedLines := 0 for scanner.Scan() { i++ p := &abac.Policy{} b := scanner.Bytes() // skip comment lines and blank lines trimmed := strings.TrimSpace(string(b))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 11 03:11:30 UTC 2021 - 7.4K bytes - Viewed (0)