Added capability to use OnChangeAnnotation and TypeAutoAnnotation

This commit is contained in:
Zanis
2025-02-05 21:51:11 +00:00
parent 6d1d017aa4
commit 3c39406ca9
5 changed files with 34 additions and 7 deletions
+4 -1
View File
@@ -45,10 +45,13 @@ func GetSecretConfig(secret *v1.Secret) Config {
}
func GetSecretProviderClassPodStatusConfig(podStatus *csiv1.SecretProviderClassPodStatus) Config {
// As csi injects SecretProviderClass, we will create config for it instead of SecretProviderClassPodStatus
// ResourceAnnotations will be retrieved during PerformAction call
return Config{
Namespace: podStatus.Namespace,
ResourceName: podStatus.Status.SecretProviderClassName,
ResourceAnnotations: podStatus.Annotations,
Annotation: options.SecretProviderClassUpdateOnChangeAnnotation,
TypedAutoAnnotation: options.SecretProviderClassReloaderAutoAnnotation,
SHAValue: GetSHAfromSecretProviderClassPodStatus(podStatus.Status),
Type: constants.SecretProviderClassEnvVarPostfix,
}