Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for Webhooks (0.24 sec)

  1. istioctl/pkg/tag/generate.go

    	if err != nil {
    		return "", fmt.Errorf("could not decode generated webhook: %w", err)
    	}
    	decodedWh := whObject.(*admitv1.MutatingWebhookConfiguration)
    	for i := range decodedWh.Webhooks {
    		decodedWh.Webhooks[i].ClientConfig.CABundle = []byte(config.CABundle)
    		if decodedWh.Webhooks[i].ClientConfig.Service != nil {
    			decodedWh.Webhooks[i].ClientConfig.Service.Path = &config.Path
    		}
    	}
    	if opts.WebhookName != "" {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Jan 16 17:43:49 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  2. istioctl/pkg/tag/tag_test.go

    	"istio.io/istio/pkg/kube"
    )
    
    func TestTagList(t *testing.T) {
    	tcs := []struct {
    		name          string
    		webhooks      admitv1.MutatingWebhookConfigurationList
    		namespaces    corev1.NamespaceList
    		outputMatches []string
    		error         string
    	}{
    		{
    			name: "TestBasicTag",
    			webhooks: admitv1.MutatingWebhookConfigurationList{
    				Items: []admitv1.MutatingWebhookConfiguration{
    					{
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Nov 17 22:41:06 GMT 2023
    - 8.7K bytes
    - Viewed (0)
  3. istioctl/pkg/checkinject/checkinject.go

    		row.Cells = append(row.Cells, table.NewCell(wa.Reason))
    		return row
    	})
    	w.AddHeader("WEBHOOK", "REVISION", "INJECTED", "REASON")
    	injectedTotal := 0
    	for _, ws := range was {
    		if ws.Injected {
    			injectedTotal++
    		}
    		w.AddRow(ws)
    	}
    	w.Flush()
    	if injectedTotal > 1 {
    		fmt.Fprintf(writer, "ERROR: multiple webhooks will inject, which can lead to errors")
    	}
    	return nil
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  4. istioctl/pkg/multixds/gather.go

    	webhooks, err := client.Kube().AdmissionregistrationV1().MutatingWebhookConfigurations().List(context.Background(), metav1.ListOptions{
    		LabelSelector: fmt.Sprintf("%s=%s,!istio.io/tag", label.IoIstioRev.Name, client.Revision()),
    	})
    	if err != nil {
    		return nil, err
    	}
    	for _, whc := range webhooks.Items {
    		for _, wh := range whc.Webhooks {
    			if wh.ClientConfig.URL != nil {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  5. operator/cmd/mesh/manifest-generate_test.go

    			name:     "revision upgrade",
    			webhooks: mergeWebhooks(legacyWebhook, revWebhook),
    			checks: append([]assertion{
    				{empty, objEnabled, ""}, // Legacy one requires namespace label
    			}, baseAssertions...),
    		},
    		{
    			// Use new default webhook, while we still have a legacy revision one around.
    			name:     "inplace upgrade",
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Apr 18 18:16:49 GMT 2024
    - 43.5K bytes
    - Viewed (0)
  6. istioctl/pkg/injector/injector-list.go

    	// find matching hook
    	for _, hook := range hooks {
    		for _, webhook := range hook.Webhooks {
    			nsSelector, err := metav1.LabelSelectorAsSelector(webhook.NamespaceSelector)
    			if err != nil {
    				continue
    			}
    			if nsSelector.Matches(api_pkg_labels.Set(namespace.ObjectMeta.Labels)) {
    				return &hook
    			}
    		}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Jan 04 03:08:06 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  7. istioctl/pkg/tag/util.go

    		return fmt.Errorf("expected a single webhook for default revision")
    	}
    	webhook := whs[0]
    	for i := range webhook.Webhooks {
    		wh := webhook.Webhooks[i]
    		// this is an abomination, but if this isn't a per-revision webhook, we want to make it ineffectual
    		// without deleting it. Add a nonsense match.
    		wh.NamespaceSelector = util.NeverMatch
    		wh.ObjectSelector = util.NeverMatch
    		webhook.Webhooks[i] = wh
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Jan 16 17:43:42 GMT 2024
    - 5.4K bytes
    - Viewed (1)
  8. istioctl/pkg/tag/generate_test.go

    		if len(wh.Webhooks) != tc.numWebhooks {
    			t.Errorf("expected %d webhook(s) in MutatingWebhookConfiguration, found %d",
    				tc.numWebhooks, len(wh.Webhooks))
    		}
    		tag, exists := wh.ObjectMeta.Labels[IstioTagLabel]
    		if !exists {
    			t.Errorf("expected tag webhook to have %s label, did not find", IstioTagLabel)
    		}
    		if tag != tc.tagName {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Jan 16 17:43:49 GMT 2024
    - 12.1K bytes
    - Viewed (0)
  9. istioctl/pkg/tag/revision.go

    	// Get a list of control planes which are installed in remote clusters
    	// In this case, it is possible that they only have webhooks installed.
    	webhooks, err := Webhooks(context.Background(), client)
    	if err != nil {
    		return nil, fmt.Errorf("error while listing mutating webhooks: %v", err)
    	}
    	for _, hook := range webhooks {
    		rev := renderWithDefault(hook.GetLabels()[label.IoIstioRev.Name], DefaultRevisionName)
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Jan 28 13:16:05 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  10. istioctl/pkg/tag/tag.go

    		return fmt.Errorf("failed to apply tag webhook MutatingWebhookConfiguration to cluster: %v", err)
    	}
    	fmt.Fprintf(w, tagCreatedStr, tagName, revision, tagName)
    	return nil
    }
    
    func analyzeWebhook(name, istioNamespace, wh, revision string, config *rest.Config) error {
    	sa := local.NewSourceAnalyzer(analysis.Combine("webhook", &webhook.Analyzer{}), "", resource.Namespace(istioNamespace), nil)
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 02 08:32:06 GMT 2024
    - 16.3K bytes
    - Viewed (0)
Back to top