Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ParseGroupResource (0.51 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/schema/group_version.go

    	i := strings.Index(gk, ".")
    	if i == -1 {
    		return GroupKind{Kind: gk}
    	}
    
    	return GroupKind{Group: gk[i+1:], Kind: gk[:i]}
    }
    
    // ParseGroupResource turns "resource.group" string into a GroupResource struct.  Empty strings are allowed
    // for each field.
    func ParseGroupResource(gr string) GroupResource {
    	if i := strings.Index(gr, "."); i >= 0 {
    		return GroupResource{Group: gr[i+1:], Resource: gr[:i]}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 30 09:08:59 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation_encryption.go

    		return nil
    	}
    
    	var allErrs field.ErrorList
    
    	r := make([]schema.GroupResource, 0, len(resources))
    	for _, resource := range resources {
    		r = append(r, schema.ParseGroupResource(resource))
    	}
    
    	var hasOverlap, hasDuplicate bool
    
    	for i, r1 := range r {
    		for j, r2 := range r {
    			if i == j {
    				continue
    			}
    
    			if r1 == r2 && !hasDuplicate {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 20:54:24 UTC 2023
    - 13.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config_test.go

    	aesGcmFirstTransformer := aesGcmFirstEncryptionConfiguration.Transformers[schema.ParseGroupResource("secrets")]
    	aesCbcFirstTransformer := aesCbcFirstEncryptionConfiguration.Transformers[schema.ParseGroupResource("secrets")]
    	secretboxFirstTransformer := secretboxFirstEncryptionConfiguration.Transformers[schema.ParseGroupResource("secrets")]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 16:56:39 UTC 2024
    - 72.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go

    		{input: "v1.a", out: GroupResource{Group: "a", Resource: "v1"}},
    		{input: "b.v1.a", out: GroupResource{Group: "v1.a", Resource: "b"}},
    	}
    	for i, test := range tests {
    		out := ParseGroupResource(test.input)
    		if out != test.out {
    			t.Errorf("%d: unexpected output: %#v", i, out)
    		}
    	}
    }
    
    func TestParseResourceArg(t *testing.T) {
    	tests := []struct {
    		input string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 15 01:46:00 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/server/options/etcd.go

    		if err != nil {
    			return nil, fmt.Errorf("invalid size of watch cache size: %s", c)
    		}
    		if size < 0 {
    			return nil, fmt.Errorf("watch cache size cannot be negative: %s", c)
    		}
    		watchCacheSizes[schema.ParseGroupResource(tokens[0])] = size
    	}
    	return watchCacheSizes, nil
    }
    
    // WriteWatchCacheSizes turns a map of cache size values into a list of string specifications.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 15:02:16 UTC 2024
    - 20K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go

    		}
    		kmsUsed.accumulate(used)
    
    		// For each resource, create a list of providers to use
    		for _, resource := range resourceConfig.Resources {
    			resource := resource
    			gr := schema.ParseGroupResource(resource)
    
    			// check if resource is masked by *.group rule
    			anyResourceInGroup := schema.GroupResource{Group: gr.Group, Resource: "*"}
    			if _, masked := resourceToPrefixTransformer[anyResourceInGroup]; masked {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 16:56:39 UTC 2024
    - 41.2K bytes
    - Viewed (0)
Back to top