diff options
author | 2016-07-14 14:50:14 -0700 | |
---|---|---|
committer | 2016-07-14 23:50:14 +0200 | |
commit | 3f4ec783d218d10b244487d463de5bb31284e3cf (patch) | |
tree | e9214e93511b36039a54462aba214b5f82387f93 /middleware/kubernetes/k8sclient/k8sclient.go | |
parent | 319d30697af07616be596fd4918dce3ce4bcfc84 (diff) | |
download | coredns-3f4ec783d218d10b244487d463de5bb31284e3cf.tar.gz coredns-3f4ec783d218d10b244487d463de5bb31284e3cf.tar.zst coredns-3f4ec783d218d10b244487d463de5bb31284e3cf.zip |
Adding wildcard support (#190)
* Commenting out unused functions. TODO: remove when it is not needed
* Update README with namespace and template example
* Adding note about changing the record name format via a template
* Adding test scripts to automate k8s startup
* Automating k8s namespace creation
* Adding automation to start 4 k8s services
* Updating documentation for k8s tests
* Avoid downloading kubectl if already exists
* Adding debug statement when namespace is not exposed.
* Adding basic kubernetes integration tests
* Makefile now contains a "testk8s" target. This target requires k8s to
be running.
* Adding test/kubernetes_test.go file with a couple of basic A record
tests.
* Updating k8s integration tests to only run k8s integration tests
* Adding support for namespace wildcards
* Refactoring to move filtering logic to kubernetes.go file
* go fmt fixes
* Adding wildcard support for namespaces and service names
* Kubernetes integration tests updated for A records.
* Expanded record name assembly for answer section not yet implemented.
* Refactoring to focus k8sclient code just on accessing k8s API.
Filtering now handled in kubernetes.go
* Adding wildcard test cases
* Adding skydns startup script. (To allow side by side testing of wildcards.)
* Commenting out record name assmebly based on NameTemplate. Need to improve template before this makes sense.
* Adding basic SRV integration tests
* Need to add verification for additional answer section
* Fixing comments and formatting
* Moving wildcard constants to vars
* Travis test execution appears to be failing on access to these
constants
* Fixing access to util package
* Trying to work around Travis test bug
* Reverting to access kubernetes/util as "util"
Travis breakage is due to "Infoblox-CTO" in src path
Diffstat (limited to 'middleware/kubernetes/k8sclient/k8sclient.go')
-rw-r--r-- | middleware/kubernetes/k8sclient/k8sclient.go | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/middleware/kubernetes/k8sclient/k8sclient.go b/middleware/kubernetes/k8sclient/k8sclient.go index 95300f3b9..cb1d0fe4a 100644 --- a/middleware/kubernetes/k8sclient/k8sclient.go +++ b/middleware/kubernetes/k8sclient/k8sclient.go @@ -117,30 +117,6 @@ func (c *K8sConnector) GetServicesByNamespace() (map[string][]ServiceItem, error return items, nil } -// GetServiceItemsInNamespace returns the ServiceItems that match -// servicename in the namespace -func (c *K8sConnector) GetServiceItemsInNamespace(namespace string, servicename string) ([]*ServiceItem, error) { - - itemMap, err := c.GetServicesByNamespace() - - if err != nil { - fmt.Printf("[ERROR] Getting service list produced error: %v", err) - return nil, err - } - - // TODO: Handle case where namespace == nil - - var serviceItems []*ServiceItem - - for _, x := range itemMap[namespace] { - if x.Metadata.Name == servicename { - serviceItems = append(serviceItems, &x) - } - } - - return serviceItems, nil -} - func NewK8sConnector(baseURL string) *K8sConnector { k := new(K8sConnector) |