[DRAFT] Feature/add csi support#1073
Conversation
Signed-off-by: Zanis <22601571+ZanisO@users.noreply.github.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
| return fmt.Sprintf("%x", sha) | ||
|
|
||
| hash := sha512.Sum512_256([]byte(data)) | ||
| return hex.EncodeToString(hash[:]) |
There was a problem hiding this comment.
@faizanahmad055 This is a breaking change for people who are going to upgrade. It will cause all workloads that are managed by reloader to be restarted as it will notice a change in the last stored hash
There was a problem hiding this comment.
Yes indeed, I should have made this clear in the notes. The pipeline was previously failing because of critical vulnerability on SHA1 usage so I had to change it. We can discuss how to do it in a better way. May be do an announcement? But we will probably have to eventually do this change.
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
TheiLLeniumStudios
left a comment
There was a problem hiding this comment.
Other than the above, 2 annotation override config flags are missing:
cmd.PersistentFlags().StringVar(&options.SecretProviderClassUpdateOnChangeAnnotation,
"secretproviderclass-annotation",
"secretproviderclass.reloader.stakater.com/reload",
"annotation to detect changes in secretproviderclasses, specified by name")
cmd.PersistentFlags().StringVar(&options.SecretProviderClassReloaderAutoAnnotation,
"secretproviderclass-auto-annotation",
"secretproviderclass.reloader.stakater.com/auto",
"annotation to detect changes in secretproviderclasses")
internal/pkg/util/util.go
Outdated
| cmd.PersistentFlags().BoolVar(&options.SyncAfterRestart, "sync-after-restart", false, "Sync add events after reloader restarts") | ||
| cmd.PersistentFlags().BoolVar(&options.EnablePProf, "enable-pprof", false, "Enable pprof for profiling") | ||
| cmd.PersistentFlags().StringVar(&options.PProfAddr, "pprof-addr", ":6060", "Address to start pprof server on. Default is :6060") | ||
| cmd.PersistentFlags().BoolVar(&options.EnableCSIIntegration, "enable-csi-integration", false, "Enables CSI integration. Default is :true") |
There was a problem hiding this comment.
There's a typo here. Default value is false
internal/pkg/handler/upgrade.go
Outdated
| } | ||
|
|
||
| func populateAnnotationsFromSecretProviderClass(clients kube.Clients, config *common.Config) { | ||
| obj, err := clients.CSIClient.SecretsstoreV1().SecretProviderClasses(config.Namespace).Get(context.TODO(), config.ResourceName, metav1.GetOptions{}) |
There was a problem hiding this comment.
Use a background context
internal/pkg/handler/upgrade.go
Outdated
| } | ||
|
|
||
| func secretProviderClassAnnotationReloaded(oldAnnotations map[string]string, newConfig common.Config) bool { | ||
| annotaion := oldAnnotations[getReloaderAnnotationKey()] |
There was a problem hiding this comment.
A typo here.. Should be annotation
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
Uh oh!
There was an error while loading. Please reload this page.