Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for handleNamespace (0.23 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
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jun 09 18:17:49 GMT 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
    }
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Apr 02 08:32:06 GMT 2024
    - 6.4K 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)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Jan 22 17:58:52 GMT 2024
    - 15K bytes
    - Viewed (0)
Back to top