Skip to content

Commit

Permalink
Resolve Empty String Bug Across Different Storage Providers Excluding…
Browse files Browse the repository at this point in the history
… `S3` (#1557)

Signed-off-by: Anisur Rahman <[email protected]>
  • Loading branch information
anisurrahman75 authored Feb 13, 2024
1 parent 8cb8f6f commit b0ecb48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/resolver/inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func (r *TaskOptions) setRepositoryVariables() error {

vars[apis.RepositoryName] = r.Repository.Name
vars[apis.RepositoryNamespace] = r.Repository.Namespace
vars[apis.RepositoryInsecureTLS] = strconv.FormatBool(false)

var err error
if vars[apis.RepositoryProvider], err = r.Repository.Spec.Backend.Provider(); err != nil {
Expand All @@ -165,7 +166,9 @@ func (r *TaskOptions) setRepositoryVariables() error {
vars[apis.RepositorySecretNamespace] = r.Repository.Namespace
}
if r.Repository.Spec.Backend.S3 != nil {
vars[apis.RepositoryInsecureTLS] = strconv.FormatBool(r.Repository.Spec.Backend.S3.InsecureTLS)
if r.Repository.Spec.Backend.S3.InsecureTLS {
vars[apis.RepositoryInsecureTLS] = strconv.FormatBool(true)
}
if r.Repository.Spec.Backend.S3.Endpoint != "" {
vars[apis.RepositoryEndpoint] = r.Repository.Spec.Backend.S3.Endpoint
}
Expand Down

0 comments on commit b0ecb48

Please sign in to comment.