Skip to content

Commit

Permalink
Merge pull request #14632 from joejulian/fix_nil_pointer
Browse files Browse the repository at this point in the history
operator(console): initialize null map before adding entries
  • Loading branch information
RafalKorepta authored Nov 3, 2023
2 parents ddb4225 + 9a64681 commit 7ba3e1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/go/k8s/pkg/resources/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func (r *IngressResource) WithAnnotations(
func (r *IngressResource) WithTLS(
clusterIssuer, secretName string,
) *IngressResource {
if r.annotations == nil {
r.annotations = make(map[string]string, 2)
}
r.annotations["cert-manager.io/cluster-issuer"] = clusterIssuer
r.annotations["nginx.ingress.kubernetes.io/force-ssl-redirect"] = trueString

Expand Down

0 comments on commit 7ba3e1d

Please sign in to comment.