Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ChainExists (0.28 sec)

  1. pkg/util/iptables/testing/fake_test.go

    		t.Errorf("wrong return value from EnsureChain with existing chain")
    	}
    
    	// ChainExists
    	exists, err := fake.ChainExists(iptables.TableNAT, iptables.Chain("KUBE-TEST"))
    	if err != nil {
    		t.Errorf("unexpected error checking chain: %v", err)
    	} else if !exists {
    		t.Errorf("wrong return value from ChainExists with existing chain")
    	}
    	exists, err = fake.ChainExists(iptables.TableNAT, iptables.Chain("KUBE-TEST-NOT"))
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  2. pkg/util/iptables/iptables.go

    		klog.V(2).InfoS("Reloading after iptables flush")
    		reloadFunc()
    	}
    }
    
    // ChainExists is part of Interface
    func (runner *runner) ChainExists(table Table, chain Chain) (bool, error) {
    	fullArgs := makeFullArgs(table, chain)
    
    	runner.mu.Lock()
    	defer runner.mu.Unlock()
    
    	trace := utiltrace.New("iptables ChainExists")
    	defer trace.LogIfLong(2 * time.Second)
    
    	_, err := runner.run(opListChain, fullArgs)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 28.6K bytes
    - Viewed (0)
  3. pkg/util/iptables/testing/fake.go

    	}
    	for i := range t.Chains {
    		if t.Chains[i].Name == chain {
    			t.Chains = append(t.Chains[:i], t.Chains[i+1:]...)
    			return nil
    		}
    	}
    	return nil
    }
    
    // ChainExists is part of iptables.Interface
    func (f *FakeIPTables) ChainExists(table iptables.Table, chain iptables.Chain) (bool, error) {
    	if _, err := f.Dump.GetTable(table); err != nil {
    		return false, err
    	}
    	if c, _ := f.Dump.GetChain(table, chain); c != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  4. pkg/proxy/iptables/proxier_test.go

    	// supposed to be impossible; if we knew of any non-absurd scenario that would
    	// cause such a failure, then that would be a bug and we would fix it.
    	if _, err := fp.iptables.ChainExists(utiliptables.TableNAT, utiliptables.Chain("KUBE-SEP-AYCN5HPXMIRJNJXU")); err != nil {
    		t.Fatalf("svc4's endpoint chain unexpected already does not exist!")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 14:39:54 UTC 2024
    - 249.9K bytes
    - Viewed (0)
Back to top