Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 97 for patchTypes (0.16 sec)

  1. cmd/kubeadm/app/util/patches/patches.go

    	}
    	patchType := patchTypes[sub[4]]
    
    	return targetName, patchType, nil, nil
    }
    
    // createPatchSet creates a patchSet object, by splitting the given "data" by "\n---".
    func createPatchSet(targetName string, patchType types.PatchType, data string) (*patchSet, error) {
    	var patches []string
    
    	// Split the patches and convert them to JSON.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go

    		if idx := strings.Index(contentType, ";"); idx > 0 {
    			contentType = contentType[:idx]
    		}
    		patchType := types.PatchType(contentType)
    
    		// Ensure the patchType is one we support
    		if !sets.NewString(patchTypes...).Has(contentType) {
    			scope.err(negotiation.NewUnsupportedMediaTypeError(patchTypes), w, req)
    			return
    		}
    
    		namespace, name, err := scope.Namer.Name(req)
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  3. pkg/config/schema/codegen/templates/crdclient.go.tmpl

    			Spec:       *(mod.Spec.(*{{ .ClientImport }}.{{.SpecType}})),
    		}
    		patchBytes, err := genPatchBytes(oldRes, modRes, typ)
    		if err != nil {
    				return nil, err
    		}
    		return c.{{.ClientGetter}}().{{ .ClientGroupPath }}().{{ .ClientTypePath }}({{if not .Resource.ClusterScoped}}orig.Namespace{{end}}).
    				Patch(context.TODO(), orig.Name, typ, patchBytes, metav1.PatchOptions{FieldManager: "pilot-discovery"})
    	{{- end }}
    {{- end }}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 08 13:57:51 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  4. pkg/controller/controller_ref_manager.go

    			OwnerReferences:  ownerReferences,
    			DeleteFinalizers: finalizers,
    		},
    	}
    	patchBytes, err := json.Marshal(&patch)
    	if err != nil {
    		return nil, err
    	}
    	return patchBytes, nil
    }
    
    func ownerReference(uid types.UID, patchType string) map[string]string {
    	return map[string]string{
    		"$patch": patchType,
    		"uid":    string(uid),
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 12 12:57:29 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  5. pilot/pkg/config/kube/crdclient/types.gen.go

    			ObjectMeta: modMeta,
    			Spec:       *(mod.Spec.(*istioioapisecurityv1beta1.AuthorizationPolicy)),
    		}
    		patchBytes, err := genPatchBytes(oldRes, modRes, typ)
    		if err != nil {
    			return nil, err
    		}
    		return c.Istio().SecurityV1beta1().AuthorizationPolicies(orig.Namespace).
    			Patch(context.TODO(), orig.Name, typ, patchBytes, metav1.PatchOptions{FieldManager: "pilot-discovery"})
    	case gvk.DestinationRule:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 17:37:32 UTC 2024
    - 62.2K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/util/patches/patches_test.go

    			}
    			if patchType != tc.expectedPatchType {
    				t.Errorf("expected patch type: %v, got: %v", tc.expectedPatchType, patchType)
    			}
    		})
    	}
    }
    
    func TestCreatePatchSet(t *testing.T) {
    	tests := []struct {
    		name             string
    		targetName       string
    		patchType        types.PatchType
    		expectedPatchSet *patchSet
    		data             string
    	}{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 09 14:24:11 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/types/patch.go

    // dedicated to.
    type PatchType string
    
    const (
    	JSONPatchType           PatchType = "application/json-patch+json"
    	MergePatchType          PatchType = "application/merge-patch+json"
    	StrategicMergePatchType PatchType = "application/strategic-merge-patch+json"
    	ApplyPatchType          PatchType = "application/apply-patch+yaml"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 04 21:51:48 UTC 2019
    - 1K bytes
    - Viewed (0)
  8. pilot/pkg/networking/core/envoyfilter/monitoring.go

    	Applied Result = "applied"
    )
    
    type PatchType string
    
    const (
    	Cluster        PatchType = "cluster"
    	Listener       PatchType = "listener"
    	ListenerFilter PatchType = "listenerfilter"
    	FilterChain    PatchType = "filterchain"
    	NetworkFilter  PatchType = "networkfilter"
    	// nolint
    	HttpFilter  PatchType = "httpfilter"
    	Route       PatchType = "route"
    	VirtualHost PatchType = "vhost"
    )
    
    var (
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview.go

    			}
    			patch = r.Response.Patch
    			if r.Response.PatchType != nil {
    				patchType = *r.Response.PatchType
    				if len(patchType) == 0 {
    					return nil, fmt.Errorf("webhook returned invalid response.patchType of %q", patchType)
    				}
    			}
    		} else {
    			// Ensure a validating webhook doesn't return patch or patchType
    			if len(r.Response.Patch) > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 07 16:56:12 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  10. pkg/util/pod/pod_test.go

    		t.Run(tc.description, func(t *testing.T) {
    			_, patchBytes, unchanged, err := PatchPodStatus(context.TODO(), client, ns, name, uid, getPodStatus(), tc.mutate(getPodStatus()))
    			if err != nil {
    				t.Errorf("unexpected error: %v", err)
    			}
    			if unchanged != tc.expectUnchanged {
    				t.Errorf("unexpected change: %t", unchanged)
    			}
    			if !reflect.DeepEqual(patchBytes, tc.expectedPatchBytes) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 15:22:29 UTC 2022
    - 4.5K bytes
    - Viewed (0)
Back to top