Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Fix nil secrets data map
Browse files Browse the repository at this point in the history
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
  • Loading branch information
EngHabu committed Apr 26, 2021
1 parent 133c7a7 commit 45a047f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/entrypoints/k8s_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ func persistSecrets(ctx context.Context, _ *pflag.FlagSet) error {
return err
}

if existingSecret.Data == nil {
existingSecret.Data = map[string][]byte{}
}

needsUpdate := false
for key, val := range secretsData {
if _, found := existingSecret.Data[key]; !found {
Expand Down

0 comments on commit 45a047f

Please sign in to comment.