Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 3bbb1ea

Browse files
authored
Merge branch 'master' into e2e_param
2 parents 7de2020 + 7fbb5e1 commit 3bbb1ea

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

controllers/kafkauser_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ func (r *KafkaUserReconciler) Reconcile(ctx context.Context, request reconcile.R
198198
var kafkaUser string
199199

200200
if instance.Spec.GetIfCertShouldBeCreated() {
201+
// Validate the KafkaUser instance annotations before creating a certificate request
202+
err := instance.Spec.ValidateAnnotations()
203+
if err != nil {
204+
return requeueWithError(reqLogger, "failed to reconcile kafkauser while validating annotations", err)
205+
}
206+
201207
// Avoid panic if the user wants to create a kafka user but the cluster is in plaintext mode
202208
// TODO: refactor this and use webhook to validate if the cluster is eligible to create a kafka user
203209
if cluster.Spec.ListenersConfig.SSLSecrets == nil && instance.Spec.PKIBackendSpec == nil {

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/banzaicloud/istio-client-go v0.0.17
1111
github.com/banzaicloud/istio-operator/api/v2 v2.15.1
1212
github.com/banzaicloud/k8s-objectmatcher v1.8.0
13-
github.com/banzaicloud/koperator/api v0.28.5
13+
github.com/banzaicloud/koperator/api v0.28.6
1414
github.com/banzaicloud/koperator/properties v0.4.1
1515
github.com/cert-manager/cert-manager v1.11.2
1616
github.com/cisco-open/cluster-registry-controller/api v0.2.5
@@ -24,7 +24,7 @@ require (
2424
github.com/prometheus/common v0.37.0
2525
github.com/stretchr/testify v1.8.1
2626
go.uber.org/zap v1.24.0
27-
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91
27+
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
2828
google.golang.org/protobuf v1.28.1
2929
gopkg.in/inf.v0 v0.9.1
3030
gotest.tools v2.2.0+incompatible

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ github.com/banzaicloud/istio-operator/api/v2 v2.15.1 h1:BZg8COvoOJtfx/dgN7KpoOnc
6464
github.com/banzaicloud/istio-operator/api/v2 v2.15.1/go.mod h1:5qCpwWlIfxiLvBfTvT2mD2wp5RlFCDEt8Xql4sYPNBc=
6565
github.com/banzaicloud/k8s-objectmatcher v1.8.0 h1:Nugn25elKtPMTA2br+JgHNeSQ04sc05MDPmpJnd1N2A=
6666
github.com/banzaicloud/k8s-objectmatcher v1.8.0/go.mod h1:p2LSNAjlECf07fbhDyebTkPUIYnU05G+WfGgkTmgeMg=
67-
github.com/banzaicloud/koperator/api v0.28.5 h1:MJ1s5QtW8zRN4aozyfBxXJ1nca8VcXL4TTZUc2Y9T6U=
68-
github.com/banzaicloud/koperator/api v0.28.5/go.mod h1:fo0y8UdiH9YPE+sIK5LcJWG6hd0pIA13F4li6DOIal4=
67+
github.com/banzaicloud/koperator/api v0.28.6 h1:ZsOAXAsg34O78qVCEHx84cdp57HlCje6zjzXHhvtXf4=
68+
github.com/banzaicloud/koperator/api v0.28.6/go.mod h1:AGGQ+aTBklaaG8ErotNPlP/nS47MYLc/jFVW7AsDiEE=
6969
github.com/banzaicloud/koperator/properties v0.4.1 h1:SB2QgXlcK1Dc7Z1rg65PJifErDa8OQnoWCCJgmC7SGc=
7070
github.com/banzaicloud/koperator/properties v0.4.1/go.mod h1:TcL+llxuhW3UeQtVEDYEXGouFLF2P+LuZZVudSb6jyA=
7171
github.com/banzaicloud/operator-tools v0.28.0 h1:GSfc0qZr6zo7WrNxdgWZE1LcTChPU8QFYOTDirYVtIM=
@@ -506,8 +506,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
506506
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
507507
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
508508
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
509-
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 h1:tnebWN09GYg9OLPss1KXj8txwZc6X6uMr6VFdcGNbHw=
510-
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
509+
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw=
510+
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
511511
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
512512
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
513513
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=

pkg/pki/k8scsrpki/k8scsr.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ import (
2222
)
2323

2424
const (
25-
DependingCsrAnnotation string = "banzaicloud.io/csr"
26-
IncludeFullChainAnnotation string = "csr.banzaicloud.io/fullchain"
27-
CertManagerSignerNamePrefix string = "clusterissuers.cert-manager.io"
25+
DependingCsrAnnotation string = "banzaicloud.io/csr"
26+
IncludeFullChainAnnotation string = "csr.banzaicloud.io/fullchain"
2827
)
2928

3029
type K8sCSR interface {

pkg/pki/k8scsrpki/k8scsr_user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (c *k8sCSR) ReconcileUserCertificate(
162162
}
163163

164164
if !foundApproved {
165-
if strings.Split(signingReq.Spec.SignerName, "/")[0] == CertManagerSignerNamePrefix {
165+
if strings.Split(signingReq.Spec.SignerName, "/")[0] == v1alpha1.CertManagerSignerNamePrefix {
166166
err = c.Approve(ctx, signingReq)
167167
if err != nil {
168168
return nil, err

0 commit comments

Comments
 (0)