When a secret is updated read ingress annotations (again)

This commit is contained in:
Manuel de Brito Fontes 2018-01-22 19:07:31 -03:00 committed by Manuel Alejandro de Brito Fontes
parent 2853ba564d
commit 12c8ea721d
2 changed files with 75 additions and 5 deletions

View file

@ -47,6 +47,7 @@ type Config struct {
File string `json:"file"`
Secured bool `json:"secured"`
FileSHA string `json:"fileSha"`
Secret string `json:"secret"`
}
// Equal tests for equality between two Config types
@ -72,7 +73,9 @@ func (bd1 *Config) Equal(bd2 *Config) bool {
if bd1.FileSHA != bd2.FileSHA {
return false
}
if bd1.Secret != bd2.Secret {
return false
}
return true
}
@ -140,6 +143,7 @@ func (a auth) Parse(ing *extensions.Ingress) (interface{}, error) {
File: passFile,
Secured: true,
FileSHA: file.SHA1(passFile),
Secret: name,
}, nil
}