Azure / application-gateway-kubernetes-ingress

This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.
https://azure.github.io/application-gateway-kubernetes-ingress
MIT License
677 stars 420 forks source link

Unable to use AGIC with multi namespaces #1550

Open ishankush01 opened 1 year ago

ishankush01 commented 1 year ago

I am unable to install AGIC with either a watchNamespace: "" or a blank namespace. code for blow

`# This file contains the essential configs for the ingress controller helm chart

# Verbosity level of the App Gateway Ingress Controller
verbosityLevel: 3

################################################################################
# Specify which application gateway the ingress controller will manage
#
appgw:
    subscriptionId: 00000000-0000-0000-0000-000000000000
    resourceGroup: my-resource-group
    name: my-test-appgw
    usePrivateIP: false

    # Setting appgw.shared to "true" will create an AzureIngressProhibitedTarget CRD.
    # This prohibits AGIC from applying config for any host/path.
    # Use "kubectl get AzureIngressProhibitedTargets" to view and change this.
    shared: false

################################################################################
# Specify which kubernetes namespace the ingress controller will watch
# Default value is "default"
# Leaving this variable out or setting it to blank or empty string would
# result in Ingress Controller observing all acessible namespaces.
#
# kubernetes:
#     watchNamespace: 

################################################################################
# Specify the authentication with Azure Resource Manager
#
# Two authentication methods are available:
# - Option 1: AAD-Pod-Identity (https://github.com/Azure/aad-pod-identity)
armAuth:
    type: aadPodIdentity
    identityResourceID: *********************************
    identityClientID:  00000000-0000-0000-0000-000000000000

## Alternatively you can use Service Principal credentials
#armAuth:
 #   type: servicePrincipal
 #   secretJSON: 
################################################################################
# Specify if the cluster is RBAC enabled or not
rbac:
    enabled: true # true/false`

It shows an error

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1375dcf]

I'm attempting to use it with a different namespace, but when I specify 'main' for the 'watchNamespace' property, it functions as intended. However, in this case, I am unable to use it with a different namespace.

Would you accept contributions if we are willing to implement this feature?

akshaysngupta commented 1 year ago

You can provide multiple namespaces comma separated.