Skip to content

Commit

Permalink
fix types after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ennyjfrick committed Oct 23, 2024
1 parent 182e2c3 commit acca221
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/provider/namespace_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func (r *namespaceResource) Create(ctx context.Context, req resource.CreateReque
mtls := &namespacev1.MtlsAuthSpec{}
if plan.AcceptedClientCA.ValueString() != "" {
mtls.Enabled = true
mtls.AcceptedClientCa = plan.AcceptedClientCA.ValueString()
mtls.AcceptedClientCaDeprecated = plan.AcceptedClientCA.ValueString() // TODO use []byte
mtls.CertificateFilters = certFilters
}

Expand Down Expand Up @@ -419,7 +419,7 @@ func (r *namespaceResource) Update(ctx context.Context, req resource.UpdateReque
mtls := &namespacev1.MtlsAuthSpec{}
if plan.AcceptedClientCA.ValueString() != "" {
mtls.Enabled = true
mtls.AcceptedClientCa = plan.AcceptedClientCA.ValueString()
mtls.AcceptedClientCaDeprecated = plan.AcceptedClientCA.ValueString() // TODO use []byte
mtls.CertificateFilters = certFilters
}

Expand Down Expand Up @@ -545,8 +545,8 @@ func updateModelFromSpec(ctx context.Context, diags diag.Diagnostics, state *nam
certificateFilter = filters
}

if ns.GetSpec().GetMtlsAuth().GetAcceptedClientCa() != "" {
state.AcceptedClientCA = internaltypes.EncodedCA(ns.GetSpec().GetMtlsAuth().GetAcceptedClientCa())
if ns.GetSpec().GetMtlsAuth().GetAcceptedClientCaDeprecated() != "" { // TODO use []byte
state.AcceptedClientCA = internaltypes.EncodedCA(ns.GetSpec().GetMtlsAuth().GetAcceptedClientCaDeprecated())
}

if ns.GetSpec().GetApiKeyAuth() != nil {
Expand Down

0 comments on commit acca221

Please sign in to comment.