Skip to content

Commit

Permalink
Remove extra comments/TODOs nobody has any intention of doing
Browse files Browse the repository at this point in the history
  • Loading branch information
wongma7 committed Nov 8, 2019
1 parent 2ac99d1 commit f2b6018
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions pkg/mapper/configmap/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ type MapStore struct {
mutex sync.RWMutex
users map[string]config.UserMapping
roles map[string]config.RoleMapping
// TODO: Use kubernetes set.
// Used as set.
awsAccounts map[string]interface{}
configMap v1.ConfigMapInterface
Expand All @@ -42,7 +41,6 @@ func New(masterURL, kubeConfig string) (*MapStore, error) {
}

ms := MapStore{}
// TODO: Should we use a namespace? Make it configurable?
ms.configMap = clientset.CoreV1().ConfigMaps("kube-system")
return &ms, nil
}
Expand Down Expand Up @@ -72,12 +70,6 @@ func (ms *MapStore) startLoadConfigMap() {
awsAccounts := make([]string, 0)
ms.saveMap(userMappings, roleMappings, awsAccounts)
case watch.Added, watch.Modified:
// Type assertion is not working
//
// cm, ok := r.Object.(*core_v1.ConfigMap)
//if !ok || cm.Name != "aws-auth" {
// break
//}
switch cm := r.Object.(type) {
case *core_v1.ConfigMap:
// TODO: Only watch on configmap/awsauth
Expand Down Expand Up @@ -112,7 +104,6 @@ func (err ErrParsingMap) Error() string {

// Acquire lock before calling
func (ms *MapStore) parseMap(m map[string]string) ([]config.UserMapping, []config.RoleMapping, []string, error) {
// TODO: Look at errors.Wrap().
errs := make([]error, 0)
userMappings := make([]config.UserMapping, 0)
if userData, ok := m["mapUsers"]; ok {
Expand Down Expand Up @@ -148,8 +139,6 @@ func (ms *MapStore) parseMap(m map[string]string) ([]config.UserMapping, []confi
}
}

// TODO: Check for empty user and role mappings.

var err error
if len(errs) > 0 {
logrus.Warnf("Errors parsing configmap: %+v", errs)
Expand Down

0 comments on commit f2b6018

Please sign in to comment.