Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for handleNamespace (0.1 sec)

  1. istioctl/pkg/cli/context_test.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package cli
    
    import "testing"
    
    func Test_handleNamespace(t *testing.T) {
    	ns := handleNamespace("test", "default")
    	if ns != "test" {
    		t.Fatalf("Get the incorrect namespace: %q back", ns)
    	}
    
    	tests := []struct {
    		description      string
    		namespace        string
    		defaultNamespace string
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Jun 09 18:17:49 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  2. istioctl/pkg/cli/context.go

    }
    
    func (i *instance) NamespaceOrDefault(namespace string) string {
    	return handleNamespace(namespace, i.DefaultNamespace())
    }
    
    // handleNamespace returns the defaultNamespace if the namespace is empty
    func handleNamespace(ns, defaultNamespace string) string {
    	if ns == corev1.NamespaceAll {
    		ns = defaultNamespace
    	}
    	return ns
    }
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Oct 23 19:31:32 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  3. istioctl/pkg/validate/validate.go

    	// we can't complain about.
    
    	return nil, nil
    }
    
    func (v *validator) validateServicePortPrefix(istioNamespace string, un *unstructured.Unstructured) error {
    	var errs error
    	if un.GetNamespace() == handleNamespace(istioNamespace) {
    		return nil
    	}
    	spec := un.Object["spec"].(map[string]any)
    	if _, ok := spec["ports"]; ok {
    		ports := spec["ports"].([]any)
    		for _, port := range ports {
    			p := port.(map[string]any)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Aug 15 22:27:47 UTC 2024
    - 14.3K bytes
    - Viewed (0)
Back to top