Change:
/kind bug What happened: walteraa [6:55 AM] Hi, The controller manager of the federation using Google cloud DNS is crashing, the log showed is that: the hyperkube command is that: I have created this in the Google DNS Someone knows why the DNS zone query is getting the 404 error?? :disappointed: What you expected to happen: It should have created the missing domain. How to reproduce it (as minimally and precisely as possible): As per above. Anything else we need to know?: Environment: Kubernetes version (use ): 1.7.4 Cloud provider or hardware configuration**: OpenStack (irrelevant) OS (e.g. from /etc/os-release): irrelevant Kernel (e.g. ): irrelevant Install tools: irrelevant Others: irrelevant
The bug is related to this: The above code assumes that the provider code returns no error but an empty list if the domain does not exist, but instead the provider returns a 404. Need to fix the provider and/or the above code.
/sig federation
I am unlikely to have time to work on this soon, so if anyone else wants to, go right ahead.
/assign
An additional information: I have created a which is based on the credential JSON file created through instruction. After that, I have configured the Federation controller manager to mount this secret as a volume in the container and set the environment variable to the JSON file inside this volume. Before doing that, I was getting an authentication error so the google DNS provider couldn't be instantiated, and after doing the instructions that I mentioned before, this authentication error was solved but now I'm getting 404 error when Google DNS provider tries access the specified managed zone. The file that I have generated follow this structure:

Discussion:
} type Zones interface { <del> // List returns the managed Zones, or an error if the list operation failed. </del> <ins> // List returns the (possibly empty) list of managed Zones, or an error if the list operation failed. </ins> List() ([]Zone, error) // Add creates and returns a new managed zone, or an error if the operation failed Add(Zone) (Zone, error)

"//federation/pkg/dnsprovider/providers/aws/route53/stubs:go_default_library", "//federation/pkg/dnsprovider/rrstype:go_default_library", "//vendor/github.com/aws/aws-sdk-go/aws:go_default_library", <ins> "//vendor/github.com/aws/aws-sdk-go/aws/awserr:go_default_library", </ins> "//vendor/github.com/aws/aws-sdk-go/aws/request:go_default_library", "//vendor/github.com/aws/aws-sdk-go/aws/session:go_default_library", "//vendor/github.com/aws/aws-sdk-go/service/route53:go_default_library",

package route53 import ( <ins> "github.com/aws/aws-sdk-go/aws/awserr" </ins> "github.com/aws/aws-sdk-go/service/route53" "k8s.io/apimachinery/pkg/util/uuid"

return true }) if err != nil { <ins> if apiErr, ok := err.(awserr.Error); ok && apiErr.Code() == "DelegationSetNotReusable" || apiErr.Code() == "NoSuchDelegationSet" || apiErr.Code() == "InvalidInput" { return []dnsprovider.Zone{}, nil } </ins> return []dnsprovider.Zone{}, err } return zoneList, nil

"//vendor/golang.org/x/oauth2/google:go_default_library", "//vendor/google.golang.org/api/compute/v1:go_default_library", "//vendor/google.golang.org/api/dns/v1:go_default_library", <ins> "//vendor/google.golang.org/api/googleapi:go_default_library", </ins> "//vendor/gopkg.in/gcfg.v1:go_default_library", ], )

package clouddns import ( <ins> "google.golang.org/api/googleapi" </ins> "k8s.io/kubernetes/federation/pkg/dnsprovider" "k8s.io/kubernetes/federation/pkg/dnsprovider/providers/google/clouddns/internal/interfaces" )

} func (zones Zones) List() ([]dnsprovider.Zone, error) { <ins> var zoneList []dnsprovider.Zone </ins> response, err := zones.impl.List(zones.project()).Do() if err != nil { <ins> if apiErr, ok := err.(*googleapi.Error); ok && apiErr.Code == 404 { return zoneList, nil } </ins> return nil, err } managedZones := response.ManagedZones() <del> zoneList := make([]dnsprovider.Zone, len(managedZones)) </del> <ins> zoneList = make([]dnsprovider.Zone, len(managedZones)) </ins> for i, zone := range managedZones { zoneList[i] = &Zone{zone, &zones} }